Author Topic: Run once  (Read 765 times)

  • Offline Pete

  • Posts: 5,155
  • Hero Member
Run once
on: March 27, 2007, 19:05:26 PM
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.

  • Offline bear

  • Rutabaga
  • Posts: 6,324
  • Global Moderator
  • Hero Member
Run once
Reply #1 on: March 27, 2007, 19:50:21 PM
Does it help to put the batch here ? :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

  • Offline Pete

  • Posts: 5,155
  • Hero Member
Re:Run once
Reply #2 on: March 27, 2007, 20:14:20 PM
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:

Quote

The 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!

Quote
Windows 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.

0 Members and 1 Guest are viewing this topic.