Jump to content

Run powershell module with autoit

Recommended Posts


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 by davzell13
Link to comment
Share on other sites

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


Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...