Home All Groups Group Topic Archive Search About

Make installer make app start up on login

Author
4 Apr 2005 4:21 PM
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!

Author
4 Apr 2005 5:43 PM
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
------------------
"Brian Henry" <brianiupmsdn@newsgroups.nospam> wrote in message
news:O7CkOJTOFHA.3848@TK2MSFTNGP14.phx.gbl...
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!
Author
5 Apr 2005 1:50 AM
Brian Henry
thanks!

Show quoteHide quote
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:O1Rpi3TOFHA.2384@tk2msftngp13.phx.gbl...
> 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
> ------------------
> "Brian Henry" <brianiupmsdn@newsgroups.nospam> wrote in message
> news:O7CkOJTOFHA.3848@TK2MSFTNGP14.phx.gbl...
> 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!
>
>
>
Author
5 Apr 2005 3:03 AM
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
Author
6 Apr 2005 12:23 PM
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

Show quoteHide quote
"Crouchie1998" <crouchie1***@discussions.microsoft.com> wrote in message
news:%23j55%23wYOFHA.2144@TK2MSFTNGP09.phx.gbl...
>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
>
>
>
Author
6 Apr 2005 1:56 PM
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