Link to home
Start Free TrialLog in
Avatar of ckaley
ckaleyFlag for United States of America

asked on

VS2008 Setup Project to dynamic directory

I am trying to put together a deployment for a third party plugin.  The problem I have not been able to figure out is how to find the current intall directoy so that I can place my files underneith it.  My only guarantee is that the main program will install under C:\Program File, but from there it could be anywhere .  
The default location in VS2008 is [ProgramFilesFolder][Manufaturer]\[ProductName] which is nowhere close.  There is no guarenteed registry setting, the best I have been able to do is search the file structure for 1stparty.exe, but I am not sure where to go from there.  
If for example I get back that EXEPATH = C:\Program Files\This\That\1stparty.exe, then I need to put all my files under C:\Program Files\This\That\Plugin\3rdparty\

Under custom actions-> install i added a vb script that popped up a msgbox to show me EXEPATH but it appeared to run after all files had been moved to the default location and all files registered.

Am I making any sense?  Thank you for any help you can give.
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

can't you just put 3rd party stuff under your Application Files folder in setup project? Just like you mentioned above, with all required folder structure etc etc?
Avatar of ckaley

ASKER

All the files are under the Application Files folder.  The problem is that this is a plugin and those files must be placed in a specific subfolder under the 1st party so that it can be found automatically.  There is a default path that I provide to the user but technically, and one issue we had in the beta delivery, the user could change the directory that they install to, thus the default is no longer correct.  I give them the option to change the path during install, but most users just keep hitting 'next' until the install is done.  I can get everything I need through vbscript but I can't get the script to be executed prior to install in the VS project setup.  
So what it comes down to is , unless I can gather the info about where the user installed what version to, I have to rely on them to change the default path I gave them and not just click through till the plugin is potentially installed to the wrong location.
It is an insanely simple install that I could do in a vbscript but the customer has their heart set on a .msi install, with the pretty little wizard.  I don't know if InstallSheild or some other tool would be better for this, perhaps letting me gather system paths and info prior to moving and registering files, but I don't have the budget for something pricey, and I believe most tools have a high licensing fee.
could you have a look at attached project? remove  ".txt" from proj file name
testSetup.zip
Avatar of ckaley

ASKER

Sorry I realized what you were saying after my last post and yes I placed the proper subdirectories under the Application Folder.  So now the only issue is did they install to "C:\Progam Files\JonesCo\Labtech" ,  "C:\Progam Files\JonesCo\Labtech Demo" or did they go somewhere outside the default which evidently happens often as they install outside Program Files or on the D:\ drive.
Obviously I could have a Demo version and a Licensed version installer where the only difference would be that one word in the default path.   It just shocks me that you can't run a vbscript prior to installation to gather data. Of course I'm a little shocked the company I am developing this for doesn't place anything in the registry.
Thanks
ASKER CERTIFIED SOLUTION
Avatar of alexey_gusev
alexey_gusev
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ckaley

ASKER

Looks like there are limitations to VS but this helped me realize my mistakes and get a lot closer.