Syekick Posted January 20, 2008 Share Posted January 20, 2008 I'm having a syntax problem with a line of code. I'm trying to duplicate the cmd line on an XP machine. The cmd line would read: cipher /x c:/%username% If the logged on user was "Bob" the result of the above would be a file on the root of c: as c:\bob.pfx Now, in autoit the command I expected it to work as this: Run("cipher.exe /x c:\@UserName") It runs but the result is a file on the root of c: called c:\@UserName.pfx I've tried chopping it up with varies "" and '' brackets etc. I just can not find a solution. Sigh. Can this be done? Thanks Link to comment Share on other sites More sharing options...
therks Posted January 21, 2008 Share Posted January 21, 2008 Run("cipher.exe /x c:\" & @UserName) My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Syekick Posted January 21, 2008 Author Share Posted January 21, 2008 Run("cipher.exe /x c:\" & @UserName)That's it. Thank you very, very much!! 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