Hackarin Posted July 7, 2023 Posted July 7, 2023 Hello, I am using a script to run an msi as a specific service account AD user that has local admin privileges in a network. ; Fill in the username and password appropriate for your system. Local $sUserName = "Redacted" Local $sPassword = "Redacted" Local $sDomain = "Redacted" ; Check for flag to indicate files already copied up If FileExists("C:\IT\SCCM\FlagFiles\ICWAddinInstalled.flg") Then Exit EndIf RunAsWait($sUserName, $sDomain, $sPassword, 0, 'msiexec /i "RedactedFilepath\CivicaOfficeAddinSetup.msi" /qb TARGETDIR="C:\Program Files (x86)\Civica\CivicaOfficeAddin\"') ; Create flag file $file = FileOpen("C:\IT\SCCM\FlagFiles\ICWAddinInstalled.flg", 10) FileWriteLine($file, "Done") FileClose($file) $msgbox = MsgBox(0, "Add-in Install Complete", "Clicking OK will open up the addin configuration document") ShellExecute("RedactedSharepointURL") Exit The following error is presented. Has anyone experienced this error before and got around it? Thanks in advance.
Andreik Posted July 7, 2023 Posted July 7, 2023 (edited) Try #RequireAdmin directive. Put in on the first line of your script. Edited July 7, 2023 by Andreik
Hackarin Posted July 10, 2023 Author Posted July 10, 2023 I got the same error unfortunately. But, what did happen initially was that this gave a UAC prompt which would ask a user who doesn't have the privileges to authenticate with credentials that do
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