LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add Third Party Driver to Installer

Solved!
Go to solution

I'm trying to add a third party driver to a LabVIEW installer, but I'm running into issues. I've tried following the instructions in the following article:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kJ3pSAE&l=en-US

 

I made a test .bat file which copies a test folder to my desktop. This test folder contains a 'HelloWorld.bat' to simulate running a 'setup.exe'.

 

This .bat file seems to be trying to run the HelloWorld.bat file before it's finished copying. Instead of running the HelloWorld script, I get a default command prompt. What am I doing wrong?

 

test.bat:

Spoiler
ECHO OFF
xcopy "%cd%\drivers" "C:\Users\Astovio\Desktop\drivers"  /E /I
start "C:\Users\Astovio\Desktop\drivers\HelloWorld.bat"
title Install Driver
EXIT

HelloWorld.bat:

Spoiler
ECHO OFF
ECHO Hello world!
PAUSE
0 Kudos
Message 1 of 2
(122 Views)
Solution
Accepted by topic author Astovio

Google finally came through.

 

Apparently the "start" command requires a title before the path to the executable. Ex:

START "title" [options] "HelloWorld.exe" [parameters]

 

Adding empty quotes before my HelloWorld.bat solved the problem:

 

ECHO OFF
xcopy "%cd%\drivers" "C:\Users\Astovio\Desktop\drivers" /E /I
start "" "C:\Users\Astovio\Desktop\drivers\HelloWorld.bat"
EXIT

 

0 Kudos
Message 2 of 2
(86 Views)