Sign in to follow this  
Followers 0
Parsix

import protected pfx file to Windows XP

2 posts in this topic

#1 ·  Posted

Hi

i try import protected pfx file to Windows XP by CertUtil

i need add a pfx to this CertificateStoreName:

  • "Trusted Root Certification Authorities"
  • "Trusted Publishers"
  • "Third-Party Root Certification Authorities"

certutil import pfx to  Windows 10 by this command
 

Local $path_OSSys=@WindowsDir&"\System32"
    If @OSArch="X64" Or  @OSArch="IA64" Then $path_OSSys=@WindowsDir&"\SysWOW64"

    $command="certutil.exe -f -p " & $password &'  -importPFX TrustedPublisher "' & $pfx & '"'
    $iPID = Run($path_OSSys&"\CMD.exe" & " /C " & $command,"",@SW_HIDE)
    ProcessWaitClose($iPID)

    $command="certutil.exe -f -p " & $password &'  -importPFX AuthRoot"' & $pfx & '"'
    $iPID = Run($path_OSSys&"\CMD.exe" & " /C " & $command,"",@SW_HIDE)
    ProcessWaitClose($iPID)

work fine.

 

in Windows XP :

i add certutil.exe and certadm.dll (Windows Server 2003 -v5.2.3790) to System Folder ($path_OSSys)

but it can't support CertificateStoreName and only add this command line

Local $path_OSSys=@WindowsDir&"\System32"
    If @OSArch="X64" Or  @OSArch="IA64" Then $path_OSSys=@WindowsDir&"\SysWOW64"

    $command="certutil.exe -f -p " & $password &'  -importPFX "' & $pfx & '"'
    $iPID = Run($path_OSSys&"\CMD.exe" & " /C " & $command,"",@SW_HIDE)
    ProcessWaitClose($iPID)

it add to pepole only.

 

How to add pfx to "Trusted Root Certification Authorities", "Trusted Publishers" and "Third-Party Root Certification Authorities"  (Windows XP only)?

how to convert and use X509Store (C# codes here)



  X509Store store = new X509Store(StoreName.TrustedPublisher, StoreLocation.LocalMachine);
  store.Open(OpenFlags.ReadWrite);
  store.Add(new X509Certificate2(PFX, "myPass", X509KeyStorageFlags.MachineKeySet));
  store.Close();

  X509Store store2 = new X509Store(StoreName.AuthRoot, StoreLocation.LocalMachine);
  store2.Open(OpenFlags.ReadWrite);
  store2.Add(new X509Certificate2(PFX, "myPass", X509KeyStorageFlags.MachineKeySet));
  store2.Close();

 

Share this post


Link to post
Share on other sites



#2 ·  Posted

any solution?

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  
Followers 0

  • Similar Content

    • colombeen
      By colombeen
      Hi guys,
      I have a pretty advanced question...
       
      This is the issue i'm facing :
      On a regular basis we need to install pfx certificates (with password protection) on devices from external companies.
      To install the certificate we always have to contact the user, setup a really dull and long process to get an RDP session to that device, install the certificate.
       
      I'm looking for :
      a way to generate exe files on the fly, that will include the pfx file and password, and automatically install them without any interaction from the user, and the user not being able to retrieve the password to install the certificate.
       
      Question :
      Is this possible with AutoIT? And if so, does anyone have a working example for the certificate installation part or the auto generate with file include?
       
      Thx in advance
      colombeen
    • BrewManNH
      By BrewManNH
      It appears that the MSDN site has given up totally on supporting XP or assisting those that are still on it. If you do a search for any control reference information on MSDN you'll see that almost all mention of XP has been expunged, and Vista is usually listed as the minimum supported client now. I noticed this the other day when looking up the EM_SETCUEBANNER information, and I've seen it on every listview variable/macro I've looked up as well. So, don't be surprised if you see topics with remarks that say such-and-such setting or variable doesn't work on XP because MSDN says it's Vista+.
      Also, don't be surprised if in the future that some of the Windows APIs drop backwards compatibility for supposedly unsupported clients such as XP.
    • Edano
      By Edano
      i searched the forum, but didn't find anything.
      has anyone an idea or ever done it with autoit ? simple image transforming, like sharpness, brightness, blurring etc. ?
      maybe, does gdiplus.dll feature that ?
      here is a tutorial on how to do it the hard (mathematical) way. http://lodev.org/cgtutor/filtering.html before i try that, i wanted to know if there is already an existing project or an idea or anyone has experiences.
      thx