0

i want to deploy C# application, I used vs2010 setup template which is fine. but I want to change the default location of my application to the installer path or in other words, want same behaviour when you right click on zip file and winrar says extract here. i explored folderproperties this but did not see any folder variable which fits with installer current location.

sm.abdullah
  • 1,777
  • 1
  • 17
  • 34
  • I provide all the info here and more: http://stackoverflow.com/questions/11474320/install-to-same-path-when-upgrading-application – Jeremy Thompson Jun 22 '15 at 08:11
  • from there , i set up "[SEARCHFORINSTALLDIR]" but it leads me to E:\ Not the installer running directory. – sm.abdullah Jun 22 '15 at 08:21
  • You can force it to a particular install folder (as shown for the update MSI) or let user choose or I guess the current directory too with a tiny tweak, but why do you want to do that? – Jeremy Thompson Jun 22 '15 at 08:30
  • basically, i want to read some file relative to installer path.actually i write a service which uploads specific file on ftp with in current dir. – sm.abdullah Jun 22 '15 at 08:32
  • unable to get the current installer directory. – sm.abdullah Jun 22 '15 at 08:33
  • So if I downloaded MSI and installed from c:\temp that's where you want it installed? How are you going to know the relative path? I think my solution is perfect- let users install anywhere (default to c:\program files\...) then in your program (where you need to read the files) check the registry key to see the relative path. – Jeremy Thompson Jun 22 '15 at 08:35
  • yes, i would guide the to run application from particular directory so we can grab file from that directory. – sm.abdullah Jun 22 '15 at 09:09
  • This guide might also be of help if the files depend on another app being installed: http://stackoverflow.com/questions/26613336/find-if-3rd-party-software-is-installed-the-install-path-and-the-exes-name. Guiding a user to a particular folder may not work in some cases (and not just because the user changes the default install path). – Jeremy Thompson Jun 22 '15 at 09:13
  • thanks, i would check it. – sm.abdullah Jun 22 '15 at 09:18

0 Answers0