Default Location for setup project

  • Thread starter Thread starter Vishnu
  • Start date Start date
V

Vishnu

Hi,

I have created one setup project using visual
studio .NET. When I try to install after created the
project, the installation wizard showing the default
location (eg: Program Files\HP\ISO) as installation
location. Is it possible to change this default location
when the project is created. I can see [ProgramFileFolder]
[ManufactureName]\[ProductName] as default location in the
property window of the project. Is it possible to give
some other location as default loction? I need to read
one environemnt variable and set that as default
location? Is this possible. If so, can you give me the
way, in which I can achieve this.

Regards,
R.Vishnu Varadhan.
 
You can change the DefaultLocation property, and in fact, set the TARGETDIR
property using a Registry search, or a File search, etc... but I don't know
of a way to put the Environment variable into TARGETDIR except maybe at the
command line, but I'm not sure how that would work...

You could try somethign like msiexec /i mysetup.msi TARGETDIR=%MYENVVAR%

or something similar. You might also be able to do something with a
VBScript that gets the env variable contents and then runs the above line.
This might be necessary since I'm not sure how/when the environment
variable name is expanded, and you don't really want to pass "%MYENVVAR" as
a string to TARGETDIR.
 
Back
Top