News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

Run once

Started by Pete, March 27, 2007, 19:05:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pete

I want a c:\batchfile.bat to run on a users first login and then not run on subsequent logins. I think the term is "run once" but I dunno.
I know sh*ts bad right now with all that starving bullsh*t and the dust storms and we are running out of french fries and burrito coverings.

bear

Does it help to put the batch here ? :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

Pete

Thanks, dont work though :(

Ive got:

c:\test.bat

and

test.reg, which is

HKLM,Software\Microsoft\Windows\CurrentVersion\RunOnce,"SilentApp",,"c:\test.bat"

but I get:

QuoteThe specified file is not a registry script.You can only import binary files from within the registry editor

Still missing something :(

Ah! need [  ] brackets :D  

edit:

hmmm, it went into the registry ok, but the batchfile didnt run  :?


Woo!

QuoteWindows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz170]

@="Mapped Drives"

"1"="test.bat"



Works :)

I know sh*ts bad right now with all that starving bullsh*t and the dust storms and we are running out of french fries and burrito coverings.