Docfxit Posted October 15, 2022 Share Posted October 15, 2022 How can i fix this error? If @error Then _WinAPI_ShowLastError('%1 ' & %1 & @CRLF & 'Line ' & @ScriptLineNumber & @CRLF & 'Install Latest Version Error', 1) EndIf Link to comment Share on other sites More sharing options...
Subz Posted October 15, 2022 Share Posted October 15, 2022 Is the highlighted %1 suppose to be $1? '%1 ' & %1 & ... Link to comment Share on other sites More sharing options...
Docfxit Posted October 15, 2022 Author Share Posted October 15, 2022 (edited) Thanks for the reply... No. I'm getting an error with %1 So I would like to see what %1 is. Edited October 15, 2022 by Docfxit Link to comment Share on other sites More sharing options...
Subz Posted October 15, 2022 Share Posted October 15, 2022 Remove the second %1, which I highlighted above: _WinAPI_ShowLastError('%1 ' & %1 Or use _WinAPI_ShowLastError('%1 %1' & @CRLF Link to comment Share on other sites More sharing options...
Docfxit Posted October 15, 2022 Author Share Posted October 15, 2022 (edited) _WinAPI_ShowLastError('%1 %1' & @CRLF Does work but it only shows %1 %1. It doesn't show what the value of %1. I also tried: Edited October 15, 2022 by Docfxit Link to comment Share on other sites More sharing options...
Subz Posted October 16, 2022 Share Posted October 16, 2022 (edited) Not sure what you mean, the error will be shown below the text you've written for example: #include <WinAPIError.au3> Run("Error", "", @SW_HIDE) _WinAPI_ShowLastError("Line Number: " & @ScriptLineNumber & @CRLF & "Install Latest Version Error", True) Resulting Window Quote Line Number: 4 Install Latest Version Error The system cannot find the file specified Edited October 16, 2022 by Subz Link to comment Share on other sites More sharing options...
Docfxit Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) This code: RunWait('"C:\Dnload\9xAddons\VNC UltraVnc_1_3_81_X64.msi" /loadinf="VNCConfig.ini" /props="VNCsetup.reg" /silent') If @error Then _WinAPI_ShowLastError('Line ' & @ScriptLineNumber & @CRLF & 'Install Latest Version Error', True) EndIf Gives me this: I'd like to know what %1 is. Edited October 16, 2022 by Docfxit Link to comment Share on other sites More sharing options...
Subz Posted October 16, 2022 Share Posted October 16, 2022 The %1 is what is being returned by the product, I would just use something like: #include <WinAPIError.au3> Global $g_sExec = "Error.exe" Run($g_sExec, "", @SW_HIDE) _WinAPI_ShowLastError($g_sExec & " returned:", True) Link to comment Share on other sites More sharing options...
Docfxit Posted October 16, 2022 Author Share Posted October 16, 2022 6 minutes ago, Subz said: The %1 is what is being returned by the product, I would just use something like: #include <WinAPIError.au3> Global $g_sExec = "Error.exe" Run($g_sExec, "", @SW_HIDE) _WinAPI_ShowLastError($g_sExec & " returned:", True) That gives me this error: I don't know what file it can't find. Link to comment Share on other sites More sharing options...
Docfxit Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) I have changed my RunWait to this: Quote RunWait('msiexec.exe /i "C:\Dnload\9xAddons\VNC UltraVnc_1_3_81_X64.msi /loadinf=VNCConfig.ini /props=VNCsetup.reg /silent" /quiet /qb-') Which doesn't give me any errors but the program doesn't install So something is wrong with my .msi options. Edited October 16, 2022 by Docfxit Link to comment Share on other sites More sharing options...
Subz Posted October 16, 2022 Share Posted October 16, 2022 Have you tried using quotes around the path: RunWait('msiexec.exe /i "C:\Dnload\9xAddons\VNC UltraVnc_1_3_81_X64.msi" /loadinf=VNCConfig.ini /props=VNCsetup.reg /silent /qb-') Link to comment Share on other sites More sharing options...
Docfxit Posted October 16, 2022 Author Share Posted October 16, 2022 3 minutes ago, Subz said: Have you tried using quotes around the path: RunWait('msiexec.exe /i "C:\Dnload\9xAddons\VNC UltraVnc_1_3_81_X64.msi" /loadinf=VNCConfig.ini /props=VNCsetup.reg /silent /qb-') Yes. I tried that. I think the msiexec.exe was looking at the /silent switch and didn't think it was valid. The /silent switch is for the ULTRAVNC install. Link to comment Share on other sites More sharing options...
Docfxit Posted October 16, 2022 Author Share Posted October 16, 2022 (edited) I removed the space in the file name For some reason the program isn't installing. RunWait('msiexec.exe /i "C:\Dnload\9xAddons\VNCUltraVnc_1_3_81_X64.msi /loadinf=VNCConfig.ini /props=VNCsetup.reg /silent" /quiet /qn') Edited October 16, 2022 by Docfxit Link to comment Share on other sites More sharing options...
Subz Posted October 16, 2022 Share Posted October 16, 2022 You seem to be mixing ".exe" switches with ".msi" switches To install UltraVNC (downloaded directly to C:\Dnload\9xAddons\UltraVnc_1381_x64 Installs fine with the following: RunWait('msiexec.exe /i "C:\Dnload\9xAddons\UltraVnc_1381_X64.msi" /qb') If you want to modify the settings either use ultravnc 1381 X64 setup.exe and use the following:Installation - UltraVNC VNC OFFICIAL SITE, Remote Desktop Free Opensource (uvnc.com) 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