quietus24 Posted February 21, 2008 Posted February 21, 2008 Hi All, I am trying to create a script that allows a machine name to entered into an Inputbox and that input use in a comspec line....I have not been successfuly. I have put it in single quotes, double, etc. Not sure how to accomplish this. Look through help file, this seemed to specific.THANKS!$answer = InputBox("Bitlocker Recover Password Query", "Enter the Machine Name", "", "", _ -1, -1, 0, 0) RunWait(@ComSpec & " /k " & 'dsquery * "CN=$answer,OU=Workstations,OU=Practice Office,DC=us,DC=Company,DC=com" -scope subtree -attr msFVE-RecoveryPassword',"", @SW_MAXIMIZE)
Swift Posted February 21, 2008 Posted February 21, 2008 RunWait(@ComSpec & " /k " & 'dsquery * "CN=" & $answer & ",OU=Workstations,OU=Practice Office,DC=us,DC=Company,DC=com" -scope subtree -attr msFVE-RecoveryPassword',"", @SW_MAXIMIZE) Hope It Helps. Thanks. Swift
quietus24 Posted February 21, 2008 Author Posted February 21, 2008 RunWait(@ComSpec & " /k " & 'dsquery * "CN=" & $answer & ",OU=Workstations,OU=Practice Office,DC=us,DC=Company,DC=com" -scope subtree -attr msFVE-RecoveryPassword',"", @SW_MAXIMIZE) Hope It Helps. Thanks. Swift SWIFT!!! Thanks a lot... that was close.....had to surround the variable with single quotes as you cannot have doubles within double next to each other..... THANKS!
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