Sign in to follow this  
Followers 0
Infinitex0

Is there a way to activate a script on startup

13 posts in this topic

Is there a way to activate a script on startup without having to click it? Also is this possible to do when certain conditions are met to just activate a script??? o:);):lmao:


The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Share this post


Link to post
Share on other sites



Is there a way to activate a script on startup without having to click it? Also is this possible to do when certain conditions are met to just activate a script??? o:);):lmao:

To activate a script at startup just compile it and copy it into your 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

Is there a way to activate a script on startup without having to click it? Also is this possible to do when certain conditions are met to just activate a script??? :lol:o:):lmao:

Ummm... ;)

Put it in the StartUp folder for either the username or All Users?

In the second question, what kind of conditions are you talking about? :king:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I would build the conditions into the script itself and toss a key in HKLM\Software\Microsoft\Windows\Currentversion\Run

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I'm pretty new to AutoIt so this proberly not the best way, it is part of a larger function, triggered by a user interface option to turn autostart off & on...

FileCreateShortcut(@ScriptDir & "\your_application.exe", $gDrive & ":\Documents and Settings\All Users\Start Menu\Programs\Startup\your_application.lnk")

;$gDrive is a varible of the drive letter just incase they don't use C
;your_application is the name of your Autoit script

I'd like to change 'All Users' to the logged in user name, but I don't know how to detect the systems logged in username. In my case it is for dedicated game servers so I did'nt worry about it, but you may need to find a way of getting username.

Edited by cyanidemonkey

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

The following little script shows you the current user's profile address.

Opt("ExpandEnvStrings",1)

MsgBox(0."User Path","The current user's profile is at %UserProfile%",0)

Edited by SlimJim

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

That script didn't work. :lmao:;)o:)

nevermind, there was just a peirod where a comma should have been

Edited by Infinitex0

The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Share this post


Link to post
Share on other sites

Okay, I used that script and went to the address that I got from it. What do I do now.


The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Use cyanidemonkey's script but with the

$gDrive & ":\Documents and Settings\All Users

part replaced by

%UserProfile%.

You need the line

Opt("ExpandEnvStrings",1)

to ensure that the %UserProfile% environment string is expanded to a path which can be used.

(apologies for the full stop instead of a comma)

Edited by SlimJim

Share this post


Link to post
Share on other sites

Use cyanidemonkey's script but with the

$gDrive & ":\Documents and Settings\All Users

part replaced by

%UserProfile%.

You need the line

Opt("ExpandEnvStrings",1)

to ensure that the %UserProfile% environment string is expanded to a path which can be used.

(apologies for the full stop instead of a comma)

or you could use the @StartupDir macro in its place ?

FileCreateShortcut(@ScriptDir & "\your_application.exe", @StartupDir & "\your_application.lnk")

Share this post


Link to post
Share on other sites

We learn more each day. I had not come across those.

Share this post


Link to post
Share on other sites

Okay, I got everything working just as I need it.

THANK YOU :lmao:


The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Share this post


Link to post
Share on other sites

or you could use the @StartupDir macro in its place ?

FileCreateShortcut(@ScriptDir & "\your_application.exe", @StartupDir & "\your_application.lnk")
Niiicccee, I'll be udating my code with that tonight :lmao:

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator

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