Jump to content

Running commands on startup


Recommended Posts

Hey guys,

Do anyone know of the best way to force a dos command to run when windows starts that can be set or removed from AutoIt? I don't want this to be in the users face, so putting a bat file in the startup menu won't do. Can AutoIt add and remove items from boot.ini easily enough, or is there a simpler way?

Thanks,

Lee

Link to comment
Share on other sites

How about using the regitry ? fx.

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","mystringname""REG_SZ",@DesktopDir & "myscript.au")

this will make a script on ur desktop called myscript.au3 run every time u startup windows.

http://www.autoitscript.com/forum/index.php?showtopic=69911 <-- Best hacker ever :D

Link to comment
Share on other sites

How about using the regitry ? fx.

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","mystringname""REG_SZ",@DesktopDir & "myscript.au")

this will make a script on ur desktop called myscript.au3 run every time u startup windows.

Hi,

Thanks for that, but I don't want to run an AutoIt script at startup, but a series of DOS commands that are administered from an AutoIt app. I won't be registering AutoIt on the machine, but will use the dll locally, so I don't think the above is ideal. Can I alter that to run DOS commands?

Thanks,

Lee

Link to comment
Share on other sites

Hi,

Thanks for that, but I don't want to run an AutoIt script at startup, but a series of DOS commands that are administered from an AutoIt app. I won't be registering AutoIt on the machine, but will use the dll locally, so I don't think the above is ideal. Can I alter that to run DOS commands?

Thanks,

Lee

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"BAT.bat"="\"C:\\BAT.bat"

or

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"BAT"="\"C:\\BAT.bat"
Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

And ofcourse there's always the option to compile your AU3 scripts that run dos commands to executable files and put those exe files in the runkey. That way you still don't have to register AutoIt on the machine. You can even make it FileInstall() other files you need such as dll's. This all seems obvious however, so I might be missing some point here... ?

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...