ufukkreis853 Posted April 21, 2020 Posted April 21, 2020 $powershell0 = '"Get-AppxPackage -allusers | foreach {Add-AppxPackage -register "$($_.InstallLocation)\appxmanifest.xml" -DisableDevelopmentMode}"' Runwait("powershell.exe" & " " & $powershell0) The $powershell0 command is the code to install windows store applications from the beginning. It runs smoothly when we run this code directly through powershell, but when run through Autoit, powershell cannot find where to install applications and gives such an error. I would appreciate if you can help, good forums.🙂
faustf Posted April 21, 2020 Posted April 21, 2020 ask , you just tryed with RUN command ? To run DOS (console) commands, try Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)Â Â Â ; don't forget " " before "/c" Â look in help F1 Â
ufukkreis853 Posted April 22, 2020 Author Posted April 22, 2020 5 hours ago, faustf said: ask , you just tryed with RUN command ?  To run DOS (console) commands, try Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE)   ; don't forget " " before "/c"  look in help F1  dont work
Aelc Posted April 22, 2020 Posted April 22, 2020 You could write a script with powershell and run it with autoit e.g. RunWait(@ComSpec & ' /c PowerShell.exe -ExecutionPolicy Bypass -File "' & @ScriptDir & '\POWERSHELL_SCRIPT.ps1"', "", @SW_HIDE) Â why do i get garbage when i buy garbage bags?Â
Bitnugger Posted April 22, 2020 Posted April 22, 2020 I think you have to run your script as "Administrator" to install apps... eg. RunAsWait ('Administrator', ...) Â
ufukkreis853 Posted April 22, 2020 Author Posted April 22, 2020 2 hours ago, Aelc said: You could write a script with powershell and run it with autoit e.g. RunWait(@ComSpec & ' /c PowerShell.exe -ExecutionPolicy Bypass -File "' & @ScriptDir & '\POWERSHELL_SCRIPT.ps1"', "", @SW_HIDE)   Thanxx it is work 😄
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