LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run Executable Before Uninstallation: [DISTROOT] is not working

So when you build an installer with LabVIEW's Application Builder, you can configure it to run an exe before an uninstallation.

 

That works fine.

 

But you can supposedly send two different command line params to that exe:

 

[INSTALLDIR] - Application installation directory that the user selects.

[DISTROOT] - Full directory path containing the install.exe file that launched this installer

 

I have done TONS of testing, but I can't get DISTROOT to work.  It just sends a blank string.

 

INSTALLDIR works fine.  But not DISTROOT.

 

Anybody have any experience with this?  Maybe a workaround somehow?  My exe needs to know the path of its caller.  

 

http://www.medicollector.com
0 Kudos
Message 1 of 3
(1,193 Views)

From your post it appears that you are wanting to have the uninstall operation to call an EXE that is in the directory of the original installer. I would expect that [DistRoot] only works for install operations and not uninstall operations. At the time of uninstall, there is no guarantee that the installer is still in its original location. The recommended design would be to install the EXE to a known location and invoke that during uninstall.

Scott Richardson
https://testeract.com
Message 2 of 3
(1,154 Views)

Ah yes.  Good point.  DistRoot probably only works for calling an EXE on install.... not uninstall.

 

I will create a new post that actually describes the root problem:

 

https://forums.ni.com/t5/LabVIEW/Can-my-installer-know-difference-between-UNINSTALL-adn-UPDATE/td-p/...

 

http://www.medicollector.com
0 Kudos
Message 3 of 3
(1,149 Views)