Question How do I use environment variables as part of a DefaultLocation (VS 2010)

Holywhippet

New member
Joined
Sep 12, 2011
Messages
1
Programming Experience
5-10
I've got an a set of tools that I've developed which work with an application called ArcGIS. When my software installs, it needs to deploy a bunch of different files (mostly help files). These need to be installed in a very specific directory on the target PC. The problem is, we've started moving to Windows 7 64-bit at work. On the old PCs, the files need to be installed at C:\Program Files\ArcGIS\Desktop10.0\help\gp

But on the new OS they need to be installed at C:\Program Files (x86)\ArcGIS\Desktop10.0\help\gp

The location is based on where ArcGIS is installed rather than where I am installing my software.

ArcGIS does create an enviroment variable called ARCHOME which points at the install location for ArcGIS on a the current PC.

I'm using the standard setup project that comes with Visual Studio 2010 and I'm trying to set up a target folder in the installer so that the files will install correctly on either OS. I figure I need to reference the environment variable in the default location property to get the correct path. But I can't figure exactly how to do this.

Any suggestion please?
 
I can't say for certain as I've never actually tried it but this doesn't sound like something that a Setup project would support directly. You would likely have to add a Custom Action and do it in VB code.
 
Back
Top