To change the Windows 10 theme, I'm curently use a batch file (FILE_NAME.bat) to:
- Kill the "DSHost.exe" process (DeskScapes8) to stop the desktop background Dream video (if needed).
- Kill the "ObjectDock.exe" process to unload the dock I use.
- Apply a Windows 10 theme I previously saved.
- Kill the "SystemSettings.exe" process (Windows 10 settings -> this window opened when I apply the theme) to close the Windows 10 settings.
- Delete the previous Windows 10 "Custom.theme" (if needed).
- Change the Taskbar texture, the Start Buton image and the Start Menu background texture.
- Replace the ObjectDock backup.
- Restart the "ObjectDock.exe" process.
- Apply a new Dream video to the desktop background.
- Change my Windows 10 user account picture (needs the user to clic on a buton for confirmation; I previously made my account pictures "read only").
- Refresh (kill and restart) the "explorer.exe" process (Windows 10 File explorer).
If anyone wants the bach file content I wrote (not perfect, but works):
Code: vbscript
- @echo off
- Set Processus="DSHost.exe"
- for /f "tokens=1" %%i In ('tasklist /NH /FI "imagename eq %Processus%"') do set ff=%%i
- IF /i "%ff%"==%Processus% (taskkill /f /im DSHost.exe)
- taskkill /f /im ObjectDock.exe
- explorer "C:\Users\USER_NAME\AppData\Local\Microsoft\Windows\Themes\THEME_NAME.theme"
- taskkill /f /im SystemSettings.exe
- IF exist "C:\Users\USER_NAME\AppData\Local\Microsoft\Windows\Themes\Custom.theme" attrib -r -s -h "C:\Users\USER_NAME\AppData\Local\Microsoft\Windows\Themes\Custom.theme"
- IF exist "C:\Users\USER_NAME\AppData\Local\Microsoft\Windows\Themes\Custom.theme" del /f /q "C:\Users\USER_NAME\AppData\Local\Microsoft\Windows\Themes\Custom.theme"
- attrib -r -s -h "FILE_PATH_1\Taskbar.png"
- del /f /q "FILE_PATH_1\Taskbar.png"
- attrib -r -s -h "FILE_PATH_1\StartButon.png"
- del /f /q "FILE_PATH_1\StartButon.png"
- attrib -r -s -h "FILE_PATH_1\StartMenu.png"
- del /f /q "FILE_PATH_1\StartMenu.png"
- copy "FILE_PATH_2\Taskbar.png" "FILE_PATH_1\"
- copy "FILE_PATH_2\StartButon.png" "FILE_PATH_1\"
- copy "FILE_PATH_2\StartMenu.png" "FILE_PATH_1\"
- attrib -r -s -h "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\AppImages.ini"
- del /f /q "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\AppImages.ini"
- attrib -r -s -h "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\CurrentTheme.ini"
- del /f /q "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\CurrentTheme.ini"
- attrib -r -s -h "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\CurrentTheme_Backup.ini"
- del /f /q "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\CurrentTheme_Backup.ini"
- attrib -r -s -h "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\Recent.ini"
- del /f /q "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\Recent.ini"
- attrib -r -s -h "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\Settings.ini"
- del /f /q "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\Settings.ini"
- copy "FILE_PATH_3\ObjectDockPlus\AppImages.ini" "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\"
- copy "FILE_PATH_3\ObjectDockPlus\CurrentTheme.ini" "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\"
- copy "FILE_PATH_3\ObjectDockPlus\CurrentTheme_Backup.ini" "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\"
- copy "FILE_PATH_3\ObjectDockPlus\Recent.ini" "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\"
- copy "FILE_PATH_3\ObjectDockPlus\Settings.ini" "C:\Users\USER_NAME\AppData\Local\Stardock\ObjectDockPlus\"
- start "Object Dock" "C:\Program Files (x86)\Stardock\ObjectDock\ObjectDock.exe"
- explorer "FILE_PATH_4\DREAM_NAME.Dream"
- start "Account Picture" "C:\Users\USER_NAME\AppData\Roaming\Microsoft\Windows\AccountPictures\FILE_NAME.accountpicture-ms"
- timeout /t 5
- taskkill /f /im explorer.exe
- start explorer.exe
"timeout /t 5" = 5 seconds to confirm the Windows 10 user account picture changing -> confirm before the refresh of the "explorer.exe" process, or the picture will not be changed.
EDIT: Create a shortcut for your batch file, and run it with minimized window -> right clic, properties, run = minimized, apply, ok.