1

I've made my app called myapp.exe. I've also added a registry key in:

  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
  • HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  • HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce

The command used in command prompt is: reg ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v MyApp /t REG_SZ /d "%WINDIR%\myApp.exe" /f

I've added it one at a time. myApp doesn't start when my system starts. I'm administrator and checked with msconfig, the keys are properly set. What's wrong? Thank you!

UPDATE 1: As my exe is a wrapper of an executable jar file (created with jsmooth), is it possible that it cannot start with windows due to the fact that it tries to open before jqs.exe (java quick start)? It sounds strange to me but maybe that's the problem!

2
  • What version of Windows?
    – ryrich
    Commented Apr 26, 2013 at 19:54
  • Windows XP SP3! myApp path, as you can see, is C:\WINDOWS
    – Angelo
    Commented Apr 26, 2013 at 19:58

1 Answer 1

2

Try this, I know it will work with more recent version of Windows (maybe XP):

Don't mess with registry keys at the moment. Just add your .exe (or a shortcut to it) in:

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Then go into msconfig.exe, startup tab and see if it gets populated in the startup list (if so, obviously check it and reboot your computer)

EDIT:

If you want to use the registry method like you posted instead of adding it to the startup menu:

  • Create an entry in the registry under HKLM\Software\Microsoft\Windows\CurrentVersion\Run (you did this already)
  • Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
  • Create a new string value and give it a useful name for reference.
  • Set the value to the full path (and params) of the EXE you want to run.

This should work. And if it doesn't, then yes, you will need to make sure whatever dependencies your exe uses are running before hand. If you were to run your .exe now with jqs.exe off and it doesn't work, you'll know that it needs to be run when Windows starts up as well.

4
  • I'm going to try but I don't want to use that method, because the app is seen into the startup folder.
    – Angelo
    Commented Apr 26, 2013 at 20:04
  • I can see it in msconfig, but it doesn't work, see updated answer!
    – Angelo
    Commented Apr 26, 2013 at 20:11
  • @Angelo see my post edit for more information.
    – ryrich
    Commented Apr 26, 2013 at 20:18
  • That doesn't work even with jqs off. I cannot find a solution! Thanks for your help anyway!
    – Angelo
    Commented Apr 26, 2013 at 20:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .