davzell13 Posted July 4, 2016 Posted July 4, 2016 (edited) Hi, I try to lauch a powershell command with autoit but i have a problem. The command come from an extern module. This is this module https://www.powershellgallery.com/packages/HPWarranty/2.5.9 When i lauch the command without autoit, it’s ok. The command : powershell.exe –noexit Get-HPEntWarrantyEntitlement -productNumber J9660A -serialnumber CN47DXY2B8 But if i lauch with autoit i have this error. I have try with many script but same error. $sCMD = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe –noexit –noexit" $pid = Run($sCMD, @SystemDir, @SW_SHOW) I think it’s because the command come from an added module. How can i lauch this command in autoit ? Thanks in advance and excuse my english Edited July 4, 2016 by davzell13
JohnOne Posted July 4, 2016 Posted July 4, 2016 That command does not even reference "Get-HPEntWarrantyEntitlement", so no idea where the error is coming from. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
davzell13 Posted July 5, 2016 Author Posted July 5, 2016 i have found the problem. if i use the powershell in SYSWOW i have an error. But if i use the 32bits version it's ok I have add this line on top of my script _WinAPI_Wow64EnableWow64FsRedirection ( False ) and it's ok
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