Noticed a little difference in check IR6.bat than D420 IR6.bat Code: Check IR6 SET file=%sd%\IR6.bat echo @echo off>%file% echo for /f "tokens=2 delims==" %%%%A IN ('"bcdedit|find "osdevice""') do set dl=%%%%A>>%file% echo reg load HKLM\MY_SYSTEM "%%dl%%\Windows\System32\config\system"^>NUL >>%file% echo reg delete HKLM\MY_SYSTEM\WPA /f^>NUL >>%file% echo reg unload HKLM\MY_SYSTEM^>NUL>>%file% echo echo del "%sd%\IR6.bat" ^>%%dl%%\installkey.bat >>%file% echo echo del "%systemdrive%\key.vbs" ^>^>%%dl%%\installkey.bat >>%file% echo echo cscript /b slmgr.vbs /ipk %PIDKEY%^>^>%%dl%%\installkey.bat >>%file% echo echo slmgr.vbs /dlv^>^>%%dl%%\installkey.bat>>%file% echo echo del "%systemdrive%\installkey.bat"^>^>%%dl%%\installkey.bat>>%file% echo echo CreateObject("WScript.Shell").Run """%systemdrive%\installkey.bat""", 0, False^>%%dl%%\key.vbs >>%file% echo reg load HKLM\MY_SOFTWARE "%%dl%%\Windows\System32\config\software" ^>NUL >>%file% echo reg add HKLM\MY_SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v InstallKey /t REG_SZ /d %systemdrive%\key.vbs ^>NUL >>%file% echo reg unload HKLM\MY_SOFTWARE >>%file% echo wpeutil reboot >>%file% Code: D420 IR6 SET file=%sd%\IR6.bat echo @echo off>>%file% echo echo Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") ^>^>drive.vbs>>%file% echo echo Set colItems = objWMIService.ExecQuery( "SELECT * FROM Win32_Volume",,48) ^>^>drive.vbs>>%file% echo echo For Each objItem in colItems ^>^>drive.vbs>>%file% echo echo If Hex(%sn%) = Hex(objItem.SerialNumber) then ^>^>drive.vbs>>%file% echo echo Wscript.Echo objItem.DriveLetter ^>^>drive.vbs>>%file% echo echo End If ^>^>drive.vbs>>%file% echo echo Next ^>^>drive.vbs>>%file% echo for /f %%%%A IN ('"cscript /nologo drive.vbs"') do set dl=%%%%A>>%file% echo set dl=%%dl:~0,-1%%>>%file% echo del drive.vbs>>%file% echo reg load HKLM\MY_SYSTEM "%%dl%%\Windows\System32\config\system" ^>NUL >>%file% echo reg delete HKLM\MY_SYSTEM\WPA /f ^>NUL >>%file% echo reg unload HKLM\MY_SYSTEM ^>NUL >>%file% echo echo cscript /b slmgr.vbs /ipk %PIDKEY% ^>%%dl%%\installkey.bat >>%file% echo echo slmgr.vbs /dlv ^>^>%%dl%%\installkey.bat >>%file% echo echo del "C:\installkey.bat" ^>^>%%dl%%\installkey.bat >>%file% echo echo CreateObject("WScript.Shell").Run """C:\installkey.bat""", 0, False ^>%%dl%%\key.vbs >>%file% echo echo @echo off ^>%%dl%%\launch.bat >>%file% echo echo wscript.exe "C:\key.vbs" ^>^>%%dl%%\launch.bat >>%file% echo echo del "%sd%\IR6.bat" ^>^>%%dl%%\launch.bat >>%file% echo echo del "C:\key.vbs" ^>^>%%dl%%\launch.bat >>%file% echo echo del "C:\launch.bat" ^>^>%%dl%%\launch.bat >>%file% echo reg load HKLM\MY_SOFTWARE "%%dl%%\Windows\System32\config\software" ^>NUL >>%file% echo reg add HKLM\MY_SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v InstallKey /t REG_SZ /d C:\launch.bat ^>NUL >>%file% echo reg unload HKLM\MY_SOFTWARE >>%file% echo wpeutil reboot >>%file%
This part of check.bat is not needed Code: schtasks /query | FINDSTR /i "IR6" >nul if %errorlevel%==0 ( schtasks /create /tn "IR6" /tr "'%systemdrive%\Windows\system32\cmd.exe' /c cscript.exe /b %SystemDrive%\Windows\System32\slmgr.vbs /rearm && net stop sppsvc && net start sppsvc" /sc daily /mo 30 /ru "" /f >NUL ) Because task always get's recreated to reset 30 days at rearm moment What is this part doing? Code: %windir%\resources\Themes\IR6Bkup.theme
For the difference in install IR6 code, the part in Check.bat is from old MasterDisaster script and is shorter, but does the same . Code: %windir%\resources\Themes\IR6Bkup.theme starts the backed up theme in restore part .
Check.bat IR6 uninstall needs to look like this Code: :UninstallIR6 CLS REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f >NUL SET file=%SystemDrive%\IR6 2>&1 IF EXIST %file% attrib -h %file% 2>&1 IF EXIST %file% RD /S /Q %file% 2>&1 schtasks /delete /tn "IR6" /f >NUL 2>&1 schtasks /delete /tn "Hybrid2" /f >NUL 2>&1 IF %ERRORLEVEL%==0 ( echo IR6 has been successfully uninstalled... ) ELSE ( echo IR6 is already uninstalled... ) ping -n 5 127.0.0.1 >nul GOTO :Exit Code: ::rearm task :Rearm echo: for /f "usebackq tokens=2 delims==" %%n in (`"%SystemRoot%\System32\wbem\WMIC.exe" /namespace:\\root\cimv2 path SoftwareLicensingService get RemainingWindowsReArmCount /format:list`) do set r=%%n if %r% == 0 goto :Messagebox cscript.exe /b %windir%\system32\slmgr.vbs /rearm net stop sppsvc >NUL net start sppsvc >NUL schtasks /query | FINDSTR /i "IR6" >nul if %errorlevel%==0 ( schtasks /create /tn "IR6" /tr "'%systemdrive%\Windows\system32\cmd.exe' /c cscript.exe /b %SystemDrive%\Windows\System32\slmgr.vbs /rearm && net stop sppsvc && net start sppsvc" /sc daily /mo 30 /ru "" /f >NUL ) xcopy "%systemdrive%\IR6\TranscodedWallpaper.jpg" /s /q "%wppath%" /Y >nul xcopy "%systemdrive%\IR6\IR6Bkup.theme" /s /q "%windir%\resources\Themes" /Y >nul reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes" /t REG_SZ /v CurrentTheme /d "%windir%\resources\Themes\IR6Bkup.theme" /f >NUL %windir%\resources\Themes\IR6Bkup.theme goto :Exit It runs without a cmd of any sort?
Code: :UninstallIR6 CLS REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f >NUL SET file=%SystemDrive%\IR6 2>&1 IF EXIST %file% attrib -h %file% 2>&1 IF EXIST %file% RD /S /Q %file% 2>&1 schtasks /delete /tn "IR6" /f >NUL 2>&1 schtasks /delete /tn "Hybrid2" /f >NUL 2>&1 IF %ERRORLEVEL%==0 ( echo IR6 has been successfully uninstalled... ) ELSE ( echo IR6 is already uninstalled... ) ping -n 5 127.0.0.1 >nul GOTO :Exit There have sneaked too much spaces into your code, which shouldn´t be there. Look at: Code: Windows NT and Code: /v NotificationDisabled it has to be only one, but in yours there are three. I found them on several more places in :InstallIR6-part and corrected them in my version. So here is Duality420: View attachment 21703 only corrected the spacing in :InstallIR6 in your code added the writing of Check.bat to :InstallIR6 NOTE: the rest of the code is untouched (took it from last working version) Test 1: installed IR6 from Duality420 Check.bat is properly created system boots to Win PE in PE c:ir6 prompts success and reboots system starts and after short moment watermark disappears the /dlv-Window appears and states 5 rearms left Test 2: rearmed the system 5 times in a row (created a BAT to do the job ) forwarded time for a month to get system again in Notification started Check.bat Messagebox pops up and i choosed "Reinstall" system boots to Win PE in PE c:ir6 prompts success and reboots system starts and after short moment watermark disappears the /dlv-Window appears and states 5 rearms left Reverted to last snapshot and repeated same procedure 2 times GOTCHA! What is next.........?
Nice. Once I am back on my machine I will test. (My cpu fan went out and the manufacture is mailing me another <3.) Downloading now to see code.
It's RE not PE, PE is disk This is wonderful work S77, I can't believe how wonderful it is you and Humphrey donated your MD level skills to my project and I really appreciate it with all my heart, plus now I got the neatest W7 rearm solution ever S77 So awesome work everyone Since it appears all my ideas manifested we have a new build to share with the world Thank you S77 and Humphrey and all others who put their efforts and brilliant coding to The Rearm Concept for Win7 Well if speed is an issue, I guess we could WMIC all the status for IR6/IORRT and add your direct launching of function for choice section So no more cscript.exe %windir%\system32\slmgr.vbs /dlv | FINDSTR /I "Remaining" or cscript OSPP.VBS /dstatus | FINDSTR /i "Remaining" For IORRT I guess you could check for rearm with WMIC instead of me doing backup and rearming and if can't rearm we assume there are no rearms left and IORRT doesn't install. That is the way I designed it but to just check would be faster cause the Check backup folder wouldn't have to be created/deleted when checking if rearms present. IORRT only needs 1 rearm to work infinitely Will slowly go through the archives to find all co-developers/testers, etc for first page. I'll start to reorganize first page with new pics and content if necessary
Code: echo * If you get error messages like "'C:IR6' is not a valid internal or external command" or "The Device is not ready" try D:IR6, E:IR6, F:IR6, G:IR6, H:IR6 or I:IR6 at step 3 This is what i meant..