"Start up" launching two instances of same program

1

I wrote a simple Windows program and put it in my "Start up" folder on the start menu.

But when Windows starts up, it always launches it twice. I get two instances of my program and I always have to manually exit one of them.

It is only in the All Users start up profile, not any of the other User profiles. I haven't touched the registry at all. If I remove the program from "Start up", then it doesn't start at all.

This actually happens on both 7 and xp for me for this particular program.

bobobobo

Posted 2009-08-09T15:30:15.863

Reputation: 4 632

Answers

2

Go to the run dialog box and type in msconfig.

A box like the one below should come up:

enter image description here

Have a look on the startup tab and uncheck the entries for the application that is launching twice.

Alexis Hirst

Posted 2009-08-09T15:30:15.863

Reputation: 1 121

Yes, you're right. It does appear there twice.

When I uncheck one of them, then close the dialog, then reopen it, the duplicate disappears, but the program I want to start up is unchecked. When I check it again, then close/reopen the dialog, the item is duplicated again, both times checked.

I am thinking is it wrong to just copy something into the Start Up folder manually? Because that is how I added it to Start Up to begin with.. – bobobobo – 2009-08-09T23:01:13.317

Yes, by adding it to the startup folder, it should launch when you log in. What may be an idea, is to uncheck the entries in 'msconfig' for the application, add the application to the startup folder, but also check in the preferences of the application whether it is set to launch on login, or something similar. Would you be able to tell me what the problem application is? – Alexis Hirst – 2009-08-10T10:01:08.037

Alexis, it's a program he wrote himself. – Travis – 2009-08-10T15:25:49.667

1

Check that the program isn't installed in "All Users\Starup" as well as "Your Username\Startup"

This happened to me once when I was fiddling with the start menu.

EvilChookie

Posted 2009-08-09T15:30:15.863

Reputation: 4 519

:) Yes I double-checked this before posting. – bobobobo – 2009-08-09T22:59:07.953

That's cool - if I could have a dime for each problem I've solved where someone said "I checked this or that setting..." I could retire. :) – EvilChookie – 2009-08-10T01:37:47.150

0

I had the exact scenario that the OP mentioned. It turned out that the registry keys that point to the "Startup" folder got messed up (due to some drag and dropping and copying a startup folder to/from different location).

The solution: Download "pstool" from Sysinternals, run the following command to get your sid:

pstools sid64

On regedit you can see that there's a path with your sid under the HKEY_USERS\ path. e.g. HKEY_USERS\{{your sid here}}\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders key.

I've found out that the following value was present under that path: %ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Startup\ I've changed it into %USERPROFILE%\Microsoft\Windows\Start Menu\Programs\Startup\

And that fixed the issue!

BornToCode

Posted 2009-08-09T15:30:15.863

Reputation: 273

0

You Could make try making this registry file (remove the shortcut from all users start-up first)

----------------------------------------start copy

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"{Software Name}"="\"C:\\Program Files\\{Install Folder}\\{Application Name.exe}\""

end copy-----------------------------------------

Change the {folder and file names} to what ever you need to start, removing the curvy brackets.

Save it as a .txt file then change the extension to .reg

Run the file and see if it corrects the issue

If not you can always remove the entry by creating a .reg file with this line (remeber to change the {software Name} to what every you changed the first one to.

------------------------start copy

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"{Software Name}"=""

end copy---------------------------

Kythos

Posted 2009-08-09T15:30:15.863

Reputation: 341