oemript Posted July 4, 2018 Share Posted July 4, 2018 (edited) Referring to following coding, I would like to know on executing powershell or batchfile within AutoIT as shown below Does anyone have any suggestions on how to implement under AutoIT environment? Thanks in advance for any suggestions #include <IE.au3> While ProcessExists("iexplore.exe") ProcessClose("iexplore.exe") WEnd Global $oIE = _IECreate("https://www.cnn.com") Sleep(3000) _IEQuit($oIE) Powershell -ExecutionPolicy Unrestricted -File D:\test.ps1 OR D:\test.bat Edited July 4, 2018 by oemript Link to comment Share on other sites More sharing options...
MrKris1224 Posted July 4, 2018 Share Posted July 4, 2018 _RunDos() Link to comment Share on other sites More sharing options...
oemript Posted July 5, 2018 Author Share Posted July 5, 2018 The following coding fail to run and get Error _RunDos("D:\Temp\ABC.bat") Do you have any suggestions on what wrong it is? Thank you very much for any suggestions (^v^) Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 5, 2018 Moderators Share Posted July 5, 2018 I'm not understanding what you want to do. If you just want to run a PowerShell command in AutoIt, you would do something like this: Run("powershell.exe <commands>") But why mix languages in your script? If you would explain what you're actually trying to do, it might help others help you. oemript 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
oemript Posted July 5, 2018 Author Share Posted July 5, 2018 (edited) Thanks, to everyone very much for suggestions (^v^) Edited July 6, 2018 by oemript Link to comment Share on other sites More sharing options...
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