#148824 - 2005-09-29 04:43 PM
setwallpaper in citrix
|
Duke999
Fresh Scripter
Registered: 2005-09-20
Posts: 13
|
Hello Chaps, I'm having a problem with trying to set a default desktop wallpaper for citrix sessions. I have copied a bmp into the c:\windows folder on all citrix servers, allowed desktop wallpaper in the policies with in citrix and used this code in the script Setwallpaper ("c:windows\logo.bmp") = 0 This does not show the logo on the desktop but if you go into the display you see it as if it was there?. Do you have to use a bmp and if so does it have to be the size of the screen resolution?.
Thanks
|
|
Top
|
|
|
|
#148826 - 2005-09-29 06:01 PM
Re: setwallpaper in citrix
|
Duke999
Fresh Scripter
Registered: 2005-09-20
Posts: 13
|
Unfortunately the client wants a company wallpaper, I would prefer that they didn't but there you go. I thought the = 0 meant that it did not write back to the profile? Anyway I have tried it without and it doesn't work although it does say it is setting wallpaper. Does the bmp have to be the exact size of the screen res?, 1024x768?
Thanks
|
|
Top
|
|
|
|
#148828 - 2005-09-30 11:10 AM
Re: setwallpaper in citrix
|
Duke999
Fresh Scripter
Registered: 2005-09-20
Posts: 13
|
Cheers Mart, The bmp is a small logo that needs to be centered on the screen so it doesn't matter if the res is 800x600 or 1024x768. I have looked in the GPO and can not see a setting to force centre on screen, so can I do this via Kix?. Thanks Mark
|
|
Top
|
|
|
|
#148829 - 2005-09-30 11:52 AM
Re: setwallpaper in citrix
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
It's just a registry key, so you just need to add it to your ADM templates.
BTW, you can also put the logo into one of the corners. We've been putting a small BMP of the computername in the bottom right-hand corner of the screen since we first implemented Citrix.
As it happens we've got it implemented on the old farm in the login script, however I'd do it via group policy if I was re-implementing it today: Code:
$Result = WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","TileWallpaper","1568","REG_SZ") $Result = WriteValue("HKEY_CURRENT_USER\Control Panel\Colors","Background","0 0 0","REG_SZ") if Exist("$Netlogon\Graphics\%COMPUTERNAME%.bmp") $Result = SetWallpaper("$Netlogon\GRAPHICS\%COMPUTERNAME%.bmp") else $Result = SetWallpaper("") endif
Excuse the variables in strings it is a very old script from around September 2001
|
|
Top
|
|
|
|
#148831 - 2005-09-30 01:35 PM
Re: setwallpaper in citrix
|
Duke999
Fresh Scripter
Registered: 2005-09-20
Posts: 13
|
Thanks Richard, I have looked into setting it through group policy in Admin Templates\desktop\active desktop\active desktop wallpaper. This does say in the notes that it does not apply tpo terminal server sessions.
|
|
Top
|
|
|
|
#148832 - 2005-09-30 02:00 PM
Re: setwallpaper in citrix
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Oops - I didn't word my post very well.
The sample script is for doing it via KiXtart at login, not via GPO.
Quote:
I have looked into setting it through group policy in Admin Templates\desktop\active desktop\active desktop wallpaper. This does say in the notes that it does not apply tpo terminal server sessions.
Yes, but that is "active desktop wallpaper", not the standard wallpaper.
|
|
Top
|
|
|
|
#148833 - 2005-09-30 02:29 PM
Re: setwallpaper in citrix
|
Duke999
Fresh Scripter
Registered: 2005-09-20
Posts: 13
|
Thanks Richard, There doesn't seem to be anywhere in GP to set a desktop wallpaper apart from if you are using active desktop. I have tried this in the Kix (4.50), it changes the background colour but does not add the logo.bmp. It is 197kb in size if that makes a difference.
$Result = WriteValue("HKEY_CURRENT_USER\Control Panel\Desktop","TileWallpaper","1568","REG_SZ") $Result = WriteValue("HKEY_CURRENT_USER\Control Panel\Colors","Background","0 0 0","REG_SZ") if Exist("$Netlogon\logo.bmp") $Result = SetWallpaper("$Netlogon\logo.bmp") else $Result = SetWallpaper("") endif
|
|
Top
|
|
|
|
#148834 - 2005-09-30 03:00 PM
Re: setwallpaper in citrix
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
There doesn't seem to be anywhere in GP to set a desktop wallpaper apart from if you are using active desktop.
You can create the policy yourself in your ADM template file which will then allow you to use it in GP - it is a simple reg hack, so just copy and paste one of the existing entries.
Quote:
I have tried this in the Kix (4.50), it changes the background colour but does not add the logo.bmp. It is 197kb in size if that makes a difference.
Check the result code after SetWallPaper(). Also it might require a restart of explorer (log out and in again or kill the explorer.exe process)
Quote:
It is 197kb in size if that makes a difference
Good heavens! That's large! I'd get that into a decent paint program and start reducing the palette size.
|
|
Top
|
|
|
|
#148835 - 2005-09-30 03:24 PM
Re: setwallpaper in citrix
|
Duke999
Fresh Scripter
Registered: 2005-09-20
Posts: 13
|
Cheers Richard, I'll look into the adm and bmp size over the weekend and see if i can get the thing to work. I've been used to scriptlogic at my old place which takes out all the effort of creating scripts. much easier but maybe not as much fun(when it works)
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 774 anonymous users online.
|
|
|