Jump to content
Sign in to follow this  

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

Share this post

Link to post
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


Share this post

Link to post
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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.