mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-04-22 00:22:58 +00:00
Compare commits
No commits in common. "f5a0a63165d9e6b57719f48322baac60e29a2e6a" and "c316b42e5cd166aa5c10a54d03ca0c5e5d63f4cd" have entirely different histories.
f5a0a63165
...
c316b42e5c
@ -2608,6 +2608,7 @@ set _prids=
|
||||
set _config=
|
||||
set _version=
|
||||
set _License=
|
||||
set _oBranding=
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
@ -2861,11 +2862,20 @@ set "_common=%CommonProgramFiles%"
|
||||
if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%"
|
||||
set "_common2=%CommonProgramFiles(x86)%"
|
||||
|
||||
for /r "%_common%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
if not defined _oBranding for /r "%_common2%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
|
||||
call :msiofficedata %2
|
||||
|
||||
echo:
|
||||
echo Activating Office... [MSI ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found, aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found, aborting activation...]"
|
||||
@ -4780,6 +4790,7 @@ set _prids=
|
||||
set _config=
|
||||
set _version=
|
||||
set _License=
|
||||
set _oBranding=
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
@ -4899,6 +4910,9 @@ set "_common=%CommonProgramFiles%"
|
||||
if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%"
|
||||
set "_common2=%CommonProgramFiles(x86)%"
|
||||
|
||||
for /r "%_common%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
if not defined _oBranding for /r "%_common2%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
|
||||
if exist "%_common%\Microsoft Shared\OFFICE%oVer%\Office Setup Controller\pkeyconfig-office.xrm-ms" (
|
||||
set "pkeypath=%_common%\Microsoft Shared\OFFICE%oVer%\Office Setup Controller\pkeyconfig-office.xrm-ms"
|
||||
) else if exist "%_common2%\Microsoft Shared\OFFICE%oVer%\Office Setup Controller\pkeyconfig-office.xrm-ms" (
|
||||
@ -4910,6 +4924,12 @@ call :msiofficedata %2
|
||||
echo:
|
||||
echo Processing Office... [MSI ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found. Aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
@ -8854,24 +8874,6 @@ function Get-WmiInfo {
|
||||
}
|
||||
}
|
||||
|
||||
function slGetSkuInfo($SkuId) {
|
||||
$t = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0)
|
||||
$t.DefinePInvokeMethod('SLOpen', 'slc.dll', 22, 1, [Int32], @([IntPtr].MakeByRefType()), 1, 3).SetImplementationFlags(128)
|
||||
$t.DefinePInvokeMethod('SLClose', 'slc.dll', 22, 1, [IntPtr], @([IntPtr]), 1, 3).SetImplementationFlags(128)
|
||||
$t.DefinePInvokeMethod('SLGetProductSkuInformation', 'slc.dll', 22, 1, [Int32], @([IntPtr], [Guid].MakeByRefType(), [String], [UInt32].MakeByRefType(), [UInt32].MakeByRefType(), [IntPtr].MakeByRefType()), 1, 3).SetImplementationFlags(128)
|
||||
$w = $t.CreateType()
|
||||
$hSLC = 0
|
||||
try {
|
||||
[void]$w::SLOpen([ref]$hSLC)
|
||||
$c = 0; $b = 0
|
||||
$r = $w::SLGetProductSkuInformation($hSLC, [ref][Guid]$SkuId, "msft:sl/EUL/PHONE/PUBLIC", [ref]$null, [ref]$c, [ref]$b)
|
||||
return ($r -eq 0)
|
||||
}
|
||||
finally {
|
||||
[void]$w::SLClose($hSLC)
|
||||
}
|
||||
}
|
||||
|
||||
if ($env:resetstuff -eq $null) {
|
||||
foreach ($tsactid in $tsactids) {
|
||||
try {
|
||||
@ -8882,13 +8884,6 @@ if ($env:resetstuff -eq $null) {
|
||||
$prodName = if ($nameParts.Count -gt 1) { ($nameParts[1].Trim() -split '[ ,]')[0] } else { $null }
|
||||
}
|
||||
[LibTSforge.Modifiers.GenPKeyInstall]::InstallGenPKey($ver, $prod, $tsactid)
|
||||
if ($prodName -match 'Office' -and -not (slGetSkuInfo($tsactid))) {
|
||||
$licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus"
|
||||
if ($licenseStatus -eq 1) {
|
||||
Write-Host "[$prodName] is already permanently activated." -ForegroundColor White -BackgroundColor DarkGreen
|
||||
continue
|
||||
}
|
||||
}
|
||||
[LibTSforge.Activators.ZeroCID]::Activate($ver, $prod, $tsactid)
|
||||
$licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus"
|
||||
if ($licenseStatus -eq 1) {
|
||||
@ -10931,7 +10926,7 @@ set _prids=
|
||||
set _config=
|
||||
set _version=
|
||||
set _License=
|
||||
set _oMSI=
|
||||
set _oBranding=
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
@ -11013,7 +11008,7 @@ exit /b
|
||||
for %%# in (%_oIds%) do (
|
||||
|
||||
set skipprocess=
|
||||
if %_NoEditionChange%==1 if not defined _oMSI (
|
||||
if %_NoEditionChange%==1 if not defined _oBranding (
|
||||
set foundprod=
|
||||
call :ksdata chkprod %%#
|
||||
if not defined foundprod (
|
||||
@ -11062,7 +11057,7 @@ if not "!key!"=="" (
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic
|
||||
call :dk_inskey "[!key!] [!_prod!]"
|
||||
) else (
|
||||
if not defined _oMSI (
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Product In Script [Office %oVer%.0 !_prod! not found in script]"
|
||||
call :dk_color %Blue% "Make sure you are using Latest MAS script."
|
||||
@ -11085,7 +11080,6 @@ exit /b
|
||||
:: Process Office MSI Version
|
||||
|
||||
call :ks_reset
|
||||
set _oMSI=1
|
||||
|
||||
if "%1"=="14" (
|
||||
call :dk_actids 59a52881-a989-479d-af46-f275c6370663
|
||||
@ -11106,11 +11100,21 @@ set "_common=%CommonProgramFiles%"
|
||||
if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%"
|
||||
set "_common2=%CommonProgramFiles(x86)%"
|
||||
|
||||
call :msiofficedata %2
|
||||
for /r "%_common%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
if not defined _oBranding for /r "%_common2%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
|
||||
call :ksdata getmsiprod %2
|
||||
call :msiofficedata %2 getmsiret
|
||||
|
||||
echo:
|
||||
echo Processing Office... [MSI ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found. Aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
@ -12130,13 +12134,18 @@ for %%# in (
|
||||
) do (
|
||||
for /f "tokens=1-5 delims=_" %%A in ("%%#") do (
|
||||
|
||||
set getIds=1
|
||||
if "%oVer%"=="%%A" (
|
||||
if /i "%2"=="getmsiret" (echo %%D | findstr /i "Volume VL" %nul% && set getIds=)
|
||||
|
||||
if defined getIds (
|
||||
reg query "%1\Registration\{%%B}" /v ProductCode %nul2% | find /i "-%%C-" %nul% && (
|
||||
reg query "%1\Common\InstalledPackages" %nul2% | find /i "-%%C-" %nul% && (
|
||||
if defined _oIds (set _oIds=!_oIds! %%D) else (set _oIds=%%D)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
@ -12409,7 +12418,7 @@ if /i "%2"=="%%D" (
|
||||
set key=%%B
|
||||
set _actid=%%A
|
||||
set _allactid=!_allactid! %%A
|
||||
) else if not defined _oMSI if %_NoEditionChange%==0 (
|
||||
) else if not defined _oBranding if %_NoEditionChange%==0 (
|
||||
echo: %%E | find /i "-%2-" %nul% && (
|
||||
set key=%%B
|
||||
set _altoffid=%%D
|
||||
@ -12419,6 +12428,21 @@ set _allactid=!_allactid! %%A
|
||||
)
|
||||
)
|
||||
|
||||
if %1==getmsiprod if "%oVer%"=="%%C" (
|
||||
for /f "tokens=*" %%x in ('findstr /i /c:"%%A" "%_oBranding%"') do set "prodId=%%x"
|
||||
set prodId=!prodId:"/>=!
|
||||
set prodId=!prodId:~-4!
|
||||
if "%oVer%"=="14" (
|
||||
REM Exception case for Visio because wrong primary product ID is mentioned in Branding.xml
|
||||
echo %%D | find /i "Visio" %nul% && set prodId=0057
|
||||
)
|
||||
reg query "%2\Registration\{%%A}" /v ProductCode %nul2% | find /i "-!prodId!-" %nul% && (
|
||||
reg query "%2\Common\InstalledPackages" %nul2% | find /i "-!prodId!-" %nul% && (
|
||||
if defined _oIds (set _oIds=!_oIds! %%D) else (set _oIds=%%D)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
exit /b
|
||||
|
@ -823,6 +823,7 @@ set _prids=
|
||||
set _config=
|
||||
set _version=
|
||||
set _License=
|
||||
set _oBranding=
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
@ -1076,11 +1077,20 @@ set "_common=%CommonProgramFiles%"
|
||||
if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%"
|
||||
set "_common2=%CommonProgramFiles(x86)%"
|
||||
|
||||
for /r "%_common%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
if not defined _oBranding for /r "%_common2%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
|
||||
call :msiofficedata %2
|
||||
|
||||
echo:
|
||||
echo Activating Office... [MSI ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found, aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found, aborting activation...]"
|
||||
@ -2465,13 +2475,18 @@ for %%# in (
|
||||
) do (
|
||||
for /f "tokens=1-5 delims=_" %%A in ("%%#") do (
|
||||
|
||||
set getIds=1
|
||||
if "%oVer%"=="%%A" (
|
||||
if /i "%2"=="getmsiret" (echo %%D | findstr /i "Volume VL" %nul% && set getIds=)
|
||||
|
||||
if defined getIds (
|
||||
reg query "%1\Registration\{%%B}" /v ProductCode %nul2% | find /i "-%%C-" %nul% && (
|
||||
reg query "%1\Common\InstalledPackages" %nul2% | find /i "-%%C-" %nul% && (
|
||||
if defined _oIds (set _oIds=!_oIds! %%D) else (set _oIds=%%D)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
|
@ -1029,7 +1029,7 @@ set _prids=
|
||||
set _config=
|
||||
set _version=
|
||||
set _License=
|
||||
set _oMSI=
|
||||
set _oBranding=
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
@ -1143,7 +1143,7 @@ exit /b
|
||||
for %%# in (%_oIds%) do (
|
||||
|
||||
set skipprocess=
|
||||
if %_NoEditionChange%==1 if not defined _oMSI (
|
||||
if %_NoEditionChange%==1 if not defined _oBranding (
|
||||
set foundprod=
|
||||
call :ksdata chkprod %%#
|
||||
if not defined foundprod (
|
||||
@ -1192,7 +1192,7 @@ if not "!key!"=="" (
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% || call :oh_installlic
|
||||
call :dk_inskey "[!key!] [!_prod!]"
|
||||
) else (
|
||||
if not defined _oMSI (
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Product In Script [Office %oVer%.0 !_prod! not found in script]"
|
||||
call :dk_color %Blue% "Make sure you are using Latest MAS script."
|
||||
@ -1215,7 +1215,6 @@ exit /b
|
||||
:: Process Office MSI Version
|
||||
|
||||
call :ks_reset
|
||||
set _oMSI=1
|
||||
|
||||
if "%1"=="14" (
|
||||
call :dk_actids 59a52881-a989-479d-af46-f275c6370663
|
||||
@ -1236,11 +1235,21 @@ set "_common=%CommonProgramFiles%"
|
||||
if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%"
|
||||
set "_common2=%CommonProgramFiles(x86)%"
|
||||
|
||||
call :msiofficedata %2
|
||||
for /r "%_common%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
if not defined _oBranding for /r "%_common2%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
|
||||
call :ksdata getmsiprod %2
|
||||
call :msiofficedata %2 getmsiret
|
||||
|
||||
echo:
|
||||
echo Processing Office... [MSI ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found. Aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
@ -3441,13 +3450,18 @@ for %%# in (
|
||||
) do (
|
||||
for /f "tokens=1-5 delims=_" %%A in ("%%#") do (
|
||||
|
||||
set getIds=1
|
||||
if "%oVer%"=="%%A" (
|
||||
if /i "%2"=="getmsiret" (echo %%D | findstr /i "Volume VL" %nul% && set getIds=)
|
||||
|
||||
if defined getIds (
|
||||
reg query "%1\Registration\{%%B}" /v ProductCode %nul2% | find /i "-%%C-" %nul% && (
|
||||
reg query "%1\Common\InstalledPackages" %nul2% | find /i "-%%C-" %nul% && (
|
||||
if defined _oIds (set _oIds=!_oIds! %%D) else (set _oIds=%%D)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
@ -3720,7 +3734,7 @@ if /i "%2"=="%%D" (
|
||||
set key=%%B
|
||||
set _actid=%%A
|
||||
set _allactid=!_allactid! %%A
|
||||
) else if not defined _oMSI if %_NoEditionChange%==0 (
|
||||
) else if not defined _oBranding if %_NoEditionChange%==0 (
|
||||
echo: %%E | find /i "-%2-" %nul% && (
|
||||
set key=%%B
|
||||
set _altoffid=%%D
|
||||
@ -3730,6 +3744,21 @@ set _allactid=!_allactid! %%A
|
||||
)
|
||||
)
|
||||
|
||||
if %1==getmsiprod if "%oVer%"=="%%C" (
|
||||
for /f "tokens=*" %%x in ('findstr /i /c:"%%A" "%_oBranding%"') do set "prodId=%%x"
|
||||
set prodId=!prodId:"/>=!
|
||||
set prodId=!prodId:~-4!
|
||||
if "%oVer%"=="14" (
|
||||
REM Exception case for Visio because wrong primary product ID is mentioned in Branding.xml
|
||||
echo %%D | find /i "Visio" %nul% && set prodId=0057
|
||||
)
|
||||
reg query "%2\Registration\{%%A}" /v ProductCode %nul2% | find /i "-!prodId!-" %nul% && (
|
||||
reg query "%2\Common\InstalledPackages" %nul2% | find /i "-!prodId!-" %nul% && (
|
||||
if defined _oIds (set _oIds=!_oIds! %%D) else (set _oIds=%%D)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
exit /b
|
||||
|
@ -1499,6 +1499,7 @@ set _prids=
|
||||
set _config=
|
||||
set _version=
|
||||
set _License=
|
||||
set _oBranding=
|
||||
exit /b
|
||||
|
||||
::========================================================================================================================================
|
||||
@ -1678,6 +1679,9 @@ set "_common=%CommonProgramFiles%"
|
||||
if defined PROCESSOR_ARCHITEW6432 set "_common=%CommonProgramW6432%"
|
||||
set "_common2=%CommonProgramFiles(x86)%"
|
||||
|
||||
for /r "%_common%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
if not defined _oBranding for /r "%_common2%\Microsoft Shared\OFFICE%oVer%\" %%f in (BRANDING.XML) do if exist "%%f" set "_oBranding=%%f"
|
||||
|
||||
if exist "%_common%\Microsoft Shared\OFFICE%oVer%\Office Setup Controller\pkeyconfig-office.xrm-ms" (
|
||||
set "pkeypath=%_common%\Microsoft Shared\OFFICE%oVer%\Office Setup Controller\pkeyconfig-office.xrm-ms"
|
||||
) else if exist "%_common2%\Microsoft Shared\OFFICE%oVer%\Office Setup Controller\pkeyconfig-office.xrm-ms" (
|
||||
@ -1689,6 +1693,12 @@ call :msiofficedata %2
|
||||
echo:
|
||||
echo Processing Office... [MSI ^| %_version% ^| %_oArch%]
|
||||
|
||||
if not defined _oBranding (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking BRANDING.XML [Not Found. Aborting activation...]"
|
||||
exit /b
|
||||
)
|
||||
|
||||
if not defined _oIds (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Installed Products [Product IDs not found. Aborting activation...]"
|
||||
@ -6737,24 +6747,6 @@ function Get-WmiInfo {
|
||||
}
|
||||
}
|
||||
|
||||
function slGetSkuInfo($SkuId) {
|
||||
$t = [AppDomain]::CurrentDomain.DefineDynamicAssembly(4, 1).DefineDynamicModule(2, $False).DefineType(0)
|
||||
$t.DefinePInvokeMethod('SLOpen', 'slc.dll', 22, 1, [Int32], @([IntPtr].MakeByRefType()), 1, 3).SetImplementationFlags(128)
|
||||
$t.DefinePInvokeMethod('SLClose', 'slc.dll', 22, 1, [IntPtr], @([IntPtr]), 1, 3).SetImplementationFlags(128)
|
||||
$t.DefinePInvokeMethod('SLGetProductSkuInformation', 'slc.dll', 22, 1, [Int32], @([IntPtr], [Guid].MakeByRefType(), [String], [UInt32].MakeByRefType(), [UInt32].MakeByRefType(), [IntPtr].MakeByRefType()), 1, 3).SetImplementationFlags(128)
|
||||
$w = $t.CreateType()
|
||||
$hSLC = 0
|
||||
try {
|
||||
[void]$w::SLOpen([ref]$hSLC)
|
||||
$c = 0; $b = 0
|
||||
$r = $w::SLGetProductSkuInformation($hSLC, [ref][Guid]$SkuId, "msft:sl/EUL/PHONE/PUBLIC", [ref]$null, [ref]$c, [ref]$b)
|
||||
return ($r -eq 0)
|
||||
}
|
||||
finally {
|
||||
[void]$w::SLClose($hSLC)
|
||||
}
|
||||
}
|
||||
|
||||
if ($env:resetstuff -eq $null) {
|
||||
foreach ($tsactid in $tsactids) {
|
||||
try {
|
||||
@ -6765,13 +6757,6 @@ if ($env:resetstuff -eq $null) {
|
||||
$prodName = if ($nameParts.Count -gt 1) { ($nameParts[1].Trim() -split '[ ,]')[0] } else { $null }
|
||||
}
|
||||
[LibTSforge.Modifiers.GenPKeyInstall]::InstallGenPKey($ver, $prod, $tsactid)
|
||||
if ($prodName -match 'Office' -and -not (slGetSkuInfo($tsactid))) {
|
||||
$licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus"
|
||||
if ($licenseStatus -eq 1) {
|
||||
Write-Host "[$prodName] is already permanently activated." -ForegroundColor White -BackgroundColor DarkGreen
|
||||
continue
|
||||
}
|
||||
}
|
||||
[LibTSforge.Activators.ZeroCID]::Activate($ver, $prod, $tsactid)
|
||||
$licenseStatus = Get-WmiInfo -tsactid $tsactid -property "LicenseStatus"
|
||||
if ($licenseStatus -eq 1) {
|
||||
@ -7185,13 +7170,18 @@ for %%# in (
|
||||
) do (
|
||||
for /f "tokens=1-5 delims=_" %%A in ("%%#") do (
|
||||
|
||||
set getIds=1
|
||||
if "%oVer%"=="%%A" (
|
||||
if /i "%2"=="getmsiret" (echo %%D | findstr /i "Volume VL" %nul% && set getIds=)
|
||||
|
||||
if defined getIds (
|
||||
reg query "%1\Registration\{%%B}" /v ProductCode %nul2% | find /i "-%%C-" %nul% && (
|
||||
reg query "%1\Common\InstalledPackages" %nul2% | find /i "-%%C-" %nul% && (
|
||||
if defined _oIds (set _oIds=!_oIds! %%D) else (set _oIds=%%D)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user