Hi.
I have an .ahk script containing the following single line (really this line is causing my problem)
RunWait, Powershell.exe -NoExit -Command $mycred = New-Object System.Management.Automation.PSCredential ("[email protected]", "testpasswd")
but the script fails with this error:
Missing closing ')' in expression.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndParenthesisInExpression
Please help.
Problem running a powershell command
Re: Problem running a powershell command
Perhaps you should try to assign the variable before sending it to Powershell?
I was also going to suggest that you are not actually giving it a command:
-NoExit -Command $mycred = New-Object System.Management.Automation.PSCredential ("[email protected]", "testpasswd")
Not sure if that will help or not....
I was also going to suggest that you are not actually giving it a command:
-NoExit -Command $mycred = New-Object System.Management.Automation.PSCredential ("[email protected]", "testpasswd")
Not sure if that will help or not....
Who is online
Users browsing this forum: Theda and 142 guests