scrapcode Posted December 7, 2011 Share Posted December 7, 2011 (edited) i don't know what i'm doing wrong... here's the code...if %TIME:~0,2% GEQ 8( if %TIME:~0,2% LEQ 16 ( rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Themes\1.theme" ) else ( rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Themes\2.theme" ))else( rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Themes\2.theme")thanks in advance... Edited December 7, 2011 by scrapcode Link to comment Share on other sites More sharing options...
scrapcode Posted December 7, 2011 Author Share Posted December 7, 2011 nvm guys... found the solution.. sorry for the noob question@ECHO OFF:beginclsIF %TIME:~0,2% GEQ 8 (goto one) else (goto two):oneIF %TIME:~0,2% LEQ 16 (goto three) else (goto two):tworundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Users\admin\AppData\Local\Microsoft\Windows\Themes\2.theme":threerundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Users\admin\AppData\Local\Microsoft\Windows\Themes\1.theme":end Link to comment Share on other sites More sharing options...
scrapcode Posted December 7, 2011 Author Share Posted December 7, 2011 final version...added another if for another theme and found a code which closes the Personalization window...@ECHO OFF:begincls:_SetupSet _Win1=PersonalizationSet _Win2=Screen ResolutionSet _VBFile=%Temp%\~Temp@.vbs:: Create VBScript in Temp folder(Echo.On Error Resume NextEcho.strTitle = WScript.Arguments.Item^(0^)Echo.' Create a Word objectEcho.Set objWord = CreateObject^("Word.Application"^)Echo.' Generate a collection containing the open windows Echo.Set colTasks = objWord.TasksEcho.' Search for the windows title that was passed as parameterEcho.For Each objTask In colTasksEcho.If objTask.Name = strTitle Then colTasks^(objTask.Name^).CloseEcho.NextEcho.objWord.Quit)>"%_VBFile%"IF %TIME:~0,2% GEQ 8 (goto one) else (goto two):oneIF %TIME:~0,2% LEQ 18 (goto three) else (goto two):tworundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Users\admin\AppData\Local\Microsoft\Windows\Themes\2.theme"Cscript //nologo %_VBFile% "%_Win1%"goto end:threeIF %TIME:~0,2% GEQ 16 (goto five) else (goto four):fourrundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Users\admin\AppData\Local\Microsoft\Windows\Themes\1.theme"Cscript //nologo %_VBFile% "%_Win1%"goto end:fiverundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Users\admin\AppData\Local\Microsoft\Windows\Themes\3.theme"Cscript //nologo %_VBFile% "%_Win1%":end Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now