. NET vs Installer Setup Project failure rollup

Source: Internet
Author: User

1. Commit phase, call Mysql-connector-net-6.6.5.msi error using VBS

The VBS script is as follows:

Solution:

Open the%temp% directory to see the file name beginning with the MSI. Log end of the installation error logging file (random name, such as MSIeb1c8.LOG) ... Win7 the file is generated by default, and XP is said to need to set click to open link

Then put the above code WScript.CreateObject .... The WScript deleted

2. The build or commit phase in the Setup project executes the following VBS, Wshshell.run Strcmd is not successful in execution ... The reason may be that although the Install.exe and Mysql-connector-net-6.6.5.msi files have been copied to the installation directory, this state has not yet been committed, so the script still cannot find the two files

     Dim Wshshell,strpath, Strpathtarget, Strcmd, FSO     ' On Error Resume Next     Set WshShell = CreateObject (" Wscript.Shell ")     Set fso = CreateObject (" Scripting.FileSystemObject ")     strpath = Session.property (" CustomActionData ") &" Install.exe "  (Install.exe is msiexec.exe)     Strpathtarget = Session.property (" CustomActionData ") &" Mysql-connector-net-6.6.5.msi "     ' These quotes are pretty annoying, just wrap the whole statement in a pair of quotes Strcmd =" ""     & Strpath & "/I" & Strpathtarget & "" "       MsgBox strcmd     wshshell.run strcmd    ' If the script changes below, the file path exists, The installation package is installed successfully.     wshshell.run "e:\workstation\install.exe/i E:\workstation\mysql-connector-net-6.6.5.msi"

3. The workaround, copy the Mysql-connector-net-6.6.5.msi to the setup.exe/installation package directory, will not be packaged into the installation package, the user executes the installation package, through Originaldatabase get the installation package path, Thus finding the absolute path of the mysql-connector, and then executing it, WIN7 under test

 Dim WshShell, Strsetupmsipath, Strdir, Strexecpath, Strexectarget, Strcmd, FSO ' On Error Resume Next Set WshShell = CreateObject     ("Wscript.Shell") Set fso = CreateObject ("Scripting.FileSystemObject") ' CustomActionData is [originaldatabase] Strsetupmsipath = Session . Property ("CustomActionData") Strdir = Getdir (Strsetupmsipath, "Mealbookersetup.msi") Strexecpath = Strdir & " Install.exe "Strexectarget = strdir &" Mysql-connector-net-6.6.5.msi "Strcmd = Strexecpath &"/I "& Strexectar Get (Strcmd itself is a string, so this part of the code Snippet 2 is also problematic, should be both sides of the double quotes removed) MsgBox strcmd wshshell.run strcmd ' wshshell.run ' msiexec.exe/i d:\p Rogram files\mealbooker\mysql-connector-net-6.6.5.msi "Private Function getdir (fullpath, filename) Dim pospo s = 0pos = InStr (FullPath, filename) if pos>0 then Getdir = Left (FullPath, pos-1) Else Getdir = "" End If End Function 

Resources








. NET vs Installer Setup Project failure rollup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.