Please Copy & Delete Command for pkeyconfig.xrm-ms & tokens.dat

Discussion in 'Windows 7' started by cali, Feb 3, 2010.

  1. cali

    cali MDL Novice

    Feb 3, 2010
    17
    0
    0
    Hi All,

    I've installed Windows 7 by USB and used MSDN keys to activate. Then I backed up 2 files pkeyconfig.xrm-ms & tokens.dat. Now I'd make a DVD with those 2 files & Key added in. So that I can re-install Windows sometime later and It automatically installs those 2 files & Key and activate offline.

    I create folders $OEM$\$$\system32\OEM with pkeyconfig.xrm-ms & tokens.dat in OEM and put them in sources folder.

    My question is that What command lines to delete them, then Copy backup files in same directory ??

    I'm appreciated for all your help.

    Thanks in advance.
     
  2. sam3971

    sam3971 MDL Guru

    Nov 14, 2008
    2,220
    303
    90
    I would ask Hazar dude. You will need more commands then just delete/copy commands. You will also have to temporarly disable the software protection service to copy those files then start the service again after it is done. Another person you can ask would be PayMyRent because hr wrote the token restore tool so I am guessing that there may be some silent option or just batch codes like you are asking for.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. urie

    urie Moderator
    Staff Member

    May 21, 2007
    8,707
    3,064
    300
  4. Veegertx

    Veegertx MDL Junior Member

    Jul 23, 2009
    63
    16
    0
    #4 Veegertx, Feb 3, 2010
    Last edited by a moderator: Apr 20, 2017
    mount image I call it D:\zMountDir

    Code:
    Inject your key or put it in xml
    Dism /image:D:\zMountDir /Set-ProductKey:xxxxx-xxxxx-xxxxx
    
    Following 4 lines may or may not be necessary but don't hurt
    cmd.exe /c takeown /f "D:\zMountDir\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms"
    cmd.exe /c icacls "D:\zMountDir\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms" /grant *S-1-5-32-544:F
    cmd.exe /c takeown /f "D:\zMountDir\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat"
    cmd.exe /c icacls "D:\zMountDir\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" /grant *S-1-5-32-544:F
    
    copy
    C:\Windows\System32\spp\tokens\pkeyconfig\pkeyconfig.xrm-ms to same place on Mount
    C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat to same place on Mount
    thats it dismount with commit and create the iso
     
  5. Dolorous Edd

    Dolorous Edd MDL Expert

    Aug 31, 2009
    1,054
    194
    60
    #5 Dolorous Edd, Feb 3, 2010
    Last edited by a moderator: Apr 20, 2017
    Now if paymyrent would add this option to his utility.............................
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Veegertx

    Veegertx MDL Junior Member

    Jul 23, 2009
    63
    16
    0
    Thats all he's doing I asked him
    I just wanted to include that stuff in my own application so it's done when you hit the desktop, I didn't want to call his thing in setupcomplete.cmd or something
    I'm activated when I hit the desktop doing it that way but his thing is ok if you want to do it after
     
  7. cyclops

    cyclops MDL Senior Member

    Sep 10, 2007
    299
    39
    10
    i think paymyrent is working on updating his app to do just that. it would be awesome if we can install it from a dvd.
     
  8. cali

    cali MDL Novice

    Feb 3, 2010
    17
    0
    0
    #8 cali, Feb 3, 2010
    Last edited: Feb 4, 2010
    (OP)
    Hi All,

    I'd like to say thank you to all of you for your suggestions and help. I successfully make a own DVD with offline activation after re-installation.

    Thanks again.

    I'm wondering if someone need the instruction how-tos, I will post the method.

    Have a nice day to all.
     
  9. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,462
    419
    60
    instead of have the retail and mak versions it will be all in one :p
     
  10. FreeStyler

    FreeStyler MDL Guru

    Jun 23, 2007
    3,502
    3,613
    120
    Cool :) Could you insert Vista and Server 2008 / Server 2008 R2 support as well?
     
  11. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,462
    419
    60
    if you get me the file paths because i dont like to work with vista
     
  12. cali

    cali MDL Novice

    Feb 3, 2010
    17
    0
    0
    Here it is.

    For Windows Vista

    pkeyconfig.xrm-ms

    C:\Windows\System32\licensing\pkeyconfig

    tokens.dat

    C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareLicensing