LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run executable Program Files (x86)

I'm running LabVIEW 2010 (32-bit). I am building an installer which needs to call a batch file in order to complete the installation. How do I configure the installer to recognize when I'm installing my 32-bit application on a 64-bit windows 7 installation since the "Program Files (x86)" does not seem to be recognized by the "Run executable at end of installation [ProgramFilesFolder]" shortcut. Any suggestions?

 

Thanks,

Craig

0 Kudos
Message 1 of 6
(4,235 Views)

I don't completely understand. Are you trying to call a batch file that's installed in the "C:\Program Files" folder or the "C:\Program Files (x86)" folder? What did you add to the project's list of files? In the Advanced page you need to select a file from your project.

0 Kudos
Message 2 of 6
(4,227 Views)

Yes, I would like to run a batch file once my installer completes. The problem is that when I install my 32-bit application on my 64-bit OS, LabVIEW installer attempts to launch the *.bat file from "C:\Program Files\myApplication\Data" instead of the actual install location which is "C:\Program Files (x86)\myApplication\Data". Yes, the batch file is part of my project and is selected as the file to run after the installer compeltes (Advanced Category of the Installer Build Spec) It seems as though [ProgramFilesFolder] is not going to be intelligent enough to reference the x86 folder even though this is the correct folder for 32bit applications.

 

So my question is, is LabVIEW smart enough to understand this or do I need to go a different route?

0 Kudos
Message 3 of 6
(4,220 Views)

Hi craige!

 

You can do this by detecting whether if the operating system is 32 or 64bits through a property node. Take a look here to see how to detect that. After that, create a case structure that references to the folder that is appropriate in either occasion. Take a look to the File Dialog Express VI I believe it will be of help.

 

Kind Regards

 

Carlos O

0 Kudos
Message 4 of 6
(4,197 Views)

Craige,

 

i have never tested this, but please check your build script for the installer if it states any relative path information after selecting the exe or bat file. If it contains any "static" part like "program files\my app\data", you might want to try if symbolic paths are possible.

In this case maybe "[INSTALLDIR]data\myPostInstall.bat"

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 6
(4,187 Views)

Carlos, I can't run a VI if I don't have LabVIEW (RTE or IDE) installed on the system, therefore I would be unable to call property nodes.

 

Norbert, good call. I didn't realize this was an option. The following link to the LabVIEW 2010 Help references this [tag] you mentioned. This should work. 

 

http://zone.ni.com/reference/en-XX/help/371361G-01/lvdialog/adv_installer_settings_db/

 

0 Kudos
Message 6 of 6
(4,183 Views)