I don't think we need this in Check.bat Code: If not exist %SystemDrive%\IR6 mkdir %SystemDrive%\IR6 >nul
Curious, do we have a backup check that see's in Check.bat that can tell if theme has been changed since before last 30 days? This way upon restart if user changed theme then it's current theme is backed up not the previous theme Think that if user changes his theme/background often the startup backup/restore if user didn't have his comp on for the 30 day task when the theme resets it would be his users latest theme
The theme name is Code: "%LOCALAPPDATA%\Microsoft\Windows\Themes\Custom.theme" and it appears as "Unsaved theme" in the Customization panel. There's a big issue here: Who or what did create it? The user may have changed an element himself/herself and forgotten to save (or (s)he just doesn't care)). Otherwise the Notification eclipse also creates that theme by forcefully blackening out the Wallpaper/Slideshow.
Do these things have initial dates to do check to apply my idea It will just be funny to have user be in notifications and then prior theme/background gets installed but I guess that is better than black background Thanks for your help
If they didn't save the regkey points to the Custom.theme file - that's what will be backed up. It's the best you can do, the registry doesn't reveal much more. The previous saved themes won't disappear and can be re-selected by the user easily.
Back up is created at every start up. Need some bit of code that checks every day at specific time if previous back up and current theme is the same, if not, run back up code. Can I get the latest Duality/Check codes?
Sounds like we just avoid black theme/background which is what my original concept intended Thanks guys who all helped with this concept cause it's closed that second loop when dealing with notifications Great Team D420
Well, this should handle that. Code: 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 :Backup echo %themefile% echo %wppath% echo %IR6backup% echo F | xcopy "%wppath%\TranscodedWallpaper.jpg" /s /q "%IR6backup%" /Y echo F | xcopy "%themefile%" /s /q "%IR6backup%\IR6Bkup.theme" /Y goto :Exit :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 ) echo F | xcopy "%IR6backup%\TranscodedWallpaper.jpg" /s /q "%wppath%" /Y echo F | xcopy "%IR6backup%\IR6Bkup.theme" /s /q "C:\Windows\resources\Themes" /Y reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes" /t REG_SZ /v CurrentTheme /d "C:\Windows\resources\Themes\IR6Bkup.theme" /f >NUL %IR6backup%\IR6Bkup.theme goto :Exit
Backup in Notification would be the only edge case where you could accidentally get the Custom.theme with the black background setting in it. If that is excluded now the only time you get a black background backed up is if the user explicitly selected it. Yes, purists exist.
The Windows directory is %windir% or %SystemRoot%, system drive is %SystemDrive%. No need to hardcode C:, I guess.