can anyone please tell me how can i save my visual basic exe in such a way so that its exe run automatically when windows start
if u know the answer please mail me at
<email snipped>
can anyone please tell me how can i save my visual basic exe in such a way so that its exe run automatically when windows start
if u know the answer please mail me at
<email snipped>
Multiple ways will make a Visual Basic EXE start with Windows; pick the one that matches how and when the program must run. The thread already mentions easy per-user options from and (putting something in a Startup context) and a registry-based approach from ; showed an in-app copy-to-startup trick. Those all work for a simple per-user autorun, but each has limits that matter on modern Windows.
If the app is a GUI intended to appear when a person logs in, the Startup approach or a Task Scheduler trigger set for "at logon" is simplest and most reliable for current Windows versions. If it must run before anyone logs in, run with elevated rights, or stay running without an interactive desktop, register it as a background service or create a scheduled task triggered "at startup" and configured to run whether the user is logged on. Note: services run in session 0 and cannot show a normal UI.
Common pitfalls and troubleshooting:
For implementation details and secure options, consult Microsoft guidance on Task Scheduler and services and the support article on managing startup apps:
Use an installer or a proper scheduled task/service registration for production installs rather than ad-hoc copying at first run.
Jump to Post— jbennet 1,618put the .exe in the startup folder in the start menu and it will run at logon
put the .exe in the startup folder in the start menu and it will run at logon
Create a value at this path in Registery:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run and put your app's path in it.
try this following code to copy your program to startup program automatically, but the program must running once to do this.
Private Sub Form_Load()
Dim mShell
Dim path As String
Set mShell = CreateObject("WScript.Shell")
path = mShell.Specialfolders("Startup")
FileCopy App.EXEName & ".exe", path & "\YourNewRunFileName.exe"
End Sub Create a shortcut to the .exe. Copy the shortcut just created to your "startup" folder in the Start Menu (just drag it to the start button, then drag to Programs, then drag to Startup, then release it into the Startup folder).
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.