Jump to content
Sign in to follow this  
Syekick

@Username.filetype syntax problem

Recommended Posts

Syekick

I'm trying to duplicate the following DOS command

certutil -importPFX -p "" c:\%username%.pfx

I can't figure out how to write that I want a specific file type (.pfx) for the logged on user, @UserName.

I've tried a lot of things that don't work. For example:

Run('certutil -importPFX -p c:\' & @UserName ".pfx")

Run('certutil -importPFX -p c:\' & @UserName & ".pfx")

Run('certutil -importPFX -p c:\' & @UserName & .pfx)

I've chanted, ranted, and raved at the script but that hasn't helped either.

A little direction if you please.

Edited by Syekick

Share this post


Link to post
Share on other sites
Syekick

Try:

Run(@Comspec & ' /c certutil -importPFX -p c:\' & @UserName & '.pfx')

:D

Great. I'd have never done this. Thanks. I can build from here. \

Thank you,

Now back to my attempt at certutil -restorekey

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.