Sign in to follow this  
Followers 0
lopolop

Auto Running on Startup

12 posts in this topic

I was woundering if there was a way to automatically start my program allways... like even when i reboot my pc it is a startup program....


Share this post


Link to post
Share on other sites



I was woundering if there was a way to automatically start my program allways... like even when i reboot my pc it is a startup program....

Either add it to the run section of the registry or copy it into the startup folder


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

well how do i add it to the run part of the registry? i want it so when you run the program it will automatically make it start on startup


Share this post


Link to post
Share on other sites

i have no clue what to do now what value do i write or what next?


Share this post


Link to post
Share on other sites

i searched and i came up with a bunch of chinese sites..


Share this post


Link to post
Share on other sites

i have no clue what to do now what value do i write or what next?

If you do not understand the registry it is best that you do not mess with it. Use FileCopy and copy your program to the startup folder.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

well which start up folder? one thing is i have 2 hd's and i searched start up and more then one came up...

wait i think i got it...

regwrite("hklm\Software\Microsoft\Windows\CurrentVersion\Run\Autoitprog", "C:\Documents and Settings\user\Desktop\AutoIt Scripts\D2Logon.exe", "REG_SZ")

Edited by lopolop

Share this post


Link to post
Share on other sites

well which start up folder? one thing is i have 2 hd's and i searched start up and more then one came up...

@StartupCommonDir

Read the help file.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

well if you just adding it to the startup folder wouldnt it just be

FileCopy("FILE LOCATION YOU WANT TO ADD", "C:\Documents and Settings\NAME OF USER\Start Menu\Programs\Startup")

Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

how about this tho...

$ProgPath = "C:\Documents and Settings\user\Desktop\AutoIt Scripts\D2Logon.exe"

regwrite("hklm\Software\Microsoft\Windows\CurrentVersion\Run\Autoitprog", $ProgPath, "REG_SZ")

i got it from...

http://www.windowsdevcenter.com/pub/a/orei...artup_0401.html

[EDIT]

If $start_up = "Yes" Then
    FileCopy( @SCRIPTDIR, @StartupCommonDir )
    IniWrite ( "D2logon Info.ini", "Start", "St_StartUp", "Set" )
    Endif
    ElseIf
$start_up = "No" Then
    FileDelete( @StartupCommonDir & "\D2Logon.au3" )
    Endif
ElseIf
    $start_up = "Set" Then
EndIF

so this should work right? and also the \d2logon.au3 part will i have to change to *.exe if i plan to compile this...?

[edit]

ok that was way roung but i got it now thanks!

Edited by lopolop

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