Questions

permanent desktop background

Tags:
+
0 Votes
Locked

permanent desktop background

niall
Users keep changing the desktop backgrounds at work and this is something I've been instructed to stop :) We run a central windows 2003 server, with XP Pro clients. Some of the clients are in our domain, but the majority are not. Can I set/lock the desktop background picture from a central administrative point? I'd be curious to hear some different solutions, thanks a lot

- n.
  • +
    0 Votes
    CharlieSpencer

    If they were all on the domain you could use a group policy. Since they aren't, ...

    Desk.CPL is the Control Panel applet that controls the display settings. Set the background you want. Set the user rights on the background as read-only and remove their rights from Desk.CPL

    +
    0 Votes
    niall

    Where do I find Desk.CPL? I am running a swedish version of windows, perhaps it is called something else...

    +
    0 Votes
    Why Me Worry?

    I'll assume you don't use roaming user profiles, but nevertheless, you can go to every machine and rename the ntuser.dat file to ntuser.man to prevent any changes to the user profile from saving. This is a long workaround to the problem, but it's the only viable option I see so far until you join the machines to the domain and use GPOs' to lock down the desktops.

    +
    0 Votes
    niall

    I don't really want to lock the users out of other features, and the posted solutions might do this. (I dont really want to lock them down to a single desktop picture either, but that's what the boss wants!)

    Could I have a logon script replace the desktop every time they log in, that might annoy them into not changing it.. a brief pointer on how to get started with such a script would be very welcome, I'm still quite new to some of these administrative tasks.

    +
    0 Votes
    akdaga

    Below is the script to change your desktop wallpaper. You just need to modify the script to point to the location where the wallpaper is located.

    You can then include this script in your Domain's Group Policy's login or startup script.

    Hope this helps.

    -----------------------------------------

    dim wshShell
    dim sUserName

    Set wshShell = WScript.CreateObject("WScript.Shell")
    sUserName = wshShell.ExpandEnvironmentStrings("%USERNAME%")

    Set oShell = CreateObject("WScript.Shell")
    Set oFSO = CreateObject("Scripting.FileSystemObject")

    sWinDir = oFSO.GetSpecialFolder(0)
    sWallPaper = "c:\IMGP0816.bmp"

    ' update in registry
    oShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", sWallPaper

    ' let the system know about the change
    oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True
    ------------------------------------------

    +
    0 Votes
    niall

    This script seems to do what I am after, thanks a lot! However I have two small questions left... does it only work with .bmp files, and where am I supposed to put the file so it runs at logon?

    Thanks in advance,
    - niall

    +
    0 Votes
    Fireslash

    for starters, the script only works once after being executed, so if someone else changes the wallpaper afterwards, you would have to execute the script again

    if you want it to be a permanent script, you have to run it at startup, or run a different script at startup to invoke your script every time someone tries to change the wallpaper, and set it up to loop indefinitely

    here's how I did it:

    1st I made a script based on one I found online:

    Sub Run(ByVal sFile)
    Dim shell

    Set shell = CreateObject("WScript.Shell")
    shell.Run Chr(34) & sFile & Chr(34), 1, false
    Set shell = Nothing
    End Sub

    const HKEY_CURRENT_USER = &H80000001
    strComputer = "."

    Do While true
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
    strComputer & "\root\default:StdRegProv")

    strKeyPath = "Control Panel\Desktop"
    strValueName = "Wallpaper"
    oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

    if strValue <> "C:\Private\Wallpaper1.bmp" then
    'change that to whatever file and location you got for your own wallpaper
    Run "C:\Private\wp.vbs"
    'change that last line to whatever is your script's name and location
    end if

    Loop

    2nd, I opened the registry editor (run Regedit) and then went to HKEY_CURRENT_USER\Software\Windows\CurrentVersion\Run

    I added a new String value (call it whatever you want), and as the value I typed the full filename of your script (example: C:\Private\wpmonitor.vbs).

    Follow the steps above, restart the session, and enjoy! :)

    3rd, sadly, you can only change your wallpaper directly to a bmp file using this script (when you do it through the Display Settings menu, Windows does the conversion for you)... there must be a workaround somewhere but I haven't gone in-depth there yet

    +
    0 Votes
    shhite

    We lock down the desk top in a group policy.

    Here is how.

    Start and Run and type gpedit.msc.

    In the group policies windows go to administrative templates - control panal - display. Click on the actual display folder and then double click on the first three options and enable each one. The first three options are 'remove display from control panel, hide display tab, and prevent changing wallpaper.

    Shanon

    +
    0 Votes

    See this topic for making the desktop permanent and blocking all ways around it.

    http://techrepublic.com.com/5208-6230-0.html?forumID=102&threadID=276764&start=0

  • +
    0 Votes
    CharlieSpencer

    If they were all on the domain you could use a group policy. Since they aren't, ...

    Desk.CPL is the Control Panel applet that controls the display settings. Set the background you want. Set the user rights on the background as read-only and remove their rights from Desk.CPL

    +
    0 Votes
    niall

    Where do I find Desk.CPL? I am running a swedish version of windows, perhaps it is called something else...

    +
    0 Votes
    Why Me Worry?

    I'll assume you don't use roaming user profiles, but nevertheless, you can go to every machine and rename the ntuser.dat file to ntuser.man to prevent any changes to the user profile from saving. This is a long workaround to the problem, but it's the only viable option I see so far until you join the machines to the domain and use GPOs' to lock down the desktops.

    +
    0 Votes
    niall

    I don't really want to lock the users out of other features, and the posted solutions might do this. (I dont really want to lock them down to a single desktop picture either, but that's what the boss wants!)

    Could I have a logon script replace the desktop every time they log in, that might annoy them into not changing it.. a brief pointer on how to get started with such a script would be very welcome, I'm still quite new to some of these administrative tasks.

    +
    0 Votes
    akdaga

    Below is the script to change your desktop wallpaper. You just need to modify the script to point to the location where the wallpaper is located.

    You can then include this script in your Domain's Group Policy's login or startup script.

    Hope this helps.

    -----------------------------------------

    dim wshShell
    dim sUserName

    Set wshShell = WScript.CreateObject("WScript.Shell")
    sUserName = wshShell.ExpandEnvironmentStrings("%USERNAME%")

    Set oShell = CreateObject("WScript.Shell")
    Set oFSO = CreateObject("Scripting.FileSystemObject")

    sWinDir = oFSO.GetSpecialFolder(0)
    sWallPaper = "c:\IMGP0816.bmp"

    ' update in registry
    oShell.RegWrite "HKCU\Control Panel\Desktop\Wallpaper", sWallPaper

    ' let the system know about the change
    oShell.Run "%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True
    ------------------------------------------

    +
    0 Votes
    niall

    This script seems to do what I am after, thanks a lot! However I have two small questions left... does it only work with .bmp files, and where am I supposed to put the file so it runs at logon?

    Thanks in advance,
    - niall

    +
    0 Votes
    Fireslash

    for starters, the script only works once after being executed, so if someone else changes the wallpaper afterwards, you would have to execute the script again

    if you want it to be a permanent script, you have to run it at startup, or run a different script at startup to invoke your script every time someone tries to change the wallpaper, and set it up to loop indefinitely

    here's how I did it:

    1st I made a script based on one I found online:

    Sub Run(ByVal sFile)
    Dim shell

    Set shell = CreateObject("WScript.Shell")
    shell.Run Chr(34) & sFile & Chr(34), 1, false
    Set shell = Nothing
    End Sub

    const HKEY_CURRENT_USER = &H80000001
    strComputer = "."

    Do While true
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
    strComputer & "\root\default:StdRegProv")

    strKeyPath = "Control Panel\Desktop"
    strValueName = "Wallpaper"
    oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

    if strValue <> "C:\Private\Wallpaper1.bmp" then
    'change that to whatever file and location you got for your own wallpaper
    Run "C:\Private\wp.vbs"
    'change that last line to whatever is your script's name and location
    end if

    Loop

    2nd, I opened the registry editor (run Regedit) and then went to HKEY_CURRENT_USER\Software\Windows\CurrentVersion\Run

    I added a new String value (call it whatever you want), and as the value I typed the full filename of your script (example: C:\Private\wpmonitor.vbs).

    Follow the steps above, restart the session, and enjoy! :)

    3rd, sadly, you can only change your wallpaper directly to a bmp file using this script (when you do it through the Display Settings menu, Windows does the conversion for you)... there must be a workaround somewhere but I haven't gone in-depth there yet

    +
    0 Votes
    shhite

    We lock down the desk top in a group policy.

    Here is how.

    Start and Run and type gpedit.msc.

    In the group policies windows go to administrative templates - control panal - display. Click on the actual display folder and then double click on the first three options and enable each one. The first three options are 'remove display from control panel, hide display tab, and prevent changing wallpaper.

    Shanon

    +
    0 Votes

    See this topic for making the desktop permanent and blocking all ways around it.

    http://techrepublic.com.com/5208-6230-0.html?forumID=102&threadID=276764&start=0