LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Application is running before installer is finished

Hi, when I install my LabVIEW application the program is running before the installer is finished.
It never used to do this.
I am using  LabVIEW 7.0 with App builder version 7.0
I usally run an executable  bat file at the end of the install to modify the exe's ini file to hide the root window and disable the localised decimal point.
(And to copy ini files for the application.)

I recreated the bld file and installer and it still does it.

I disabled my bat file and it still opened.

The program is running after the removing back up files message and before the bat file is run.

Any suggestions?
Cheers
Nick
0 Kudos
Message 1 of 7
(3,606 Views)

Nick,

I'm a little confused by your question. So after installation, you are automatically running a batch file that edits the INI file and you are also running your VI? What actually launches these two applications? Does the installer launch them both? If you want to ensure that the execution order is always installer>>batch file>>VI, then why don't you launch the batch file at the end of the installer and then launch the VI at the end of the batch file?

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,590 Views)

Hi,

my Batch file does not run the VI.
I specify the batch file in the App builder Installer> Advanced dialog Run executable after installation.
(See screen shot).

Normal behaviour is: (ie the way it has always been for me)
1) installer installs LabVIEW exe
2) removes back up files
3) launches the batch file
4) batch file runs, and then closes
5) Installer prompts Finished and user closes the installer
6)  The user then runs the application

The problem is the installer is now...
1) installer installs labVIEW exe
2) removes back up files
3) installer runs labVIEW exe and waits.... (So app in foreground and installer is in background) << Abnormal?
4) user closes labVIEW exe
5) Installer continues and launches the batch file
6) batch file runs, and then closes
7) Installer prompts Finished and user closes the installer
8)  The user then runs the application

So I created a new build file without the batch file

1) installer installs exe
2) removes back up files
3) installer runs labVIEW exe and waits.... (So app in foreground and installer is in background)
4) user closes labVIEW exe
7) Installer prompts Finished and user closes
8)  The user then runs the application


My Batch file:



@Echo off
REM
REM *********************************************************************************************
REM Installer.Bat
REM
REM 6/3/06
REM
REM This Bat file is executed after install of LabVIEW software.
REM Specify this bat file in Executable on the Advanced installer dialogue
REM of the LabVIEW Application Builder.
REM
REM Prameters / Command Line Arguments: "[INSTALLDIR]" "[SourceDir]" "[ProductName]"
REM
REM Creates an ini file that hides the Root Window on the task bar
REM and disables Local Decimal symbol.
REM
REM Note you cannot have "&" in file or path names.
REM
REM *********************************************************************************************
Echo Configuring Install. Please Wait.
REM ***Parse Command Line Parameters***
set InstallDir=%1
REM Replace quotes (") with an empty string
set InstallDir=%InstallDir:"=%
Echo Install Directory: %InstallDir%
set SourceDir=%2
REM Replace quotes (") with an empty string
set SourceDir=%SourceDir:"=%
Echo Source Directory: %SourceDir%
set ProductName=%3
REM Replace quotes (") with an empty string
set ProductName=%ProductName:"=%
Echo Product Name: %ProductName%
@Echo off
REM *** Create an ini file that hides the root window & disables local decimal symbol.***
REM *** write the first line of the file as ***
del "%InstallDir%%ProductName%.ini"
echo [%ProductName%] > "%InstallDir%%ProductName%.ini"
echo HideRootWindow=True >> "%InstallDir%%ProductName%.ini"
echo useLocaleDecimalPt=False >> "%InstallDir%%ProductName%.ini"
REM ***delete this bat file that is copied to the install dir. NOTE NOTHING WILL WORK BELOW HERE EXCEPT LABELS***
del "%InstallDir%Install.bat"
:End




Nick,

I'm a little confused by your question. So after installation, you are automatically running a batch file that edits the INI file and you are also running your VI? What actually launches these two applications? Does the installer launch them both? If you want to ensure that the execution order is always installer>>batch file>>VI, then why don't you launch the batch file at the end of the installer and then launch the VI at the end of the batch file?

Kind Regards,

E. Sulzer
Applications Engineer
National Instruments

Message Edited by Nick on 03-16-2006 01:50 PM

0 Kudos
Message 3 of 7
(3,586 Views)
Hi,
I hope that clarified the problem.
Also interesting is that when uninstalling the program, the LabVEIW exe also runs, and you have to exit the LabVEIW exe before the uninstaller can finish.

I have just uninstalled and reinstalled the app builder. I hope it helps....

Nick
0 Kudos
Message 4 of 7
(3,580 Views)
Uninstalling & reinstalling app builder did not help. I have the top level VI window properties set the Top Level application window.
0 Kudos
Message 5 of 7
(3,579 Views)
Nick,
I think I may have found the answer. In the Advanced Installer Settings there is a "Wait Until Done" check box. According to the help "Wait until done—Runs the program after the installation is complete but before the installer exits." Try toggling this setting to see if it makes the difference.
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
 
0 Kudos
Message 6 of 7
(3,561 Views)
Hi,

I have figured out what was causing the problem.
I have written apps that have command line parameters and otheres that use ActiveX controls, but this is the first app to use both.

I created a simple test.vi and built it into a app many times.
1) My batch file had no effect
2) Building just with command line parameters enabled was OK
3) Building with just ActiveX enabled was OK
4) Building with both ActiveX and command Line parameters checked caused the problem.
5) The Wait until done check box for the batch file had no effect.

Regards
Nicholas

P.S. it is the second bug I found with the version 7.0 app builder....


0 Kudos
Message 7 of 7
(3,501 Views)