[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Add a key in the registry from setup project

Marcus

4/5/2006 1:20:00 PM

Hi
I want to be able to install a registry key from the setup project at
the following location:
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run/

I do this today in my source code. This registry key does not (of
course) get deleted when the user chooses to uninstall the application.

In my setup project I only get down to
HKEY_LOCAL_MACHINE/Software/[Manufacturer].

How can I specify
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run/? Can
I hardcode the path in some property or...?

Would be very greatful of someone knew how to do this.

6 Answers

Phil Wilson

4/7/2006 3:33:00 PM

0

Just add it in the Setup project - right click on that [Manufacturer] node
and New->Key.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.ht...

"Marcus" <marcus.silfver@koping.net> wrote in message
news:1144243225.019242.314980@j33g2000cwa.googlegroups.com...
> Hi
> I want to be able to install a registry key from the setup project at
> the following location:
> HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run/
>
> I do this today in my source code. This registry key does not (of
> course) get deleted when the user chooses to uninstall the application.
>
> In my setup project I only get down to
> HKEY_LOCAL_MACHINE/Software/[Manufacturer].
>
> How can I specify
> HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run/? Can
> I hardcode the path in some property or...?
>
> Would be very greatful of someone knew how to do this.
>


Marcus

4/11/2006 6:21:00 AM

0


Phil Wilson wrote:

> Just add it in the Setup project - right click on that [Manufacturer] node
> and New->Key.

Thanks for the reply!

Should I change the [Manufacturer] node to be named "Microsoft" first,
and should I then add a new key with the name "Windows", then add a new
key under that one named "CurrentVersion" etc.

Sorry if my questions seems stupid, I just dont want to mess up
anything in my registry.

Regards
Marcus

Phil Wilson

4/11/2006 3:55:00 PM

0

I didn't give a good answer there - sorry. [Manufacturer] comes from the
properties of the setup project - it's supposed be for your company-specific
data. You need a new key, yes, that says Microsoft in it. You'll have to
create the keys a node at a time starting at HKLM, including Microsoft,
CurrentVersion etc. Don't use the Manufacturer key.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.ht...

"Marcus" <marcus.silfver@koping.net> wrote in message
news:1144736470.621556.289030@v46g2000cwv.googlegroups.com...
>
> Phil Wilson wrote:
>
>> Just add it in the Setup project - right click on that [Manufacturer]
>> node
>> and New->Key.
>
> Thanks for the reply!
>
> Should I change the [Manufacturer] node to be named "Microsoft" first,
> and should I then add a new key with the name "Windows", then add a new
> key under that one named "CurrentVersion" etc.
>
> Sorry if my questions seems stupid, I just dont want to mess up
> anything in my registry.
>
> Regards
> Marcus
>


Marcus

4/21/2006 1:32:00 PM

0

Thanks!

One thing came to my mind though.
I want to put this key in the registry to be able to launch my
application automatically at windows login. A problem is that I dont
know where the user chooses to install the application. Therefor I do
not know what value to set on the key in the register. Is there a way
of knowing this (some property beeing set to the location where the
user chooses to install) that we can use to set during "setup runtime"
as value for the key?

Or maybe the only solutions to my problem is to let the user launch the
application manually the first time (so my application can create the
key at application runtime). Or else NOT let the user choose the
location where to install the application (so I can hardcode the value
for the key in my setup project).




Phil Wilson wrote:

> I didn't give a good answer there - sorry. [Manufacturer] comes from the
> properties of the setup project - it's supposed be for your company-specific
> data. You need a new key, yes, that says Microsoft in it. You'll have to
> create the keys a node at a time starting at HKLM, including Microsoft,
> CurrentVersion etc. Don't use the Manufacturer key.
> --
> Phil Wilson
> [Microsoft MVP-Windows Installer]
> Definitive Guide to Windows Installer
> http://apress.com/book/bookDisplay.ht...
>
> "Marcus" <marcus.silfver@koping.net> wrote in message
> news:1144736470.621556.289030@v46g2000cwv.googlegroups.com...
> >
> > Phil Wilson wrote:
> >
> >> Just add it in the Setup project - right click on that [Manufacturer]
> >> node
> >> and New->Key.
> >
> > Thanks for the reply!
> >
> > Should I change the [Manufacturer] node to be named "Microsoft" first,
> > and should I then add a new key with the name "Windows", then add a new
> > key under that one named "CurrentVersion" etc.
> >
> > Sorry if my questions seems stupid, I just dont want to mess up
> > anything in my registry.
> >
> > Regards
> > Marcus
> >

Phil Wilson

4/22/2006 12:10:00 AM

0

If you add a registry item to your setup project and give it the value
[TARGETDIR] it will be resolved at install time to the actual location
corresponding to your Application Folder, even of the user changed it.
--
Phil Wilson [MVP Windows Installer]
----
"Marcus" <marcus.silfver@koping.net> wrote in message
news:1145626328.147336.272380@v46g2000cwv.googlegroups.com...
> Thanks!
>
> One thing came to my mind though.
> I want to put this key in the registry to be able to launch my
> application automatically at windows login. A problem is that I dont
> know where the user chooses to install the application. Therefor I do
> not know what value to set on the key in the register. Is there a way
> of knowing this (some property beeing set to the location where the
> user chooses to install) that we can use to set during "setup runtime"
> as value for the key?
>
> Or maybe the only solutions to my problem is to let the user launch the
> application manually the first time (so my application can create the
> key at application runtime). Or else NOT let the user choose the
> location where to install the application (so I can hardcode the value
> for the key in my setup project).
>
>
>
>
> Phil Wilson wrote:
>
>> I didn't give a good answer there - sorry. [Manufacturer] comes from the
>> properties of the setup project - it's supposed be for your
>> company-specific
>> data. You need a new key, yes, that says Microsoft in it. You'll have to
>> create the keys a node at a time starting at HKLM, including Microsoft,
>> CurrentVersion etc. Don't use the Manufacturer key.
>> --
>> Phil Wilson
>> [Microsoft MVP-Windows Installer]
>> Definitive Guide to Windows Installer
>> http://apress.com/book/bookDisplay.ht...
>>
>> "Marcus" <marcus.silfver@koping.net> wrote in message
>> news:1144736470.621556.289030@v46g2000cwv.googlegroups.com...
>> >
>> > Phil Wilson wrote:
>> >
>> >> Just add it in the Setup project - right click on that [Manufacturer]
>> >> node
>> >> and New->Key.
>> >
>> > Thanks for the reply!
>> >
>> > Should I change the [Manufacturer] node to be named "Microsoft" first,
>> > and should I then add a new key with the name "Windows", then add a new
>> > key under that one named "CurrentVersion" etc.
>> >
>> > Sorry if my questions seems stupid, I just dont want to mess up
>> > anything in my registry.
>> >
>> > Regards
>> > Marcus
>> >
>


Marcus

4/24/2006 6:00:00 AM

0

That is exactly what I need!

Thanks.




Phil Wilson wrote:

> If you add a registry item to your setup project and give it the value
> [TARGETDIR] it will be resolved at install time to the actual location
> corresponding to your Application Folder, even of the user changed it.
> --
> Phil Wilson [MVP Windows Installer]
> ----
> "Marcus" <marcus.silfver@koping.net> wrote in message
> news:1145626328.147336.272380@v46g2000cwv.googlegroups.com...
> > Thanks!
> >
> > One thing came to my mind though.
> > I want to put this key in the registry to be able to launch my
> > application automatically at windows login. A problem is that I dont
> > know where the user chooses to install the application. Therefor I do
> > not know what value to set on the key in the register. Is there a way
> > of knowing this (some property beeing set to the location where the
> > user chooses to install) that we can use to set during "setup runtime"
> > as value for the key?
> >
> > Or maybe the only solutions to my problem is to let the user launch the
> > application manually the first time (so my application can create the
> > key at application runtime). Or else NOT let the user choose the
> > location where to install the application (so I can hardcode the value
> > for the key in my setup project).
> >
> >
> >
> >
> > Phil Wilson wrote:
> >
> >> I didn't give a good answer there - sorry. [Manufacturer] comes from the
> >> properties of the setup project - it's supposed be for your
> >> company-specific
> >> data. You need a new key, yes, that says Microsoft in it. You'll have to
> >> create the keys a node at a time starting at HKLM, including Microsoft,
> >> CurrentVersion etc. Don't use the Manufacturer key.
> >> --
> >> Phil Wilson
> >> [Microsoft MVP-Windows Installer]
> >> Definitive Guide to Windows Installer
> >> http://apress.com/book/bookDisplay.ht...
> >>
> >> "Marcus" <marcus.silfver@koping.net> wrote in message
> >> news:1144736470.621556.289030@v46g2000cwv.googlegroups.com...
> >> >
> >> > Phil Wilson wrote:
> >> >
> >> >> Just add it in the Setup project - right click on that [Manufacturer]
> >> >> node
> >> >> and New->Key.
> >> >
> >> > Thanks for the reply!
> >> >
> >> > Should I change the [Manufacturer] node to be named "Microsoft" first,
> >> > and should I then add a new key with the name "Windows", then add a new
> >> > key under that one named "CurrentVersion" etc.
> >> >
> >> > Sorry if my questions seems stupid, I just dont want to mess up
> >> > anything in my registry.
> >> >
> >> > Regards
> >> > Marcus
> >> >
> >