Registered: 1999-08-27
Posts: 192
Loc: Sydney, NSW, Australia
I've been experimenting with the following code (which doesn't work) and now I have got so close to it, "I can't see the wood for all the trees in the way!"
The client has designed two JPG files for each style of screen resolution within the organisation and wants me to push the wallpaper out to all workstations. He will periodically change the content of the wallpaper so it acts like a business phone directory on each user's desktop.
I have the UDF GetScreenRes() pasted at the end of the code and the variable $ScreenRes is populating correctly.
#190187 - 2008-10-2112:33 AMRe: Wallpaper with BGInfo
[Re: Ashpoint]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
So I guess the forest is completely out of the question, eh?
We use BGInfo pretty heavily, and the one thing I've found is that if you put the image in the Windows folder, it will get created by the first user to log on, and subsequent users will not have permission to change/update it. We use a BG config file on the netlogon share to update the image, which is stored in C:\Temp. We create C:\Temp with Auth-Users:Modify rights, so anyone can overwrite the file easily. We don't ever copy BGInfo.exe or the config file to the local PC - it runs directly from the Netlogon share. Finally, we define the wallpaper through GPO so the user can't modify it.
There's a bug in your code, too.. I'll see if I can't clean it up and post back.
Glenn
_________________________ Actually I am a Rocket Scientist!
Registered: 1999-08-27
Posts: 192
Loc: Sydney, NSW, Australia
Hi Glenn,
That didn't work for me but I think it's now my issue and believe that remnants of the old BGINFO stuff is still on the workstation causing issues. I'll disable the BgInfo stuff and experiment further.
It's late night here so I will give it another run tomorrow.
I'm confident your work has set me on the correct path.
As in the past when I have had (free) help such as yours, I have now sent an email and made a donation to the National Breast Cancer Foundation here in Sydney (Australia).
#190210 - 2008-10-2101:38 PMRe: Wallpaper with BGInfo
[Re: Mart]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
.JPG only works with the web-enabled desktop, which I've always avoided, and (thankfully) is not enabled by default. Not sure it's even there anymore in XP, since I've always ignored it.
My example code wasn't tested - I just found several inconsistencies in your original code - compare the two and see what's changed. Seemed like the vines and underbrush were attacking the trees.
I can post our BGI.kix when I get to the office today.
Glenn
_________________________ Actually I am a Rocket Scientist!
#190230 - 2008-10-2110:30 PMRe: Wallpaper with BGInfo
[Re: Mart]
NTDOCNTDOC Administrator
Registered: 2000-07-28
Posts: 11634
Loc: CA
That is the process that Windows actually uses for using a JPG image on the Desktop. It has a bitmap copy of the JPG file.
I did not document it myself but did track down how it actually operates a long time ago. I'm sure if you search enough you'll find the Microsoft documentation that explains the "path" of how it's done.
#190257 - 2008-10-2209:47 PMRe: Wallpaper with BGInfo
[Re: Ashpoint]
Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
ZZZzzzz... eh - what?? huh? Oh.. sorry!
Actually, I don't have a kix script, as it turns out. My login script calls a bat file to run the BGInfo.
Code:
@Echo off
If Exist %WINDIR%\BGInfo.bmp Del %WINDIR%\BGInfo.bmp
\\ad.domain\netlogon\BGI\BGInfo.exe /timer:0 /i\\ad.domain\NetLogon\BGI\NetClient.bgi
The If Exist is there just to remove the old backgrounds, and is not really required. The settings in NetClient.bgi are just the basics - username, hostname, IP, OS/SP, Boot time, and disk labels/sizes. We do specify a fixed color, which matches the bgcolor defined in our GPO.
Of course, you could Shell this from Kix pretty easily. My login script is generic, and calls external commands - there was no point for me to use a Kix script simply to shell this executable, so I opted for the bat file, which allowed me to remove the old BG image at the same time.
Glenn
_________________________ Actually I am a Rocket Scientist!