RunOnce Reg in XP

Hi All;

I have written a script that has to be run, before the explorer shell is loaded. So to do this i have written in teh batch routine to write a registry engtry to the ‘runonce’ key, to load the batch.
All our machines reboot nightly, but this key isn’t being actioned. The entry for the batch still exists in the registry, its like windows has been obmitted from actioning this key.

Does anyone have any ideas where to look to see what is stopping this key to run? Also the user account that automatically logs on is part of the administrator group, so i dont think it can be permissions.

Any pointers would be great!

Cheers all!:tiphat:

Just had a thaught, for the RunONce key to run, does the explorer shell has to be loaded? for we stop the shell loading… could this be it?

not sure but it should action before login irrelevant to the shell used.

note runonce resides as both a…

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce

and

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce

hmmm, problem is that i am deploying this under a different user account that is logging onto the computer, so using current user would be ‘difficult’ :stuck_out_tongue:

I don’t think that matters if i am reading your post right

The runonce only should run as long as it has admin rights

your post above hinted that the machines setup to auto login and is a member of the admin group therefore it should pick up the batchfile and run.

If scenarios is different and your talking admin while your tinkering but the runonce is expected to run for a non admin user, then it will not execute for std user.

Well the user account that auto logon is part of the admin group. But the applciation that deploys the registry entry ins’t.
It does write to the registry with no issues, for i can check it and see its done the correct thing.
On my pachine and on test machine, it works everytime, its jsut in a live environment it fails todo so.

Any group policy lockdowns in place on the remote machines ?

i.e. Local computer Policy / computer configuration / administration templates / system / Logon / do not proccess the run list ?

potentially getting in the way of it running.

Yea, i have been going through all that and nothing is being obvious.

Does it matter that im amending the Default Key and not adding a new key under it?Does the default key have to stay there untouched?

You should make a new key :nod:

RunOnce deletes the key data when executed anyway unless you add some prefix which then make it deleted after its executed.

Don’t ask me what the prefix is * or a ! you’d need to look it up on m$

If your intention is for this bat file to run everytime a machine starts then it should be put under Run - but if its a one time never to be executed again unless placed into an update then yes RunOnce is best place for it.

Your at the limit of my knowledge so if a new key don’t work I am uncertain what to suggest.

http://support.microsoft.com/kb/137367/EN-US/ Maybe you should review this from MS.

The batch file may need to be a script also…just a thought.

Thanks guys, i will have eto review all that and try again… will let you all know how i get on on monday.

Is this on a standalone workstation or on an Active Directory network?

Butuz

AD mate

it was because i was using the default key, added a seperate key and it works fine… thanks for all your help!