Page 1 of 1 1
Topic Options
#148824 - 2005-09-29 04:43 PM setwallpaper in citrix
Duke999 Offline
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
#148825 - 2005-09-29 04:50 PM Re: setwallpaper in citrix
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Citrix sessions should not have wallpapers... it is a waste of bandwidth.

What is the '= 0' on the end for? That is not proper KiX syntax.

Does the wallpaper show if you set it manually? It could be that it is disabled in the client settings.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#148826 - 2005-09-29 06:01 PM Re: setwallpaper in citrix
Duke999 Offline
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
#148827 - 2005-09-29 06:38 PM Re: setwallpaper in citrix
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
It doesn't have to be the exact size of the screen. Depending on the other settings it will stretch, tile or centre on the screen. First doing a screen resolution lookup and applying the proper sized wallpaper can prevent all this.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#148828 - 2005-09-30 11:10 AM Re: setwallpaper in citrix
Duke999 Offline
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 Offline
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
#148830 - 2005-09-30 01:09 PM Re: setwallpaper in citrix
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
It's user based setting in the registry.

For stretch: HKU\[SID goes here or write to HKCU]\Control Panel\Desktop\WallpaperStyle: "2"
For centre: HKU\[SID goes here or write to HKCU]\Control Panel\Desktop\WallpaperStyle: "0"
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#148831 - 2005-09-30 01:35 PM Re: setwallpaper in citrix
Duke999 Offline
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 Offline
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 Offline
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 Offline
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 Offline
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
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 820 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.065 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org