Auto Start in vb exe file [Solved/Closed]

saranya - Oct 28, 2008 at 12:47 AM - Latest reply:  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
See more 

19 replies

Best answer
15
Thank you
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

Thank you, Tintu 15

Something to say? Add comment

CCM has helped 1692 users this month

Very good solution.
THanks............
6
Thank you
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")
4
Thank you
Me too searching for the same answer. Kindly do send the answer if you get them solved.
Thank You. Byeeeeeeeee
Me too searching for the same answer. Kindly do send the answer if you get them solved.
Thank You. Byeeeeeeeee
2
Thank you
(((((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
1
Thank you
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........
Matrixmaya 4 Posts Saturday January 23, 2010Registration date January 7, 2011 Last seen - Jan 29, 2010 at 08:19 AM
1
Thank you
i think use regedit

use desktop.ini file
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
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!!!:)
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
Thank you
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
That's easy

put ur vb exe file in start up.. ok..
Arul Raj > Ronnel - Jan 19, 2009 at 11:29 PM
Thanks for your answer.... But I could not find the vb.exe file.....
He meant the .exe you created with visual basic. Put your program in the startup folder, that's the easiest way.
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
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
Thank you
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
-1
Thank you
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