Docfxit Posted April 22, 2019 Share Posted April 22, 2019 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 More sharing options...
water Posted April 22, 2019 Share Posted April 22, 2019 You need to provide more information. What is the value of $iReturn? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
buymeapc Posted April 22, 2019 Share Posted April 22, 2019 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 More sharing options...
Docfxit Posted April 22, 2019 Author Share Posted April 22, 2019 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 Link to comment Share on other sites More sharing options...
water Posted April 22, 2019 Share Posted April 22, 2019 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 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
water Posted April 22, 2019 Share Posted April 22, 2019 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 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
Docfxit Posted April 22, 2019 Author Share Posted April 22, 2019 (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 April 22, 2019 by Docfxit Link to comment Share on other sites More sharing options...
orbs Posted April 22, 2019 Share Posted April 22, 2019 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 More sharing options...
Docfxit Posted April 22, 2019 Author Share Posted April 22, 2019 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') Link to comment Share on other sites More sharing options...
Docfxit Posted April 22, 2019 Author Share Posted April 22, 2019 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 More sharing options...
orbs Posted April 22, 2019 Share Posted April 22, 2019 (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 April 22, 2019 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 More sharing options...
Docfxit Posted April 22, 2019 Author Share Posted April 22, 2019 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. Link to comment Share on other sites More sharing options...
Docfxit Posted April 22, 2019 Author Share Posted April 22, 2019 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 More sharing options...
Danny35d Posted April 22, 2019 Share Posted April 22, 2019 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 restartSuppresses a reboot at the end of the installation. Not required since the installation no longer requires are boot./silent or /very silentSuppresses 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./logWrites 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 More sharing options...
Docfxit Posted April 22, 2019 Author Share Posted April 22, 2019 (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 April 23, 2019 by Docfxit Link to comment Share on other sites More sharing options...
orbs Posted April 23, 2019 Share Posted April 23, 2019 @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 More sharing options...
Bert Posted April 23, 2019 Share Posted April 23, 2019 @Docfxit Look at my Vollatran project. It shows you what to do and may make your installation of software easier. The Vollatran project The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Docfxit Posted April 25, 2019 Author Share Posted April 25, 2019 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now