[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

VS2008 Setup Project to dynamic directory

Posted on 2010-03-31
6
Medium Priority
?
570 Views
Last Modified: 2012-05-09
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.
0
Comment
Question by:ckaley
  • 3
  • 3
6 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 29316361
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?
0
 

Author Comment

by:ckaley
ID: 29342253
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.
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 29347892
could you have a look at attached project? remove  ".txt" from proj file name
testSetup.zip
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:ckaley
ID: 29352537
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
0
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 1000 total points
ID: 29353232
they will be installed where the user selects it (ie in InstallDir) + all the underlying structure
if you want it to be hardcoded, you might try to create appropriate folder under Program Files - look into MSI project in Files view

in general, VS gives you some limited freedom :)
0
 

Author Closing Comment

by:ckaley
ID: 31709546
Looks like there are limitations to VS but this helped me realize my mistakes and get a lot closer.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses
Course of the Month8 days, 18 hours left to enroll

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question