Jump to content

Quick scripting question


Guest Q(O_o)Q
 Share

Recommended Posts

Guest Q(O_o)Q

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 :)

Link to comment
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)

Link to comment
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!
Link to comment
Share on other sites

Guest Py7|-|[]/\/

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.

Link to comment
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?
Link to comment
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)

Link to comment
Share on other sites

Guest Py7|-|[]/\/

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|-|[]/\/
Link to comment
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)

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...