Sign in to follow this  
Followers 0
davzell13

Run powershell module with autoit

3 posts in this topic

#1 ·  Posted (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

Capturemodue.JPG

 

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)

Capture2.JPG

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  
Followers 0