colin1964
(Lurker)
2006-05-30 11:33 AM
disabling show web content

I am currently running a kix script that deploys a legal notice, a corporate wallpaper and screensaver. The problem I am having is that the wallpaper is deployed but is hidden behind that set by the user if they have show web content active. If I disable this at the local machine the wallpaper is set. I have looked through the vast information on this site and come across this bit of script

$ = AddKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Policies\Explorer")

$ = WriteValue ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Policies\Explorer\", "NoSetActiveDesktop","1", "REG_SZ")


$ = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Policies\Explorer\", "NoFolderOptions","1", "REG_SZ")


$ = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\
CurrentVersion\Policies\Explorer\", "NoActiveDesktop","1", "REG_SZ")/font>

I added this to my Kix but would appear not to work. Have run gpupdate on test machine and then checked registry. HKLM is not showing the new settings in polices. can anyone suggest were I am going wrong. My systems are a split between 2000 and XP. Many thanks inappreciation


Mart
(KiX Supporter)
2006-05-30 11:39 AM
Re: disabling show web content

HKLM requires the user to have permission to write to that location. At least in Win2K and up (not sure about NT4) this is not set by default. A GPO can set active desktop to disabled so you will not have to change permission on the registry keys.

Oh... and welcome to the board.


Björn
(Korg Regular)
2006-05-30 11:42 AM
Re: disabling show web content

Hi and welcome! First off, when posting code, do a ([)code(]) this is my ([)/code(]) (without '(' and ')' ). Second, just using $ is not recommended, just go with something like.. urhm.. $wr =). Third, the part of the reg you're trying to alter is limited to administrators. Forth, what does /font> do at the last line?

Code:

$wr = AddKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")
$wr = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\","NoSetActiveDesktop","1","REG_SZ")
$wr = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\","NoFolderOptions","1","REG_SZ")
$wr = WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\","NoActiveDesktop","1","REG_SZ")



colin1964
(Lurker)
2006-05-30 11:53 AM
Re: disabling show web content

Sorry about the formating advice on future posts taken on board. The /font was actually from another bit of the script I inadvently copied have removed this. Will change $ to your recommendation of $wr and test again. Can I change reg settings through a Kix script or is this a bad idea

Mart
(KiX Supporter)
2006-05-30 12:21 PM
Re: disabling show web content

You could change registry permissions by using an external utility that is called by kix but using the GPO option is the way to go imho. There are lots of utilities to do this.

colin1964
(Lurker)
2006-05-30 12:27 PM
Re: disabling show web content

Have now run script on test machine having changed permissions, entries are being changed so thanks bjorn. Mart I will look at utilitiies and GPO to try and change the permissions all your help greatly appreciated.

Mart
(KiX Supporter)
2006-05-30 12:42 PM
Re: disabling show web content

GPO will not change the permissions but will do the settings for you because it runs on elevated permissions when comparing it to the permissions the user has.