Sign in to follow this  
Followers 0
dnsi

Startup Scripts

24 posts in this topic




I'm not that sure about this, but I *think* you can just create a shortcut in the "Startup" folder. I also would like an answer to this question so I can use it in one of my programs.

Share this post


Link to post
Share on other sites

Well, I guess you want the script to add itself in. This is what you can use.

RegWrite('HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'AddValueNameHere', 'Reg_sz', '"' & @ScriptFullPath & '"')

Share this post


Link to post
Share on other sites

or like jackyyll mentioned if you don't want to write to the registry put a shortcut here

C:\Documents and Settings\User or All Users\Start Menu\Programs\Startup

Share this post


Link to post
Share on other sites

Thanks guys. :think::(:)

careful with puting things in the startup folder, many virus protection programs will view things not know to them as trojans/virus's


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Well, I guess you want the script to add itself in. This is what you can use.

RegWrite('HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'AddValueNameHere', 'Reg_sz', '"' & @ScriptFullPath & '"')
can you give a example script thanks

Thanks in advance

Share this post


Link to post
Share on other sites

That is the example script.

Share this post


Link to post
Share on other sites

That is the example script.

so i just add it to my script, and you don't need runonce or run in order tell it how many times to do it,


Thanks in advance

Share this post


Link to post
Share on other sites

Give me a T (T!)

Give me an R (R!)

Give me a Y (Y!)

Give me an S (S!)

Give me an O (O!)

Give me an M (M!)

Give me an E (E!)

Give me a T (T!)

Give me an H (H!)

Give me an I (I!)

Give me an N (N!)

Give me a G (G!)

What's that spell?

TRY SOMETHING.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Give me a T (T!)

Give me an R (R!)

Give me a Y (Y!)

Give me an S (S!)

Give me an O (O!)

Give me an M (M!)

Give me an E (E!)

Give me a T (T!)

Give me an H (H!)

Give me an I (I!)

Give me an N (N!)

Give me a G (G!)

What's that spell?

TRY SOMETHING.

TRY SOMETHING

umm whats a tree stump, and i add the line to my script nothing Edited by Evil_Has_Survived

Thanks in advance

Share this post


Link to post
Share on other sites

umm whats a tree stump, and i add the line to my script nothing

You won't know if it does anything or not till you reboot/logon

just because you put in the registry in the run key, doesn't make it automagically run.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

You won't know if it does anything or not till you reboot/logon

just because you put in the registry in the run key, doesn't make it automagically run.

i did reboot didn't do nothing example of wat i did

RegWrite('HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'AddValueNameHere', 'Reg_sz', '"' & @ScriptFullPath & '"')
; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{TAB}", "Terminate")
HotKeySet("+!d", "ShowMessage");Shift-Alt-d

;;;; Body of program would go here;;;;
MsgBox(64, "Done.", "©2006 - John Matthews push shift-alt-d for help.")
While 1
If WinExists("Diablo II") Then
    HotKeySet("{Space}", "close")
Else
    ToolTip( "The game isn´t running!",0,0)
;Exit(0)
EndIf
    Sleep(100)
WEnd

;;;; Functions

Func Close()
    Send("!{F4}")
EndFunc

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        HotKeySet("{Space}")
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","©2006 - John Matthews help topic; 1 push tab to shut the script off... 2 push pause to turn the script on/off if on space = log out if off space = chat with out getting booted... 3 shift-alt-d for this help topic.")
EndFunc
Edited by Evil_Has_Survived

Thanks in advance

Share this post


Link to post
Share on other sites

you compiled it?

ran it one time so it would write the entry into the registry?

if so it should work next time you logon.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Also, When booting the computer/workstation in Safe Mode; Items in the ...\All Users\Programs\Startup folder do not execute. Same goes for the Registry Key ...\Run.

Share this post


Link to post
Share on other sites

Ave you change 'AddValueNameHere' ?

maybe stupid question but we dont know maybe ...

RegWrite('HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'AddValueNameHere', 'Reg_sz', '"' & @ScriptFullPath & '"')

Share this post


Link to post
Share on other sites

Did you check the registery key to see that it had actually been added?

Does your script do anything to prove that it has run? Like write a file or something?

Also I think that a Limited Used will not be able to run the items in the Run and RunOnce key, so if you're trying to use a limited user to test it with it won't work.

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