[HELP] Startup[Solved]

Posts 19 of 9 · Page 1 of 1
[HELP] Startup[Solved]
how would i make my program run on startup???????
Code:
 My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).SetValue(Application.ProductName, Application.ExecutablePath)


This essentially adds it to startup using the registry.
nice thanks alot
now i need to copy a file and place it in another folder...how would i do that???
Code:
System.IO.File.Copy("source", "destination" [whether you want it overridden or not here in true or false])
Why not use:

[php]
Dim filename As String
Dim filepath As Object
Dim regiatrykey As Object

filename = ("NameHere.exe")
filepath = "C:\Path\file.exe"
regiatrykey = CreateObject("Wscript.shell")
regiatrykey.regwrite("HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Windows\CurrentVersion\Run\namehere.exe" , (filepath))[/php]
thanks but your copy/paste code was confusing loll..so i used this..
Code:
Dim File As String = "source"
Dim Copy As String = "destination"
 If System.IO.File.Exists(File) Then
   System.IO.File.Copy(File, Copy)
 ElseIf System.IO.File.Exists(Copy) Then

End If
So is this solved?
yeye solved
Okay.

Marking solved, don't post if >7 days old unless completely necessary.
Posts 19 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?