Tried different switches for no avail. It´s this part: Code: xcopy "%themefile%" /s /q "%vstore%\IR6Bkup.theme" /Y My test example for Check.bat: Code: @echo off setlocal ENABLEEXTENSIONS >nul ::define variables for check.bat set wppath=%appdata%\Microsoft\Windows\Themes >nul setx vstore "%appdata%\..\Local\VirtualStore\IR6" >nul set KEY_NAME=HKCU\Software\Microsoft\Windows\CurrentVersion\Themes set VALUE_NAME=CurrentTheme set spp=SoftwareLicensingProduct for /F "usebackq tokens=3" %%A IN (`reg query "%KEY_NAME%" /v "%VALUE_NAME%" 2^>nul ^| find "%VALUE_NAME%"`) do SET themefile=%%A mkdir %vstore% >nul echo. >>%vstore%\IR6Bkup.theme >nul echo. >>%vstore%\TranscodedWallpaper.jpg >nul ::determine whether license status is notification wmic path %spp% get LicenseStatus /format:list 2>nul | findstr /i 5 >nul 2>&1 if %errorlevel%==0 goto :Rearm if %errorlevel%==1 goto :Backup ::theme settings backup :Backup xcopy "%wppath%\TranscodedWallpaper.jpg" /s /q "%vstore%" /Y xcopy "%themefile%" /s /q "%vstore%\IR6Bkup.theme" /Y pause goto :Exit ::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 :Reinstall 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 "%vstore%\TranscodedWallpaper.jpg" /s /q "%wppath%\TranscodedWallpaper.jpg" /Y xcopy "%vstore%\IR6Bkup.theme" /s /q "C:\Windows\resources\Themes\IR6Bkup.theme" /Y reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes" /t REG_SZ /v CurrentTheme /d "C:\Windows\resources\Themes\IR6Bkup.theme" /f >NUL %vstore%\IR6Bkup.theme goto :Exit ::reinstall IR6 :Reinstall ::Insert IR6 Reinstall message here :Exit exit Spared the Reinstall part so far. It extends the script significantly .
I like comments, Ive never used them before this project but I see how handy they are now. Will it skip over the :: or should it be REM? @ timesurfer - okay. I only do what you see there cause its MUCH easier to test just that and then put it into what its going in once all is functioning.
REM/:: is fine although I prefer REM I think you just have to not @echo off and Exit stuff Thank you guys
Dude that is not correct, this is IF %ERRORLEVEL% EQU 6 (call :ReinstallIR6) ELSE (IF %ERRORLEVEL% EQU 7 (call :UninstallIR6))
Everything in hidden Rearm folder (Way to creat hidden folder is in IORRT part) but the tricky part is to get both IORRT and IR6 to detect if Rearm folder is there and act accordigly and leave folder if IR6 or IORRT is installed We are only working Check.bat having message at end of 180 day trial Yes IR6 install in both IR6 and Check.bat will need Rearm folder checks/deletes/etc... As will IORRT install/uninstall will need to checks/deletes/etc... In order to not uninstall what is still being used Original idea spirit animal Is the msg part in right place for Check.bat? Thanks Dude
I am with Humphrey here, as i too am quite confused and lost with the flow.. If some one can bullet point the flow/order it will be great..
Ok here is goes slow cause as much as I'm great with troubleshooting, original ideas, development and design it takes me a little longer than you guys to understand code. I lost about 5 years off my life designing and testing IORRT even when many said it was impossible We're working with two programs: IR6 IORRT Both will use Rearm folder to put all their folders/files in? So we need to coordinate that if IR6 or IORRT is installed/uninstalled the Rearm folder stays for either programs use and if only one program is left and uninstalls then Rearm folder is deleted So we need to check for opposite files when deleting an program so that Rearm is left to contain opposite program folders/files Is that ok