Jump to content

Applying a product key via WIM manager vs. Autounattend Answer File


yogurt

Recommended Posts

What is the difference between applying a Product Key via WIM manager and Applying a product key via the Unattended Tool?

If their is a difference, what is difference in the in mechanics behind the two methods?

Any one?

* Bump *

Edited by Legolash2o
Link to comment
Share on other sites

Lego, thanks for your insight. I have searched google, but my keywords to not yeild any answers pertaining to how the Win Toolkit WiM Manager tool which is where I found the option in question. Nor does searching the forum at WinCert yield any info.

I was just curious as to why Win Tool Kit has two sections to apply a Product Key. one section in Unattended Tool and the other in WIM Manager Tool.

I'll leave the question open for anyone else who might have some further insight.

Edited by dotfusion
Link to comment
Share on other sites

Using WIM Manager integrate the Key inside the image and we don't need to add the key inside Autounattend.xml file.

If the key isn't integrate with WIM Manager, we must add the key inside Autounattend.xml file for the silent installation.

HTH

Edited by myselfidem
Link to comment
Share on other sites

Thank you for your response myselfidem. The spontaneous question that comes to min is, when integrating the key using WIM Manager, where on the image is the key saved? More importantly, is the key integrated to the WIM encrypted or is stored in a plain text file?

Edited by dotfusion
Link to comment
Share on other sites

However I not tested to integrate the key using WIM Manager with WinToolkit.

I made many times using DISM /Set-Productkey to create SetProductKey on my sig below.

However I don't know where is saved the key inside install.wim image and if this one is crypted...

But we can try, and after the key is integrated, mounting a new time the image to look where is located the key!

*Edit: I'm trying a new test to see where the key is located. Maybe this can be found inside the dism.log file inside the mounted image. I tell you later, if I found!

Edited by myselfidem
Link to comment
Share on other sites

Of course (bien sûr)!

You can click on my sig below: SetProductkey to download the file. I just tested and works fine. And all the files you can see are available to download. Try again and let me know. Thanks

However, you can try this download link:


http://www.mediafire.com/?uss84mzbqo91q

Edited by myselfidem
Link to comment
Share on other sites

After looking at the key inside the mounted image, I see that the integrated key using: DISM /Set-ProductKey is inside the registry of the selected image with hexadecimal values!

How to know that?

1 - We can mount the customized image inside a temp folder (example Windows 7 Starter)

2 - We need to load the hive WIM_Software using a batch file:

Hive.cmd


@echo off
Color 0A
echo.
"C:\Program Files\Windows AIK\Tools\x86\Servicing\Dism.exe" /Mount-Wim /Wimfile:"C:\Se7en\sources\install.wim" /index:1 /MountDir:"C:\zMount"
echo.
pause
reg.exe load HKLM\WIM_Software "C:\zMount\Windows\System32\config\SOFTWARE"
echo.
pause

Once done, we can use Powershell with this code to convert the DigitalID Product of Windows 7 Starter Key:

Open Powershell and copy/past this code (available for the loaded hive:WIM_Software):


function Get-ProductKey {
$map="BCDFGHJKMPQRTVWXY2346789"
$value = (get-itemproperty "HKLM:\WIM_Software\Microsoft\Windows NT\CurrentVersion").digitalproductid[0x34..0x42]
$ProductKey = ""
for ($i = 24; $i -ge 0; $i--) {
$r = 0
for ($j = 14; $j -ge 0; $j--) {
$r = ($r * 256) -bxor $value[$j]
$value[$j] = [math]::Floor([double]($r/24))
$r = $r % 24
}
$ProductKey = $map[$r] + $ProductKey
if (($i % 5) -eq 0 -and $i -ne 0) {
$ProductKey = "-" + $ProductKey
}
}
$ProductKey
}
Get-ProductKey

We can see the result matching the key integrated using DISM /Set-ProductKey with Powershell.

Help found here:

http://powershell.co...roduct-key.aspx

Images (Loaded WIM_Software hive, and Powershell matching the integrated key).

Edited by myselfidem
Link to comment
Share on other sites

Thanks dotfusion! :)

We can also use this batch file to know the Windows key inside runing Operating System using powershell:

Get-Productkey.cmd


;@echo off & Title Get-Productkey
;Findstr -rbv ; %0 | powershell -c -
;goto:sCode

Function Get-ProductKey
{
$map="BCDFGHJKMPQRTVWXY2346789"
$value = (get-itemproperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").digitalproductid[0x34..0x42]
$ProductKey = ""
for ($i = 24; $i -ge 0; $i--) {
$r = 0
for ($j = 14; $j -ge 0; $j--) {
$r = ($r * 256) -bxor $value[$j]
$value[$j] = [math]::Floor([double]($r/24))
$r = $r % 24
}
$ProductKey = $map[$r] + $ProductKey
if (($i % 5) -eq 0 -and $i -ne 0) {
$ProductKey = "-" + $ProductKey
}
}
$ProductKey
}
Get-ProductKey


Get-ProductKey >C:\Productkey.txt

;:sCode
;echo.
;echo = Windows Key saved at C:\Productkey.txt file =
;echo.
;pause & goto :eof

Found help here:

http://dmitrysotniko...e/#comment-4047

We can also change the reg key path to know the key inside the mounted image and change the reg key to:

HKLM:\WIM_Software\Microsoft\Windows NT\CurrentVersion

Enjoy!

Get-ProductKey.rar

Edited by myselfidem
Link to comment
Share on other sites

I was just curious as to why Win Tool Kit has two sections to apply a Product Key. one section in Unattended Tool and the other in WIM Manager Tool.

Some people prefer the unattended file method whilst others prefer just to enter a command for the serial key, it's in there because someone requested it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...