I've been researching ways to change the Windows Theme (Windows 7 PC) back to Windows Classic (from the default "Aero" theme) via Powershell. Found several, none of which worked. The one that seemed like it might work was very simple -
$computer ="mycomputer"
$theme = [Microsoft.SharePoint.Utilities.ThmxTheme]::Open($computer,"/Windows Classic.thmx")
$computer.Update()
But I'd get the message that Microsoft.SharePoint.Utilities.ThmxTheme did not exist.
Finally found a command line rundll32 that DID work, but left the Windows Personalization window open on screen, which I did not want. And finally, using that rundll32 command came up with a VBS script that would run the command, then close the window for me. Seemed to work great, but it turned out the change was only made to the Administrator user account, not to all the accounts on the system.
Here is that VBS script -
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:""C:\Windows\Resources\Ease of Access Themes\classic.theme"""
Wscript.Sleep 10000
WshShell.AppActivate("Desktop Properties")
WshShell.Sendkeys "%FC"
WshShell.Sendkeys "{F4}"
I know - this isn't a VBS forum, but I was hoping that either someone here already knows of a way to change the Windows Theme for all users via Powershell? Or if someone knows something I can change in that rundll32 command to have it apply for all accounts?
Thank you,
Eric