Jump to content

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)

 

Share this post


Link to post
Share on other sites

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


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-01-22 - Version 0.1.0.0) - Download - General Help & Support
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Local $iReturn = RunWait('msiexec /i \\@ScriptDir & \VNC UltraVnc_1224_X64.msi /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent ' )

Returns 1639

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

Returns 0

Share this post


Link to post
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 (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-01-22 - Version 0.1.0.0) - Download - General Help & Support
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
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 (2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-03-02 - Version 1.3.5.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (2019-01-22 - Version 0.1.0.0) - Download - General Help & Support
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

When I run this test, I get this:

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

MSITest2).jpg.79ba387951ee0572598fb34234d9156c.jpg

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
Share on other sites

I added a working directory:

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

I'm still getting the Windows Installer error window.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

×
×
  • Create New...