LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cvi 7.1 distribution uninstaller

 
The CVI 5.5 distribution kit used to add an unistaller to the start menu with the program to uninstall
the apllication. CVI 7.1 doesn't seem to have this feature. Can I get the distribution kit in cvi 7.1 to
add an unistaller in the start menu?
0 Kudos
Message 1 of 7
(4,072 Views)
Hello KentMartin,
 
As you noticed, the feature of adding an uninstall shortcut in the application setup was removed once the distribution kits migrated to using MSI technology.  This is due to the fact that Microsoft Logo Certification stipulates that applications should only be removed from the Control Panel.  Therefore you will have to use third party software to add an uninstall shortcut in the application directory.
 
Basically, you will have to install a command line shortcut that calls:
msiexec.exe /x <yourapp.msi>
 
More information on customizing distribution kits can be found in this Tutorial.
 
Also, the following website steps through how to modify msi installers with the Wise for Windows Installer package and specifically how to add an uninstall shortcut to the application menu.
 
Hope that helps.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 7
(4,052 Views)

Wendy,

Some help but not much at the same time.

A shortcut would be fine if I knew where   <yourapp.msi> was.

The msi file is part of the install but does not get copied to the start menu programs, and since the installation could be run from anywhere I cannot make a shortcut to it. How do I get the installer to copy the msi file to a known location?

Note you cannot simply add the msi file in from the distrubtion build as it is a product of the build.

 

 

0 Kudos
Message 3 of 7
(4,044 Views)
Hello KentMartin,
 
Instead of the path to your msi file, you can pass the installer GUID associated with your application.
In CVI, you can find this information after pressing the Advanced button on the Distribution Kit dialog, or in Wise for Windows Installer, you can find this information on the Project Summary page.
 
The command line call would look something like:
msiexec.exe /x {GUID}
 
Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
Message 4 of 7
(4,036 Views)
I'm trying to programmatically uninstall CVI 5.5 application through labwindows then install a CVI 7.1 application.  The problem am having is uninst.exe (CVI 5.5) starts and has not finished and the filename.msi (CVI 7.1) starts installation.  I need a method to control uninstallation and then start new installation.  Note:  as a standalone program or through the DOS prompt uninst.exe works fine.
 
I have used the following function for control:
GetFileInfo()
FindFirstChangeNotification()
WaitForSingleObject()
 
to know avail.  The *.msi complete and than uninst.exe complete with no files in "c:\directoryname". 
 
CVI 5.5 - unstall
sprintf(cmd, "c:\\directoryname\\uninst.exe");   
returnVal0 = LaunchExecutable(cmd);               
CVI 7.1 installation
strcpy (ExePath, "msiexec /x \"D:");     
strcat (ExePath, "\\");                                                              
strcat (ExePath, "directoryname\\filename.msi\""); 
 
Thank you,
Dawn   
                                                                                                
0 Kudos
Message 5 of 7
(3,901 Views)

Kent,

With CVI 7.1 the installation kit is it's own uninstaller.  If you "install" it a second time it will uninstall the previous installation.

-- Don

0 Kudos
Message 6 of 7
(3,892 Views)
Hello,
 
What you need to do is call LaunchExecutableEx and get the handle for uninst.exe.  Then use the function ExecutableHasTerminated with the handle from LaunchExecutableEx to determine when to move on.  Otherwise if you read the help on LaunchExecutable it continues without waiting for the process to stop, unlike a batch file in DOS which always waits for the previous call to complete before moving on.
 
Jeff
NI
0 Kudos
Message 7 of 7
(3,862 Views)