Auto Start in vb exe file

Solved/Closed
saranya - Oct 28, 2008 at 12:47 AM
 waseem - Sep 3, 2010 at 02:41 AM
Hello,

I want full details for how to activate auto start in vb. In this option passible for wincc, but I can't execute in vb.

Pls help me

9 replies

To automatically start a program on the start up we need to add a registry value. so open run from the start menu and enter regedit the select the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
then in the string table add a new string value. for that right click and select the string value then in the string data type the path of your program that is to be open at the start up. click ok then restart your computer then that file automatically starts after login
15
Very good solution.
THanks............
0
You could create a scheduled task to run your app. But im guessing you want this to happen for users automatically?

well I have always used the answer in Tuntu's reply and found this the best way I have a included a vb example below

Imports Microsoft.Win32


Private Sub AddCurrentKey(ByVal name As String, ByVal path As String)
Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
key.SetValue(name, path)
End Sub

Private Sub RemoveCurrentKey(ByVal name As String)
Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
key.DeleteValue(name, False)
End Sub

you can then use to add the reg key

AddCurrentKey(System.Reflection.Assembly.GetEntryAssembly.FullName, System.Reflection.Assembly.GetEntryAssembly.Location)

and to remove it

RemoveCurrentKey(System.Reflection.Assembly.GetEntryAssembly.FullName, System.Reflection.Assembly.GetEntryAssembly.Location)

or

AddCurrentKey("Application Name", "Path to application")
6
Me too searching for the same answer. Kindly do send the answer if you get them solved.
Thank You. Byeeeeeeeee
4
Me too searching for the same answer. Kindly do send the answer if you get them solved.
Thank You. Byeeeeeeeee
0
(((((You could create a scheduled task to run your app. But im guessing you want this to happen for users automatically?

well I have always used the answer in Tuntu's reply and found this the best way I have a included a vb example below

Imports Microsoft.Win32


Private Sub AddCurrentKey(ByVal name As String, ByVal path As String)
Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
key.SetValue(name, path)
End Sub

Private Sub RemoveCurrentKey(ByVal name As String)
Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
key.DeleteValue(name, False)
End Sub

you can then use to add the reg key ))))))

can't undersatnd wht name nd path I write
i can't get it I tried alot but not working can u explain with example plzzzz
2

Didn't find the answer you are looking for?

Ask a question
Personally I would just place what file / exe you are trying to auto start when windows is booted by going to your start up folder ( all programs - startup) and just move the file to there of if you can not move the file just place a short cut in there........
1
Matrixmaya
Posts
4
Registration date
Saturday January 23, 2010
Status
Member
Last seen
January 7, 2011
2
Jan 29, 2010 at 08:19 AM
i think use regedit

use desktop.ini file
1
hello,

I am developing an window application in C# and I want it to start up automatically when user logs in and I dont want to place my exe in run or winlogon or any other common folder ....

My question is that is there any other folder where I can put my exe path in reg file so it can auto start

and I am using windows XP Operating system

Please any one have any info on this let me know sooonnnnnn......

Thank you
0
Hi,

The easiest way is:

1.Create Short cut to your exe.
2.Place that short cut in startup menu of windows.

It work.....for all softwares....cheers!!!:)
0
Hi,
try this for registry problem for users:

CReg Reg;
if( SUCCEEDED(Reg.Open(HKEY_LOCAL_MACHINE, _T("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")) ) )
Reg.SetValue(<MyExePath>, _T("MyExe") );
0
There is a easy way to run your program automatically


first create a desktop.ini file in any directory of a folder then


in desktop.ini write


[start]
autorun.exe or X:\autorun.exe


it can be applied in only windows xp and NT
0
That's easy

put ur vb exe file in start up.. ok..
0
Arul Raj > Ronnel
Jan 19, 2009 at 11:29 PM
Thanks for your answer.... But I could not find the vb.exe file.....
0
Pez > Arul Raj
Jan 27, 2009 at 08:56 AM
He meant the .exe you created with visual basic. Put your program in the startup folder, that's the easiest way.
0
avdesh kataria
Feb 17, 2009 at 02:38 AM
Hi Jitu,

I have exe with name billing.exe with path (c:\avd\). Plz tell how I can I run this exe with destop.ini file???
I mean run it without click.

Thanks
0
alex > avdesh kataria
Sep 30, 2009 at 07:44 AM
first create a desktop.ini file in any directory of a folder then


in desktop.ini write


[start]
autorun.exe or X:\autorun.exe


it can be applied in only windows xp and NT
0
Run out of space above to to use that

eg

you could use for example

AddCurrentKey("Program Name", "Program Path")

or below should do that automatically for you

AddCurrentKey(System.Reflection.Assembly.GetEntryAssembly.FullName, System.Reflection.Assembly.GetEntryAssembly.Location)

hope this helps
0
Hi saranya!~

I got one answer.But I dont know whether it will help u or not...But I give u that link.

Please read this.I hope it will be very useful for you....If any think come online I will be allways online.

=====> This is that link http://www.mmopenxteam.com/hacking/131

My gmailid balamurugan.dit@gmail.com
-1