VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Create or Delete an autorun for your program in the registry with one line of code for each (using

by Vincent Viau (2 Submissions)
Category: Registry
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 18th July 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Create or Delete an autorun for your program in the registry with one line of code for each (using shell and command prompt)!

Rate Create or Delete an autorun for your program in the registry with one line of code for each (using



'To create autorun
'Where autorunapp is the name of the value. You can replace it to anything, but dont put spaces
a = Shell("cmd.exe /c reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v AutorunApp /t REG_SZ /d """ & App.Path & "\" & App.EXEName & ".exe"" /f", 0)

'To remove autorun
'Where autorunapp is the name of the value. You can replace it to anything, but dont put spaces
a = Shell("cmd.exe /c reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v AutorunApp /f", 0)

Download this snippet    Add to My Saved Code

Create or Delete an autorun for your program in the registry with one line of code for each (using Comments

No comments have been posted about Create or Delete an autorun for your program in the registry with one line of code for each (using . Why not be the first to post a comment about Create or Delete an autorun for your program in the registry with one line of code for each (using .

Post your comment

Subject:
Message:
0/1000 characters