Home All Groups Group Topic Archive Search About

Setup project registery values with app install folder in them

Author
6 Apr 2005 12:35 PM
Brian Henry
I am trying to deploy my VB.NET project with a setup project, and I need to
make a reg key entry.. but it also needs to have the path to where the
program was installed in they string i placed in the key. How do I go about
insertint the installation path (folder only) to the file into the registery
on installation of the setup project?

Say my project was installe to "c:\program files\myproject"

I want to make a registry key string at ..\Software\MyProject which hast the
string

Location = "c:\program files\myproject\SomeFile.xyz"

but of course the user can change the install location, so just entering
this as a string  in the installer wont work, how do i fix this and replace
the path with what they installer installed it to? thanks

Author
6 Apr 2005 12:51 PM
Cor Ligthert
Brian,

In that great tool the development project there are a lot of nicely hidden
tools.

One of them is in the Edit In your IDE, there suddenly is a new item when
you are busy with an deployment project, that gives you the possibility to
edit Registry parts .

I hope this helps,

Cor
Author
6 Apr 2005 1:27 PM
Brian Henry
I'm sorry I don't understand what you mean, I already have the registery
editor open in the deployment project, and already set up all the keys in it
for installation, I just can not figure out how to put a replacement code
for the path where the project was installed to in to the new string value I
created in the registery file during the install process..


Show quoteHide quote
"Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message
news:e3y%23sdqOFHA.1172@TK2MSFTNGP12.phx.gbl...
> Brian,
>
> In that great tool the development project there are a lot of nicely
> hidden tools.
>
> One of them is in the Edit In your IDE, there suddenly is a new item when
> you are busy with an deployment project, that gives you the possibility to
> edit Registry parts .
>
> I hope this helps,
>
> Cor
>
Author
6 Apr 2005 1:44 PM
Crouchie1998
I think you are talking about Application.ExecutablePath

If you are adding your assemly to Program Files then why not 'Hard Code' it?
Example:

Program Files\YourDirectory\YourExeFileHere

Crouchie1998
BA (HONS) MCP MCSE
Author
6 Apr 2005 1:57 PM
Brian Henry
how do I know where they installed it to? the registery key is created at
*installation* not execution.. this is a background process they will never
have to touch themselves, and I need it to run on login, but the user could
of placed it in a different difrectory then I'd be assumeing in hard codeing
when they selected the install path.. which is why I am asking how to
replace it. I don't believe application.executablepath works in the setup
project in a registery entry does it?


Show quoteHide quote
"Crouchie1998" <crouchie1998@spamcop.net> wrote in message
news:uJHb37qOFHA.3296@TK2MSFTNGP15.phx.gbl...
>I think you are talking about Application.ExecutablePath
>
> If you are adding your assemly to Program Files then why not 'Hard Code'
> it?
> Example:
>
> Program Files\YourDirectory\YourExeFileHere
>
> Crouchie1998
> BA (HONS) MCP MCSE
>
>
Author
6 Apr 2005 2:38 PM
Crouchie1998
Above the project explorer are a few icons. One of the is for the dialog
boxes displayed for the installation. Just remove the change directory
dialog & they won't be able to change the installation directory

Crouchie1998
BA (HONS) MCP MCSE
Author
6 Apr 2005 4:00 PM
Brian Henry
humm, thats still just a crutch for me, yes it would work... would rather
know how Microsoft and others actually do what I want to do in code in their
installers...


Show quoteHide quote
"Crouchie1998" <crouchie1998@spamcop.net> wrote in message
news:uz9J3ZrOFHA.3380@TK2MSFTNGP15.phx.gbl...
> Above the project explorer are a few icons. One of the is for the dialog
> boxes displayed for the installation. Just remove the change directory
> dialog & they won't be able to change the installation directory
>
> Crouchie1998
> BA (HONS) MCP MCSE
>
>
Author
12 Apr 2005 6:21 PM
Todd Derksen [MSFT]
Brian, to do this just use [TARGETDIR] in your registry value it will
expand at install time to the folder the app gets installed to, and still
allow the user to choos ethe installation point.

Todd Derksen
--------------------
Visual Basic Deployment Test Team
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Show quoteHide quote
>From: "Brian Henry" <brianiupmsdn@newsgroups.nospam>
>
>humm, thats still just a crutch for me, yes it would work... would rather
>know how Microsoft and others actually do what I want to do in code in
their
>installers...
>
>
>"Crouchie1998" <crouchie1998@spamcop.net> wrote in message
>news:uz9J3ZrOFHA.3380@TK2MSFTNGP15.phx.gbl...
>> Above the project explorer are a few icons. One of the is for the dialog
>> boxes displayed for the installation. Just remove the change directory
>> dialog & they won't be able to change the installation directory
>>
>> Crouchie1998
>> BA (HONS) MCP MCSE
>>
>>
>
>
>