![]() Wmic path OfficeSoftwareProtectionService get Version >nul 2>&1 & (set OsppHook=1) || (set OsppHook=0)įor /f "tokens=6 delims=. Wmic path SoftwareLicensingProduct where (Description like '%%KMSCLIENT%%') get Name 2>nul | findstr /i Windows 1>nul & (set SppHook=1) || (set SppHook=0) Set "SPPk=SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" Set "OSPP=HKLM\SOFTWARE\Microsoft\OfficeSoftwareProtectionPlatform" Set "IFEO=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" Setlocal EnableExtensions EnableDelayedExpansion WMIC PATH %spp% WHERE LicenseStatus=1 GET Name 2>nul | findstr /i "Windows" >nul & (set "W1nd0ws=") WMIC PATH %sps% WHERE version='%ver%' CALL RefreshLicenseStatus >nul 2>&1 WMIC PATH %spp% WHERE (Name like 'Windows%%' and PartialProductKey is not NULL) CALL Activate >nul 2>&1 Set "PSModulePath=%ProgramFiles%\WindowsPowerShell\Modules %SysPath%\WindowsPowerShell\v1.0\Modules"įor /f "tokens=2 delims=" %%A in ('"WMIC PATH %sps% GET Version /VALUE"') do set ver=%%A Set "Path=%SysPath% %Windir% %SysPath%\Wbem %SysPath%\WindowsPowerShell\v1.0\" If exist "%Windir%\Sysnative\reg.exe" (set "SysPath=%Windir%\Sysnative")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |