Sysinternals Homepage
Forum Home Forum Home > Sysinternals Utilities > BgInfo
  New Posts New Posts RSS Feed: Running from computer startup script
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Running from computer startup script

 Post Reply Post Reply
Author
Message
CharlieB View Drop Down
Newbie
Newbie
Avatar

Joined: 09 March 2006
Location: United Kingdom
Online Status: Offline
Posts: 1
Post Options Post Options   Quote CharlieB Quote  Post ReplyReply Direct Link To This Post Topic: Running from computer startup script
    Posted: 09 March 2006 at 7:43am

I want to run bginfo from a domain computer startup script so that the desktop for console or TS sessions is updated before anyone actually logs on. I have written and deployed a script but nothing happens - the script does run as I capture its output (including errors) to a file but there is no error from the bginfo command which is running with parameters "test.bgi /timer:0 /log:c:\bginfo.log /all". No bmp file gets created and there is no bginfo.log file. The script is running as system (verified via a "whoami /all" in my cmd file that calls bginfo) so should have permissions. If I logon as a domain admin and run the script directly from the SYSVOL chare, it works fine. If I give it a non-existent .bgi file as an argument, it also doesn't error which suggests it is not getting as far as trying to open the .bgi file specified as an argument.

Anyone got any ideas please? Obviously I can't filemon as the machine is starting up. I tried regmon but the Win2k3 server got stuck at boot until I disabled it unfortunately.

 

Back to Top
itrcb4 View Drop Down
Newbie
Newbie


Joined: 03 August 2006
Online Status: Offline
Posts: 5
Post Options Post Options   Quote itrcb4 Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2006 at 3:29pm

I 've ran into the same issue and my solution was:

1. Don't use the /all switch. 

2. Mod the registry HKLM/software/Microsoft/Windows/run and put in the command-line there.

That's it.

Back to Top
bundabrg View Drop Down
Newbie
Newbie


Joined: 16 September 2005
Location: Australia
Online Status: Offline
Posts: 18
Post Options Post Options   Quote bundabrg Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2006 at 11:36pm
Things to think of: -
 - Add group policy to run startup script visible

You could also try test run it as the SERVICE user which simulates a startup script somewhat by doing the following: -
  -> Start->Run->Cmd
  -> at {now+1 minute} /interactive cmd.exe

wait 1 minute. A cmd window will open, running as the 'SERVICE' user. Try run the script now and see if it works.


Back to Top
Duanem View Drop Down
Newbie
Newbie
Avatar

Joined: 12 October 2006
Online Status: Offline
Posts: 4
Post Options Post Options   Quote Duanem Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2006 at 8:03pm
why not just set it as a computer startup script in GP?
Back to Top
bundabrg View Drop Down
Newbie
Newbie


Joined: 16 September 2005
Location: Australia
Online Status: Offline
Posts: 18
Post Options Post Options   Quote bundabrg Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2006 at 9:45pm
He already is, but debugging a startup script is difficult if nothing actually happens ;-)

IE, you create a computer startup script, restart (or run gpupdate /force), and NOTHING happens. Did it run?

Also keep in mind that if you use bginfo (or indeed anything that changes the background), you WON'T see it happen to the main login screen right up like when you run it as a user. You need to restart (or login and then back out again) to refresh the background.

 - Bundabrg
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down