Jump to content

Recommended Posts

Posted

I'm trying to create an ADM template which alters this key:

 

HKCU: Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop

Keyname: NoChangingWallpaper (which has a value of either 0 or 1)

 

So far, I've kinda muddled through a few ADM tutorials and come up with this:

 

 

CLASS USER

CATEGORY "Desktop"

POLICY "Disable Set as Desktop Background in IE"

KEYNAME "Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop"

EXPLAIN "Disables the Set as Background option in IE Contextual Menu"

VALUENAME "NoChangingWallpaper"

VALUEON NUMERIC 0

VALUEOFF NUMERIC 1

END POLICY

END CATEGORY

 

But when I try to create a .POL in the system policy editor, it says there are errors. So i'm going badly wrong somewhere.

Anyone able to see where?

Posted

According to Microsoft's Group Policy Settings Reference spreadsheet for Windows Server 2003, there's already a 'NoChangingWallPaper' policy. It's located in System.adm under User Configuration, Administrative Templates\Control Panel\Display. I imagine it's in the same loation for Windows XP/Vista/7/Server 2008 too.

 

Not sure why yours is not working, but perhaps that would be why?

  • Thanks 1
Posted (edited)

There is a PDF here which goes into the creation of ADMs quite well

http://www.edugeek.net/forums/windows-server-2000-2003/31197-guide-creating-custom-adm-files-gpo-distribution.html#post294502

 

Here is one which may be helpful as a template even though your one does look right

http://www.edugeek.net/forums/how-do-you-do/21118-add-favourites-start-menu.html#post207377

 

I am not quite sure that I understand your method though, the ADM file would be saved into the windows\inf directory of the machine that you are managing GP through and then added to the specifig GPO in the Group Policy editor. It should only propmpt you with errors when it is loading into the GP editor. It builds the .pol file when you actually change a setting on one of the avalible policy settings.

 

Edit: and Yea, as Authur has pointed out above that setting is already avalible in the builtin policies so I would just use that one. I really should have read the actual purpose of the key first so that I saw the duplication :doh:

Edited by SYNACK
  • Thanks 1
Posted

You see this is the problem I'm having,

 

We've disabled active desktop for many reasons, and we need to disable the 'set as desktop background' contextual option.

If I apply the already existing policy in, "User configuration\admin templates\desktop\prohibit changes etc... it doesn't grey out the option.

 

If however, I manually change the registry entry for 'nochangingwallpaper' it immediately greys out the option.

 

Its an odd one, one that I hoped to resolve by just adding it to group policy, but like you say if its a duplicate it can't be done.

 

I may just have to make a logon script to do it, that's probably a lot easier.

Posted
You see this is the problem I'm having,

 

We've disabled active desktop for many reasons, and we need to disable the 'set as desktop background' contextual option.

If I apply the already existing policy in, "User configuration\admin templates\desktop\prohibit changes etc... it doesn't grey out the option.

 

If however, I manually change the registry entry for 'nochangingwallpaper' it immediately greys out the option.

 

Its an odd one, one that I hoped to resolve by just adding it to group policy, but like you say if its a duplicate it can't be done.

 

I may just have to make a logon script to do it, that's probably a lot easier.

 

It doesn't grey out the option, but I believe if you click it, it comes up with a message saying this has been prevented due to restrictions in effect on this machine, or words to that effect.

 

I've always used VBS scripts to change registry keys that aren't in Group Policy, as I've never had any luck at all at creating a custom ADM file for Group policy management. Doing this change as part of a logon script is very easy, I'll post up the code if you want it.

 

Also if it's for your students and you run a mandatory profile, you could change this key in your mandatory profile instead of using a Group Policy.

 

Mike.

  • Thanks 1
Posted

Actually I'm pretty sure it does grey it out, i tested it a few days ago. Couldn't click it at all...

 

But if you would be so kind as to post that code I'd be very greatful. I'm really not a coder...still on batch files mainly. :o

Posted
If you install IE7 or IE8 Active Desktop no longer works. It looks as though it's something that Microsoft want to remove as it doesn't exist in Windows Vista and most probably Windows 7. Using BGInfo is an easy to use tool to set/control user desktop wallpapers. It can also display useful system information such as the Computer Name and IP etc...
Posted

Michael's correct about Active Desktop. It doesn't exist in Windows 7 (a good thing IMO).

 

Should you still need it, here's a VBScript that will modify that registry key.

 

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop\NoChangingWallpaper", 1, "REG_DWORD"

  • Thanks 1
Posted (edited)

Just knocked this up for you and tested it on my home machine, it appears to do what you need it to.

 

Const HKCU=&H80000001
Set oReg=GetObject("winmgmts:!root/default:StdRegProv")
oReg.CreateKey HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop"
oReg.SetDWORDValue HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop","NoChangingWallpaper",1

 

Save it as anything.VBS and add it as a logon script and it will change that registry key at logon. Please test it first, it is offered with no warranty or guarantee.

 

Mike

 

EDIT: Classic, two different ways of achieving the same thing Arthur!

Edited by maniac
  • Thanks 1
Posted

1. Edit the relevant registry key

2. Export the reg key to somewhere. (desktop)

3. Open reg2adm

4. Open reg key with reg2adm

5. Save the adm file

6. Move the adm to windows\system32\inf

7. Open GPMC and import the ADM to the appropriate GPO.

8. Deploy to test machine

 

BoX

Posted
tbh if you need to deploy reg keys just install the windows update "group policy preferences" on your clients and then you can just use the preferences section of GP (using vista/7/2008 GPMC) and put keys simply in there. I have been using GPP for ages now for power saving etc and it rocks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...