Jump to content

Cum aflu licenta folosita in Windows 10?


Recommended Posts

Stiu ca erau cateva posibilitati de a vedea cheia de licenta folosita la preinstalarea Windows-ului, insa nu imi mai vin acum in minte si cel mai simplu imi este sa intreb aici. Am o situatie cu un laptop ce a venit cu sistemul de operare preinstalat, proprietarul nu stie product key-ul, nici vreun sticker pe el nu este lipit, si as avea nevoie de cheie pentru reinstalare.

Multumesc anticipat!

Ultimul meu topic interesant: Ce este un laptop Nova?
Vizitez des sectiunea de Cerinte de Sistem.

Link to comment
Share on other sites

Sunt mai multe metode:

1. Poti folosi un programel portabil (ce nu necesita instalare): ShowKeyPlus
2. Folosind Command Prompt (Start -> CMD) si comanda:

wmic path softwarelicensingservice get OA3xOriginalProductKey

3. Folosind Windows PowerShell (Start -> PowerShell) si comanda:

powershell "(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey"

Tot in PowerShell, dar de aceasta data va trebui sa creezi un fisier cu extensia .ps1 in Notepad pe care sa-l rulezi in cu Windows PowerShell:

#Main function
Function GetWin10Key
{
	$Hklm = 2147483650
	$Target = $env:COMPUTERNAME
	$regPath = "Software\Microsoft\Windows NT\CurrentVersion"
	$DigitalID = "DigitalProductId"
	$wmi = [WMIClass]"\\$Target\root\default:stdRegProv"
	#Get registry value 
	$Object = $wmi.GetBinaryValue($hklm,$regPath,$DigitalID)
	[Array]$DigitalIDvalue = $Object.uValue 
	#If get successed
	If($DigitalIDvalue)
	{
		#Get producnt name and product ID
		$ProductName = (Get-itemproperty -Path "HKLM:Software\Microsoft\Windows NT\CurrentVersion" -Name "ProductName").ProductName 
		$ProductID =  (Get-itemproperty -Path "HKLM:Software\Microsoft\Windows NT\CurrentVersion" -Name "ProductId").ProductId
		#Convert binary value to serial number 
		$Result = ConvertTokey $DigitalIDvalue
		$OSInfo = (Get-WmiObject "Win32_OperatingSystem"  | select Caption).Caption
		If($OSInfo -match "Windows 10")
		{
			if($Result)
			{
				
				[string]$value ="ProductName  : $ProductName `r`n" `
				+ "ProductID    : $ProductID `r`n" `
				+ "Installed Key: $Result"
				$value 
				#Save Windows info to a file 
				$Choice = GetChoice
				If( $Choice -eq 0 )
				{	
					$txtpath = "C:\Users\"+$env:USERNAME+"\Desktop"
					New-Item -Path $txtpath -Name "WindowsKeyInfo.txt" -Value $value   -ItemType File  -Force | Out-Null 
				}
				Elseif($Choice -eq 1)
				{
					Exit 
				}
			}
			Else
			{
				Write-Warning "Porneste scriptul in Windows 10"
			}
		}
		Else
		{
			Write-Warning "Porneste scriptul in Windows 10"
		}
		
	}
	Else
	{
		Write-Warning "A aparut o eroare, nu s-a putut afisa cheia de produs"
	}

}
#Get user choice 
Function GetChoice
{
    $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes",""
    $no = New-Object System.Management.Automation.Host.ChoiceDescription "&No",""
    $choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes,$no)
    $caption = "Confirmare"
    $message = "Salvezi cheia intr-un fisier text?"
    $result = $Host.UI.PromptForChoice($caption,$message,$choices,0)
    $result
}
#Convert binary to serial number 
Function ConvertToKey($Key)
{
	$Keyoffset = 52 
	$isWin10 = [int]($Key[66]/6) -band 1
	$HF7 = 0xF7
	$Key[66] = ($Key[66] -band $HF7) -bOr (($isWin10 -band 2) * 4)
	$i = 24
	[String]$Chars = "BCDFGHJKMPQRTVWXY2346789"	
	do
	{
		$Cur = 0 
		$X = 14
		Do
		{
			$Cur = $Cur * 256    
			$Cur = $Key[$X + $Keyoffset] + $Cur
			$Key[$X + $Keyoffset] = [math]::Floor([double]($Cur/24))
			$Cur = $Cur % 24
			$X = $X - 1 
		}while($X -ge 0)
		$i = $i- 1
		$KeyOutput = $Chars.SubString($Cur,1) + $KeyOutput
		$last = $Cur
	}while($i -ge 0)
	
	$Keypart1 = $KeyOutput.SubString(1,$last)
	$Keypart2 = $KeyOutput.Substring(1,$KeyOutput.length-1)
	if($last -eq 0 )
	{
		$KeyOutput = "N" + $Keypart2
	}
	else
	{
		$KeyOutput = $Keypart2.Insert($Keypart2.IndexOf($Keypart1)+$Keypart1.length,"N")
	}
	$a = $KeyOutput.Substring(0,5)
	$b = $KeyOutput.substring(5,5)
	$c = $KeyOutput.substring(10,5)
	$d = $KeyOutput.substring(15,5)
	$e = $KeyOutput.substring(20,5)
	$keyproduct = $a + "-" + $b + "-"+ $c + "-"+ $d + "-"+ $e
	$keyproduct 
	
  
}
GetWin10Key

Se mai poate si folosind script VBS insa nu cred ca mai este cazul sa lungesc raspunsul, metodele de mai sus fiind suficiente.

  • Thanks 1

Te-ai inregistrat? Ne-ar placea sa te prezinti.

Cum pot sustine forumul?
Cumpara de la eMag folosind acest link.
--------------------
oG2BN9d.gifse1WdXd.gifQG6MtmI.gifRHYjDzD.gifG5p1wui.gif

Link to comment
Share on other sites

  • 1 year later...

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

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.