View previous topic :: View next topic |
Author |
Message |
InAt!QuE Apprentice


Joined: 02 Jan 2004 Posts: 257 Location: The Netherlands
|
Posted: Wed Feb 13, 2008 11:01 am Post subject: Force Wallpapers using Samba |
|
|
Hi All,
I have a Samba PDC and I want all workstations (XP Pro & W2K Pro) to use the same wallpaper.
Is there a way in Samba to force the clients to use a specific wallpaper?
Or do I have to use the logon script for this? _________________ ...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly). |
|
Back to top |
|
 |
nobspangle Veteran


Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Wed Feb 13, 2008 11:08 pm Post subject: |
|
|
I think Windows system policy will allow you to stop people from changing the wallpaper but I don't think you can force a particular wallpaper. Sounds like a logon script may be your best bet. |
|
Back to top |
|
 |
daschapa Tux's lil' helper


Joined: 01 Sep 2006 Posts: 80
|
Posted: Thu Feb 14, 2008 12:31 am Post subject: |
|
|
I think SMB is more like something like NFS and CUPS together (note that it is not really an implementation of both, but a completely different protocol).
To force a wallpaper yo can make a script which runs every 1 minute (a half of the average windows bootup time, LOL) and detects a host when it connects to samba network, then rub a ssh script to fix its wallpaper. _________________ ====================== |
|
Back to top |
|
 |
tomushu n00b

Joined: 14 Feb 2008 Posts: 1
|
Posted: Thu Feb 14, 2008 10:53 am Post subject: |
|
|
I'm using this configuration to force wallpaper on users profiles.
smb.conf.
Code: |
logon script = logon.bat
[netlogon]
path = /home/netlogon/
browseable = No
read only = yes
|
In /home/netlogon directory i'm having this scripts:
logon.bat
Code: |
\\ip_address_of_pdc\netlogon\wall.vbs
|
In the wall.vbs i have this code:
Code: |
' Create the variables needed
Dim WSHShell
Dim strRegKey
Dim strWallpaper
Dim strDesktop
Set shell = CreateObject("WScript.Shell")
Set env = shell.Environment("process")
userpath = env("USERPROFILE")
' msgbox userpath
' Create the Wscript Shell object
Set WSHShell = WScript.CreateObject("WScript.Shell")
' Define the wallpaper
strWallpaper = userpath & "\wall.bmp"
strDesktop = WSHShell.SpecialFolders("Desktop")
' Create the wallpaper key
'strRegKey = "HKEY_CURRENT_USER\"
'strRegKey = strRegKey & "Software\"
'strRegKey = strRegKey & "Microsoft\"
'strRegKey = strRegKey & "Internet Explorer\"
'strRegKey = strRegKey & "Desktop\"
'strRegKey = strRegKey & "General\"
'strRegKey = strRegKey & "Wallpaper"
strRegKey = "HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper"
' msgbox strRegKey
' msgbox strWallpaper
' Write the key, type, and value
WSHShell.RegWrite strRegKey, strWallpaper, "REG_EXPAND_SZ"
' Refresh the desktop now.
WSHShell.AppActivate strDesktop
WSHShell.SendKeys "{F5}"
'Quit
Wscript.quit(0)
|
This should be all that u need for u to set the wallpaper on your profile users.
Good luck |
|
Back to top |
|
 |
InAt!QuE Apprentice


Joined: 02 Jan 2004 Posts: 257 Location: The Netherlands
|
Posted: Thu Feb 14, 2008 8:05 pm Post subject: |
|
|
Where do I have to put the wallpaper?
I already tried it with a logon script;
Code: | :: Configure Wallpaper
REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "%SystemRoot%\wallpaper.bmp"
REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 0
REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 2
:: Configure the screen saver.
REG ADD "HKCU\Control Panel\Desktop" /V SCRNSAVE.EXE /T REG_SZ /F /D "%SystemRoot%\System32\scrnsave.scr"
REG ADD "HKCU\Control Panel\Desktop" /V ScreenSaveActive /T REG_SZ /F /D 1
:: Set the time out to 900 seconds (15 minutes).
REG ADD "HKCU\Control Panel\Desktop" /V ScreenSaveTimeOut /T REG_SZ /F /D 900
:: Set the On resume, password protect box
REG ADD "HKCU\Control Panel\Desktop" /V ScreenSaverIsSecure /T REG_SZ /F /D 1
:: Remove the user's ability to see the Screen Saver, background, and appearance tabs of Display Properties.
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /V NoDispScrSavPage /T REG_DWORD /F /D 1
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /V NoDispBackgroundPage /T REG_DWORD /F /D 1
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System" /V NoDispAppearancePage /T REG_DWORD /F /D 1
:: Make the changes effective immediately
%SystemRoot%\System32\RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters |
But as you see, like here I was not sure where to copy so I tried at the workstation in the windows folder. ("%SystemRoot%\wallpaper.bmp")
This worked but I don't want to copy the wallpaper to all workstations. This is a lot of work. I geuss it should be easier.
So I tried to copy the wallpaper.bmp to the netlogon directory.
I changed the first line at the script to;
Code: | REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D [b]"wallpaper.bmp"[/b] |
And it worked but there is one problem.
It works well if you wallpaper.bmp is at a size of +/- <1,3mb
After I made a new wallpaper.bmp it had a size of 3mb and after logged into the workstation I got a white screen.
I geuss this is again some weird M$ peeps!
But will the vbs script cover this?? _________________ ...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and the Ugly). |
|
Back to top |
|
 |
|