levila Posted November 20, 2019 Share Posted November 20, 2019 (edited) Hi, I cant figure out how to run command in powershell with input value after that. My purpose is to run one single click autoit that can push to register new PS name on powershell. Here is my current script. #include <AutoItConstants.au3> $CMD = 'New-PSDrive' RunWait('"' & @ComSpec & '" /c Powershell.exe ' & $CMD, @SystemDir) and the screenshot was like this Big appreciate if u guys can help. Thanks Edited November 20, 2019 by levila misspell Link to comment Share on other sites More sharing options...
iamtheky Posted November 20, 2019 Share Posted November 20, 2019 have the user supply it beforehand, something like: $sName = inputbox('put yer name here'......... $CMD = 'New-psDrive ' & $sName levila 1 ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) 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