Jump to content
Sign in to follow this  
Syekick

Run Syntax

Recommended Posts

Syekick

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

Share this post


Link to post
Share on other sites
Syekick

Run("cipher.exe /x c:\" & @UserName)

That's it. Thank you very, very much!!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.