Sign in to follow this  
Followers 0
Vladi243

Run on startup

11 posts in this topic

I want to make the script run on startup by writing in the registry by the function RegWrite().

What's the keyname of "run on startup"?

Share this post


Link to post
Share on other sites



RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RUN", "MyProgram","REG_SZ", "C:\Directory\program.exe")


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

The last parameter is the directory of the script?

Share this post


Link to post
Share on other sites

sure

Share this post


Link to post
Share on other sites

The last parameter is the directory of the script?

sure

mmm.. not so sure.

The last parameter is the fully qualified path and program name to be ran at startup but I would have thought the example is pretty clear. :)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

If I write it: @ScriptFullPath & ".exe"

Is it be OK?

Share this post


Link to post
Share on other sites

If I write it: @ScriptFullPath & ".exe"

Is it be OK?

No because if you write @ScriptFullpath extension will be include so you don't have to add ".exe"


No-life of autoit...what could be better ?LAST SCRIPTS WITH AUTO-IT : CLICK HERE

Share this post


Link to post
Share on other sites

These type of querstions could be answered without asking.

Just test it yourself by using a MSGBOX() to display the result.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

You can find a lot of information by looking at the Online Documentation

You can find exactly what you are looking for here RegWrite

By using the information that you have gotten in the replies and the Help files you should have no problems with the startup.

Jos gave a prime example as is.

Edited by DVHRLD

AutoViewer first public AutoIt script

Share this post


Link to post
Share on other sites

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RUN", "MyProgram","REG_SZ", "C:\Directory\program.exe")
Hello !

I have a scrpt and It don't run at startup. I don't know why ! My script using function Inetget().

Share this post


Link to post
Share on other sites

Hello !

I have a scrpt and It don't run at startup. I don't know why ! My script using function Inetget().

It's really hard to know why something does not work unless we can see some code.

Inetget() downloads a file from the net. It is the file that you are trying to run @ startup? And if so is an exe or a zip? Is the path to the downloaded file correct when you try to run it? Most of the questions you are going to be asked could easily be answered if we could see the code.

Also.. you should really start your own thread instead of adding to an old one.

Kerros


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
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
Sign in to follow this  
Followers 0