Sysinternals Homepage
Forum Home Forum Home > Sysinternals Utilities > BgInfo
  New Posts New Posts RSS Feed: BGINFO - Server 2003 - Remote Desktop
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

BGINFO - Server 2003 - Remote Desktop

 Post Reply Post Reply Page  12>
Author
Message Reverse Sort Order
shocko View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2008
Location: Ireland
Online Status: Offline
Posts: 36
Post Options Post Options   Quote shocko Quote  Post ReplyReply Direct Link To This Post Topic: BGINFO - Server 2003 - Remote Desktop
    Posted: 23 December 2008 at 1:54pm
OK, got it sorted. I think the problem was the combination of the /all switch and the desktops settings in my Servers.bgi file.

I ran a task every 10 mins that used the /all switch and the .bgi file used for that task specified that all desktops should be updated. I think whats happens then is that the bginfo.exe will try and update the default users profile for every loggon on user. This will only work if the logged on user is an admin hence the reason i'm seeing differing results on different servers!

What i did was create 2 .bgi files.

Default_User   - Specifies that only the console logon/terminal services logon should be updated.

Servers.bgi     - Specifies that only the users desktop should be updated but is run with the all switch

i know have exactly what i need:

1) A task that run periodically and ensures that all users see the most current data

2) A task that runs and updates a users dektops immediately on logon

3) A task that ensures the logon backgrounds are managed.

All these 'tasks' were acompllshed buy running a single task in the scheduled tasks. I simply run a batch file that runs bginfo twice.

If anyone needs full details of what i did or the scripts i used i'll post them here!
Back to Top
shocko View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2008
Location: Ireland
Online Status: Offline
Posts: 36
Post Options Post Options   Quote shocko Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2008 at 1:15pm
ok, i ran the task again using psexec -s \\<servername>schtasks.exe /run /tn BGInfo_Refresh and had regmon running while it executed.

I can see that bginfo initally sets the key HKU\.Default\.....\Wallpaper to the appropriate path in the default users profile but then a couple of operations later it sets it to be in the path of one of the currently logged on users!

Wierd. I'll keep investigating
Back to Top
shocko View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2008
Location: Ireland
Online Status: Offline
Posts: 36
Post Options Post Options   Quote shocko Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2008 at 1:03pm
I wondering if anyone has decompossed the app to see how it works with the /all switch. I have set the .bgi file to update all wallpapers for all logged in users and also the console/terminal services logon background and look for the bitmap in %USERPROFILE%\Local Settings\Application Data\Winternals\BGInfo\BGinfo.bmp. From what i can tell this should mean that when bginfo.exe runs this .bgi file (as the system account) it should set the profile for default user to C:\Documents and Settings\Default User\Local Settings\Application Data\Winternals\BGInfo\BGinfo.bm

Strange that it works on some servers but not on others! Driving me mad as i cant seem to troble shoot it at all!
Back to Top
shocko View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2008
Location: Ireland
Online Status: Offline
Posts: 36
Post Options Post Options   Quote shocko Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2008 at 4:42pm
ran psexec -s cmd /c set on 2 systems

1 that was working as expected and 1 that wasn't

Both show that the system accoutn sess %userprofile% as c:\documents and settings\Default User
Back to Top
molotov View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 04 October 2006
Online Status: Offline
Posts: 17492
Post Options Post Options   Quote molotov Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2008 at 4:30pm
Double-check that the .bgi file being used on the systems where the behavior is not as desired is the same as the one being used on the systems where it works as desired.  Also ensure that the scheduled task is set up properly; if necessary, change the launched application to be a batch file that echos / logs various environment variables that seem to be at play (%USERPROFILE%, for example); see if they are set as expected.

You might also consider comparing Process Monitor captures taken from a system that behaves as expected and a system that doesn't, taken while the scheduled task runs...
Daily affirmation:
net helpmsg 4006
Back to Top
shocko View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2008
Location: Ireland
Online Status: Offline
Posts: 36
Post Options Post Options   Quote shocko Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2008 at 4:23pm
Yes, basically here is my current setup (i have altered it slightly from the script i provided earlier.)

I have on each server a scheduled task that runs every 10 mins under the local system account. This tasl uses the all switch to update all logged on users wallpapers every 10 mins so if certain reg keys change (which they do within this interval) the desktop gets the update information. The gile used for this is Servers.bgi

Also, this task is set to update all 3 destop wallpapers i.e.e the users/terminal serveices/console login.

I also added a key to the Run registry key to run a file called Server_User.bgi every time a user logs on. This means that when a user logs on the get the latest info on their desktop and dont have to wait until the next refresh interval. The file Server_user.bgi is a clone of Servers.bgi but it is only set to update the current users desktop as a normal user will not have permssion to update the HKU\Default hive and anyways, they shouldn't be setting global logn wallpapers ;)

The problem is, when the scheduled task runs it doesn't (on only some servers!!!) set the registry key HKEY_USERS\.DEFAULT\Control Panel\Desktop\Wallpaper to C:\Documents and Settings\Default User\Local Settings\Application Data\Winternals\BGInfo\BGInfo.bmp

On some of my other servers it does! Weird. They are all using the same OS/patching levels and all in the same OU in active directory.

I cant figure out why this is happening.

If i log on as an admin and run the task manually (on one of the servers that isn't working) it sets the reg key to
C:\Documents and Settings\<user who ran the task>\Local Settings\Application Data\Winternals\BGInfo\BGInfo.bmp

where <user who ran the task> is the logon name of the user. I presume it does this because the %USERPROFILE% was specified in the Server.bgi file as the location to create the bginfo.bmp in.

Whats strange is if i log onto one of the servers that IS working and set the wallpaper for the default user to (none) and run the task manually it sets the reg key to C:\Documents and Settings\Default User\Local Settings\Application Data\Winternals\BGInfo\BGInfo.bmp which is exactly what i want.

Any ides would be much appreciated
Back to Top
molotov View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 04 October 2006
Online Status: Offline
Posts: 17492
Post Options Post Options   Quote molotov Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2008 at 1:45pm
Does the value of [HKEY_USERS\.DEFAULT\Control Panel\Deskto\Wallpaper] point to an unexpected location?
Daily affirmation:
net helpmsg 4006
Back to Top
shocko View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2008
Location: Ireland
Online Status: Offline
Posts: 36
Post Options Post Options   Quote shocko Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2008 at 12:03pm
PS: meant to say that i'd prefer if the default profile pointed to c:\documents and settings \default user\Local Settings\Application Data\WINTERNALS\BGInfo\BGInfo.bmp
Back to Top
shocko View Drop Down
Newbie
Newbie
Avatar

Joined: 17 December 2008
Location: Ireland
Online Status: Offline
Posts: 36
Post Options Post Options   Quote shocko Quote  Post ReplyReply Direct Link To This Post Posted: 22 December 2008 at 11:50am
Hey guys,
Just noticed a little problem with all this. Scheduled task runnning fine but the problem is is that the defaut porfile in the registry has it wallpaper pointed to on eof the profiles of currently logged on users!!?? This happens it appears because i have set the location of the .bmp file in the Servers.bgi file to be %USERPROFILE%\Local Settings|application data. As the scheduled task is running under the system account, perhaps this is the issue??
Back to Top
molotov View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 04 October 2006
Online Status: Offline
Posts: 17492
Post Options Post Options   Quote molotov Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2008 at 1:31pm
Thanks for sharing your script, shocko! Smile
Daily affirmation:
net helpmsg 4006
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down