Sign in to follow this  
Followers 0
Guest Q(O_o)Q

Quick scripting question

13 posts in this topic

I need help just making sure that the script starts up on my friends computer every time. He's not smart :) , so i need to make him a script that will do it for him. Please help :)

Share this post


Link to post
Share on other sites



Okay first of this should be in the support section. Secondly I would read the manual and see that you can do it with the registry.

Now here is your code.

;Set program to be run on startup
If Not(RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "YourFileHere.ext")) Then
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "YourFileHere.ext", "REG_SZ", @ScriptFullPath)
EndIF

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

You could put this code at the beginning of your script. After the first time the script it run, it will always run at startup....

If Not FileExists(@StartupDir & "\AutoIt_Script.lnk") Then
   FileCreateShortcut(@ScriptFullPath, @StartupDir & "\AutoIt_Script.lnk")
EndIf

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Compile your .au3 file then put it into your Startup folder...

Share this post


Link to post
Share on other sites

I never even read the first post, but now I did. If you really want to force a shutdown on his computer whenever it starts then you should have it create a ini file and save it as a .au3, then compile it, then save it to the startup folder, now that would be neat. I did that on my brother's computer, and it really pissed him off.

Share this post


Link to post
Share on other sites

You can also set your script up to run as a service with the following utility:

http://www.pirmasoft.com/runassvc.php

That way, even before the icons come up, the system would already be shutting down. :)


Who else would I be?

Share this post


Link to post
Share on other sites

This thread is just too virus like for me, having folks edit thier registry, services, and startup folders to autostart up a destructive program.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Well, the reason I have the above program is to allow winamp to run on my home sys when I am not logged in (security breach, impending doom :)). I also happen to know the value of a good practical joke, if the joke does not linger on too long.


Who else would I be?

Share this post


Link to post
Share on other sites

The original guy never said anything like he was going to shut his friends computer down. Read it that came out of Python's mouth. I use that registry deal to make the programs that I script always run. That way it is transparent to the user.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

The original guy never said anything like he was going to shut his friends computer down. Read it that came out of Python's mouth. I use that registry deal to make the programs that I script always run. That way it is transparent to the user.

JS

Before my post...

ahhh, the things we do for our "friends"...

That was said by Larry before me. Interesting isn't it?

Edited by Py7|-|[]/\/

Share this post


Link to post
Share on other sites

Yes... I took it differently :-P, but I suppose it could be taken both ways.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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