Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

[req]Change theme not working


  • Please log in to reply
4 replies to this topic

#1
MgmTest

MgmTest

    Junior

  • Members
  • Pip
  • 61 posts
  • OS:Windows 7 x86
  • Country: Country Flag

Hi.

me change default theme but not working.

plz help fix.




How to remove advertisement from MSFN

#2
MrJinje

MrJinje

    Tool™ Developer

  • Developers
  • 1,031 posts
  • OS:none specified
  • Country: Country Flag

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 by MrJinje, 29 September 2013 - 02:15 AM.


#3
maxXPsoft

maxXPsoft

    MSFN Master

  • Developers
  • 2,879 posts
  • OS:Windows 7 x64
  • Country: Country Flag

themepack works on 8.1 as MrJinje said

but I call an autoit in Firstlogoncommands that installs and then closes Personalization

CMD /C start /wait %systemdrive%\Install\maxXPsoft_AU3.exe

WinWaitNotActive ("Personalization")
Run(@ComSpec & " /c " &@ScriptDir&"\maxXPsoft.themepack", "", @SW_HIDE)
WinWaitActive ("Personalization")
Sleep (5000)
send ("!{F4}")
Exit

Edited by maxXPsoft, 29 September 2013 - 07:43 AM.


#4
MrJinje

MrJinje

    Tool™ Developer

  • Developers
  • 1,031 posts
  • OS:none specified
  • Country: Country Flag

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.deskthemepack
Start-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.micro...y/ee221101.aspx

 

http://technet.micro...ibrary/ff657834


Edited by MrJinje, 30 September 2013 - 11:41 AM.


#5
MrJinje

MrJinje

    Tool™ Developer

  • Developers
  • 1,031 posts
  • OS:none specified
  • Country: Country Flag

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 theme

When 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://windows7theme...oup-policy.html


Edited by MrJinje, 29 September 2013 - 11:06 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN