Make installer make app start up on login

B

Brian Henry

I created a setup project for my VB.NET app and want to make it start up
with windows logging in, so i told it to place it into the startup group of
the users program group in the start menu (like use to work in the past) but
it never runs, actually nothing in there ever runs anymore it seems like...
how do i make a .NET app i installed on a system through the installer start
on windows login? thanks!
 
K

Ken Tucker [MVP]

Hi,

Place a registry entry under HKey_Local_Machine-> Software ->
microsoft -> windows -> currentversion -> Run. Use the app name as the keys
name. Use the path to the exe as the data. Use regedit to see some
examples in your registry.


Ken
------------------
I created a setup project for my VB.NET app and want to make it start up
with windows logging in, so i told it to place it into the startup group of
the users program group in the start menu (like use to work in the past) but
it never runs, actually nothing in there ever runs anymore it seems like...
how do i make a .NET app i installed on a system through the installer start
on windows login? thanks!
 
C

Crouchie1998

I wouldn't suggest that you create a registry key for your application
startup for Windows because once you remove your application it removes the
whole key

Example:

You create the key: with the Windows Installer Registry Editor

MyProgramName MyPath\MyFile.exe

at the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (current
user)
or
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (system
wide)

When you go to uninstall your application, it won't just remove:

MyProgramName MyPath\MyFile.exe

but the entire RUN key too. Therefore, you will have a corrupt registry &
all the other items on startup would also cease to appear because you've
deleted the entire key

----------------------------------------------------------------------------
---------------------------------------------------------

This is my asvice because I do a great deal of registry programming & been
there & done the above, got stung & wouldn't do it again.

I suggest that you create the run key on first program startup & not on
install. At the end of the day its up-to-you what you want to do.

I hope this helps

Crouchie1998
BA (HONS) MCP MCSE
 
B

Brian Henry

I believe you may be incorrect on that one, I tested it and it did not
behave as you stated... it only wiped out the string value in the key for
the applicaiton I created. All over strings were left intact along with the
key
 
C

Crouchie1998

It removed my entire Run Key & would never do it again. Although, I do use
it when creating a Software SubKey because then the key deletes & don't
cause any problems.

Crouchie1998
BA (HONS) MCP MCSE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top