MgmTest Posted September 22, 2013 Posted September 22, 2013 Hi.me change default theme but not working.plz help fix.
MrJinje Posted September 29, 2013 Posted September 29, 2013 (edited) What I am doing on Windows Server 2012 R2 is creating my custom theme from inside an installed OS. I open up Personalize, change my desktop background, sounds, screensaver, etc, right click on the unsaved theme, and save the file on my desktop as a .themepack. Then from my first logon script, I run this command under each user account and it applies the theme, which I kept in the same folder with my setupcomplete.cmd for simplicity.Partial contents of my 'FirstLogon.ps1' script.C:\Windows\Setup\Scripts\SOLID_BLACK_SOUNDS_DISABLED_2012_R2.deskthemepack.Not sure what OS we are talking about, but it should work on 8.1 the same way.Haven't tracked down the way to alter the default theme OEM style yet, but it's probably plausible depending on the source of the default theme (if registry based, yes easy, if DLL hardcoded in a signed block, maybe harder) Edited September 29, 2013 by MrJinje
maxXPsoft Posted September 29, 2013 Posted September 29, 2013 (edited) themepack works on 8.1 as MrJinje saidbut I call an autoit in Firstlogoncommands that installs and then closes PersonalizationCMD /C start /wait %systemdrive%\Install\maxXPsoft_AU3.exeWinWaitNotActive ("Personalization")Run(@ComSpec & " /c " &@ScriptDir&"\maxXPsoft.themepack", "", @SW_HIDE)WinWaitActive ("Personalization")Sleep (5000)send ("!{F4}")Exit Edited September 29, 2013 by maxXPsoft
MrJinje Posted September 29, 2013 Posted September 29, 2013 (edited) Good trick Max, I can't beat auto-it (because of the way Control Panel hwnd's are handled) but here is the powershell alternative. The caveat being it cannot activate the personalization window. C:\Windows\Setup\Scripts\BLACK_SILENCE_NO_SCREENSAVER_2012_R2.deskthemepackStart-Sleep 5[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');[Microsoft.VisualBasic.Interaction]::AppActivate("Personalization")[void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');[System.Windows.Forms.SendKeys]::SendWait("%{F4}")Updated snippet with VBS style AppActivate method.http://technet.microsoft.com/en-us/library/ee221101.aspxhttp://technet.microsoft.com/en-us/library/ff657834 Edited September 30, 2013 by MrJinje
MrJinje Posted September 29, 2013 Posted September 29, 2013 (edited) This works if set via the group policy (or likely via group policy in the $OEM$ folders trick). Create the setting in gpedit.msc, then copy your "C:\Windows\System32\GroupPolicy" folder into your $OEM$ folders @ ($OEM$\$$\System32 folder)gpedit.msc > User Config > Admin Templates > Control Panel > Personalization > Load a specific themeWhen I did it via gpedit.msc, it created 2 files registry.pol and comment.cmtx, and we probably don't need the comment file.FYI, the setting only works prior to first logon, so it won't seem to work if you already logged with an account as it will not change anything, you'll have to delete that user profile and logon again, which will cause windows to go through the 'setting up your profile' magics on first logon.Doing so edits this setting. But you cannot use the .reg HKCU to push the setting because it only occurs during first logon, hence timing paradox. Maybe we could try editing the default user profile @ HKU\.DEFAULT - Or could try it from HKLM and see if it will push across the machine via undocumented setting.Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization]"ThemeFile"="C:\\Windows\\Setup\\Scripts\\SOLID_BLACK_SOUNDS_DISABLED_2012_R2.deskthemepack"http://windows7themes.net/windows-7-theme-group-policy.html Edited September 29, 2013 by MrJinje
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now