Jump to content

Running an msi file


Recommended Posts

I can't get either one of these to run:

#include <MsgBoxConstants.au3>
#RequireAdmin
Local $iReturn = RunWait('msiexec /i \\@ScriptDir & \VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' )
;Local $iReturn = ShellExecuteWait('@ScriptDir & \VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent')
    MsgBox($MB_SYSTEMMODAL, "", "The return code from Notepad was: " & $iReturn)

 

Link to comment
Share on other sites

You need to provide more information.
What is the value of $iReturn?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Local $iReturn = RunWait('msiexec /i \\@ScriptDir & \VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' )

I think you're missing an extra quote here.

Local $iReturn = RunWait('msiexec /i \\' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' )

More importantly, what happens when you type msiexec.exe into a command prompt? You should get a "Windows Installer" window with command line options.

Link to comment
Share on other sites

1639 stands for

Quote

ERROR_INVALID_COMMAND_LINE

1639 (0x667)

Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.

Taken from: https://docs.microsoft.com/en-us/windows/desktop/debug/system-error-codes--1300-1699-

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Can't test at the moment but could you please try:

Local $iReturn = RunWait('msiexec.exe /i "\\@ScriptDir & \VNC UltraVnc_1224_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent')

or

Local $iReturn = ShellExecuteWait(@ScriptDir & \VNC UltraVnc_1224_X64.msi, '/loadinf=VNCConfig.ini /props=VNCsetup.reg /silent')

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

When I run it I get this:

Local  $iReturn = ShellExecuteWait(@ScriptDir & \VNC UltraVnc_1224_X64.msi, '/loadinf=VNCConfig.ini /props=VNCsetup.reg /silent')"
C:\Dnload\9xAddons\~Test2.au3"(5,6) : error: syntax error (illegal character)
Localï~~~~~^
"C:\Dnload\9xAddons\~Test2.au3"(5,6) : error: Statement cannot be just an expression.
Localï~~~~~^

 

 

 

Edited by Docfxit
Link to comment
Share on other sites

as @buymeapc said, you are not escaping your strings properly. look at the colors, they are here for a reason.

also, you need to remove the double-backslash before @Scriptdir. it has no business being there. do that to his solution and run, see what you get.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

When I run this test:

Local $iReturn = RunWait('msiexec /i ' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' )

I get the Windows Installer window.

 

NOTE: I can't upload any more screen prints.  I keep getting an error saying: You are only allowed to upload 51.2kb even though the screen prints are 21kb.

Link to comment
Share on other sites

if your @ScriptDir has spaces in it, you need to enclose it with double-quotes, like this:

Local $iReturn = RunWait('msiexec /i "' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' )

you may also want to specify the working directory, the 2nd parameter for RunWait(), to your @ScriptDir, if the ini and reg files are there.

also, replace /silent with /quiet see here:

EDIT: @Docfxit, i think there is a confusion between the msiexec.exe command line arguments, and the specific VNC installer arguments. your command passes those arguments to the msiexec, which does not support /loadinf and /props. the latter should be passed to the .exe installer, not to the .msi - see here:

http://www.uvnc.com/install/installation.html

scroll down all the way to the "Automate Installation" section.

Edited by orbs

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

23 minutes ago, orbs said:

 

Local $iReturn = RunWait('msiexec /i "' & @ScriptDir & '\VNC UltraVnc_1224_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' )

EDIT: @Docfxit, i think there is a confusion between the msiexec.exe command line arguments, and the specific VNC installer arguments. your command passes those arguments to the msiexec, which does not support /loadinf and /props. the latter should be passed to the .exe installer, not to the .msi 

I'm sure you are correct.  The question is how to get the syntax correct so the options get passed to the Program being installed and not msiexec.exe

Link to comment
Share on other sites

48 minutes ago, Docfxit said:

I'm sure you are correct.  The question is how to get the syntax correct so the options get passed to the Program being installed and not msiexec.exe

@Docfxit

There are two UltraVnc installation packages.  One of the installation package is the .msi which NOT support /loadinf and /props switches.  The second installation package is the .exe which support /loadinf and /props switches.

 

Quote

Automate Installation

 If you need to install UltraVNC on a large number of computers, you might consider automating the installation.
The following command line parameters can be passed to the setup:

/dir="Dirname"
Sets installation directory to Dirname.
/no restart
Suppresses a reboot at the end of the installation.
Not required since the installation no longer requires are boot.

/silent or /very silent
Suppresses either pop-up of dialog boxes or any GUI at all.
/loadinf="Filename"
Loads the configuration file Filenamefor the installation.
This configuration file can be generated by going through setup with UltraVNC-xxxx-Setup.exe /saveinf="Filename".
Filename should be fully qualified.

/log
Writes a log file to the Temp directory.
Could be used for debugging.

 

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

I Danny,  Nice to hear from you.  

I have been testing with the exe.  I don't see the /props  command line option.

RunWait('"C:\Dnload\9xAddons\VNC UltraVNC_1_2_24_X86_Setup2.exe" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent, @TempDir')

I have been trying to get this to run:

RunWait('@ComSpec & " /c "C:\Dnload\9xAddons\VNC UltraVNC_1_2_24_X86_Setup2.exe" /loadinf="VNCConfig.ini" /very silent, @TempDir')

RunWait('regsvr32 /s "' & @ScriptDir & '\VNCsetup.reg"')

Nothing runs.  No errors.

I'm trying to run this in Win10 64bit

Edited by Docfxit
Link to comment
Share on other sites

@Docfxit, again, you are encapsulating your strings wrong. @TempDir is literally included in the command you run. review your command carefully, look at the colors - red is a literal string - and understand which quote and double-quote is closed by which.

as for the registry - you need to use reg.exe, not regsvr32.exe

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

@Bert  Thanks for pointing me to your Vollatran project.  I have been using kTool ver.1.1a since 2004.

The only option I see on your line is this example:

runwait = msiexec /i "\\Server\APPS\Single_Signon_Manager\SSO_v6\NovellSecureLogin_6.0_Patch.msi" /passive /norestart

That shows options for msiexec.  The problem I am having is including options for the msi install file.

 

I didn't know anyone else was using the original kTool.  That's great of you to provide it for everyone.  It's a big help to install software on PC's.

Thanks,

Docfxit

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...