LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Install Executable in Same Directory Where Installer is Located

So I have made an installer (install.exe)  for my LabVIEW built executable and I'm choosing where to install it (default location is in program files).

I was wondering if it was possible to have it installed in the same directory that the install.exe file is located on that machine. 

I know you can add an absolute path and other destinations in properties, but I don't know how to have the installer use it's current directory on the machine as the destination.

I would love to know if and how this is possible. 

Thank you.

0 Kudos
Message 1 of 5
(172 Views)

I assume when you the installer asks where you want to install it to, and it will default to c:\program files (x86)\...\...   , that you can change it to wherever you want.

 

But the question I have is why do you want to do that?  What is so special about the installer executable itself, which could be placed anywhere (Downloads, desktop, a cloud drive, a CD drive, USB stick), that you want to place the actual program next to it?  And why would you want to deviate from the Windows recommended location for c:\Program Files (x86)?

0 Kudos
Message 2 of 5
(158 Views)

The end user of the program is going to clone the installer from github, and as you mentioned, they will be able to choose the location for this cloning. Our application executable is made to run multiple times, so for the ease of use for the end user, I'd like to place the application executable next to the installer executable that way the end user knows where to go to rerun the application whenever they choose too.

0 Kudos
Message 3 of 5
(150 Views)

Good luck with that.

 

I think it is a bad idea for your end user to deviate from what is considered standard practice in the rest of the Windows world.

Message 4 of 5
(135 Views)

Take a step back and think about this request.

You have an installer.  This installer can choose to install the software anywhere.  Once the application is installed, there's no dependency keeping the installer in that location (or even on the machine).

 

Your end user wants you to modify your installer to be the only one that detects its location and installs there.  This means they're going to have to do work on their end to manage where users can place the installer.  Imagine if one downloads to desktop and installs?  They don't want that mess.

 

The easier solution is to tell the customer to place the installer where they want it.  If they want it in a specific directory, place it there.  If they can control it being accessible, they can control placing it where they want it.  That's a better practice (though still silly) than breaking installer logic that everyone knows and understands.

Message 5 of 5
(107 Views)