• Still running Windows 7 or earlier? Support for Windows 7 ended on January 14th 2020. Please review the thread here for more details.

My turn! :) - SLMGR.VBS problem

NoelDP

Windows Update Analyst, Contributor
Staff member
Joined
May 31, 2012
Posts
932
Location
North Wales
Running cscript slmgr.vbs /dlv gives the following error message
C:\Windows\System32\slmgr.vbs(1333, 5) (null): 0xD0000034

WMI appears to be healthy - running the following script works fine....

Code:
Set objLocator = CreateObject("WbemScripting.SWbemLocator") 
Set objService = objLocator.ConnectServer(".", "root\cimv2") 
'objService.Security_.ImpersonationLevel = 3 
Set Jobs = _ 
objService.ExecQuery("SELECT * FROM Win32_Service") 
i=0 
For each Job in Jobs 
i = i+1 
WScript.Echo Job.name & VBNewLine 
If i=3 then Exit for 
Next 
If i = 0 Then 
WScript.Echo "No services found" 
End If
and gets the expected results.

Any clues for me??
 
:)
MGADiag is how we found the problem in the first place :D
SFC is clear
CheckSUR is clear

I don't know enough to be able to read the background stuff in a CBS log - but a number are available if you want.
Code:
Diagnostic Report (1.9.0027.0):
-----------------------------------------
Windows Validation Data-->

Validation Code: 0
Cached Online Validation Code: N/A, hr = 0xc0000034
Windows Product Key: N/A, hr=0xc0000034
Windows Product Key Hash: N/A, hr=0xc0000034
Windows Product ID: 55041-033-4789644-86307
Windows Product ID Type: 6
Windows License Type: Volume MAK
Windows OS version: 6.1.7601.2.00010100.1.0.048
ID: {3E36DFB7-0BF5-400E-A3E7-6BDF65CC4D74}(3)
Is Admin: Yes
TestCab: 0x0
LegitcheckControl ActiveX: N/A, hr = 0x80070002
Signed By: N/A, hr = 0x80070002
Product Name: Windows 7 Professional
Architecture: 0x00000009
Build lab: 7601.win7sp1_gdr.120305-1505
TTS Error: 
Validation Diagnostic: 
Resolution Status: N/A

Vista WgaER Data-->
ThreatID(s): N/A, hr = 0x80070002
Version: N/A, hr = 0x80070002

Windows XP Notifications Data-->
Cached Result: N/A, hr = 0x80070002
File Exists: No
Version: N/A, hr = 0x80070002
WgaTray.exe Signed By: N/A, hr = 0x80070002
WgaLogon.dll Signed By: N/A, hr = 0x80070002

OGA Notifications Data-->
Cached Result: N/A, hr = 0x80070002
Version: N/A, hr = 0x80070002
OGAExec.exe Signed By: N/A, hr = 0x80070002
OGAAddin.dll Signed By: N/A, hr = 0x80070002

OGA Data-->
Office Status: 109 N/A
OGA Version: N/A, 0x80070002
Signed By: N/A, hr = 0x80070002
Office Diagnostics: 025D1FF3-364-80041010_025D1FF3-229-80041010_025D1FF3-230-1_025D1FF3-517-80040154_025D1FF3-237-80040154_025D1FF3-238-2_025D1FF3-244-80070002_025D1FF3-258-3

Browser Data-->
Proxy settings: 
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win32)
Default Browser: C:\Users\admin\AppData\Local\Google\Chrome\Application\chrome.exe
Download signed ActiveX controls: Prompt
Download unsigned ActiveX controls: Disabled
Run ActiveX controls and plug-ins: Allowed
Initialize and script ActiveX controls not marked as safe: Disabled
Allow scripting of Internet Explorer Webbrowser control: Disabled
Active scripting: Allowed
Script ActiveX controls marked as safe for scripting: Allowed

File Scan Data-->

Other data-->
Office Details: <GenuineResults><MachineData><UGUID>{3E36DFB7-0BF5-400E-A3E7-6BDF65CC4D74}</UGUID><Version>1.9.0027.0</Version><OS>6.1.7601.2.00010100.1.0.048</OS><Architecture>x64</Architecture><PKey>*****-*****-*****-*****-BBBBB</PKey><PID>55041-033-4789644-86307</PID><PIDType>6</PIDType><SID>S-1-5-21-1935836800-3093289039-440424962</SID><SYSTEM><Manufacturer>Dell Inc.</Manufacturer><Model>Vostro 220s Series</Model></SYSTEM><BIOS><Manufacturer>Dell Inc.</Manufacturer><Version>1.1.4</Version><SMBIOSVersion major="2" minor="5"/><Date>20090417000000.000000+000</Date></BIOS><HWID>764A3707018400F8</HWID><UserLCID>0809</UserLCID><SystemLCID>0409</SystemLCID><TimeZone>GMT Standard Time(GMT+00:00)</TimeZone><iJoin>0</iJoin><SBID><stat>3</stat><msppid></msppid><name></name><model></model></SBID><OEM><OEMID>DELL  </OEMID><OEMTableID>FX09   </OEMTableID></OEM><GANotification/></MachineData><Software><Office><Result>109</Result><Products/><Applications/></Office></Software></GenuineResults>  

Spsys.log Content: 0x80070002

Licensing Data-->
C:\Windows\system32\slmgr.vbs(1333, 5) (null): 0xC0000034

Windows Activation Technologies-->
HrOffline: 0x00000000
HrOnline: 0x00000000
HealthStatus: 0x0000000000000000
Event Time Stamp: 3:13:2012 14:21
ActiveX: Registered, Version: 7.1.7600.16395
Admin Service: Registered, Version: 7.1.7600.16395
HealthStatus Bitmask Output:


HWID Data-->
HWID Hash Current: MAAAAAEAAgABAAIAAAACAAAAAQABAAEA6GFyhzAkqn/SGpjwYPZuY95YAB7kLEbK

OEM Activation 1.0 Data-->
N/A

OEM Activation 2.0 Data-->
BIOS valid for OA 2.0: yes
Windows marker version: 0x20001
OEMID and OEMTableID Consistent: yes
BIOS Information: 
  ACPI Table Name OEMID Value OEMTableID Value
  APIC 041709 APIC1908
  FACP 041709 FACP1908
  HPET 041709 OEMHPET 
  MCFG 041709 OEMMCFG 
  SLIC DELL  FX09   
  OEMB 041709 OEMB1908
  GSCI 041709 GMCHSCI 
  SSDT DpgPmm CpuPm

CHKDSK /R was clear, barring a couple of index entries.

sample cbs.log attached

I should add that I have posted the same query in the ITPro forums, and got less than nowhere....
slmgr.vbs error 0xD0000034
 

Attachments

I can read a CBS log, but it's usually with failed SFC results that I know how to deal with it, aside from that I don't deal with hardly much of this genuine check stuff. How and when did you start receiving this error? edit: That CBS log is nearly useless though, there's nothing in there even from 2013.
 
Last edited:
The CBS log clears itself into persist cabs every 10 days - if there's more data than that in the .log file then you have a problem :) (but I have seen logs where 60MB of data was generated in hours!)

Yours and my knowledge of CBS data seems to be on a par, I can fix most problems that appear in a sfcdetails.txt extract, and a couple of things outside that - but there's no way I can claim to 'know' much about it

This isn't my machine - I might have more chance of finding the problem if it was.
It's merely one of those MGADiag errors that crops up every now and then, and so far, the only solutions have been a repair install at best, or a clean install.

I just reckoned it was about time I tried to find someone who knows more than me about VBS and that sort of stuff ;)
 
I'll have a rummage and see if I can find some more from the same client.....

All I have at the moment that may be of use is a set of event logs - attached.
I've asked for the full CBS folder content.
 
Licensing Data-->
C:\Windows\system32\slmgr.vbs(1333, 5) (null): 0xC0000034
C0000034 is STATUS_OBJECT_NOT_FOUND. So what is at line 1333, position 5 in the slmgr.vbs file for Windows 7 SP1? I don't have a machine running it up at the moment to check, or I would.
 
It's querying WMI for product information from the SoftwareLicensingProduct class. I'd wonder what would happen if you used WMI Code Creator to check for all members of that class via selecting all members and running "Execute code". It iterates through every product registered with the SoftwareLicensingClass, and I'm curious if any one of them causes an error. Given what slmgr is doing here, it smells an awful lot like WMI corruption.
 
That script does nothing with /root/CIMV2/SoftwareLicensingProduct, so it wasn't a test of anything this script is doing at the time of the failure.
 
Ah - shows my minimal understanding!

Don't suppose you'd care to knock out a quickie for testing purposes?
 
It would take a while to loop through all of the class instance properties, but you could try something like this for a quick test:

Code:
$wmiObj = New-Object System.Management.ManagementClass SoftwareLicensingProduct
$LicenseStats = @("Unlicensed", "Licensed", "OOBGrace", "OOTGrace", "NonGenuineGrace", "Notification", "ExtendedGrace")
foreach($p in $wmiObj.GetInstances())
{
    "Name: {0}" -f $p.Name
    "GenuineStatus: {0}" -f ($p.GenuineStatus -eq 0)
    "LicenseStatus: {0}" -f $LicenseStats[$p.LicenseStatus]
    "PartialProductKey: {0}" -f $p.PartialProductKey
    "ProductKeyID: {0}" -f $p.ProductKeyID
    "ValidationURL: {0}" -f $p.ValidationURL
    "--------------------------------`n"
}

Or this too:
Code:
$wmiObj = New-Object System.Management.ManagementClass SoftwareLicensingProduct
$wmiProperties = $wmiObj.Properties 
"{0} Properties:`n" -f $wmiProperties.count 

foreach ($obj in $wmiProperties)
{
    "`tProperty Name: {0}" -f $obj.Name
}

These are powershell scripts I quickly wrote. If you've never ran powershell scripts before you'll probably need to set the ExecutionPolicy manually as it's by default Restricted.

SoftwareLicensingProduct Class: SoftwareLicensingProduct class (Windows)
 
Last edited:
That looks VERY useful - I'll have to see what I can work up for instructions (I almost never use powershell - but my standard CMD instructions would work here, near enough)
Thanks!
 
...FWIW, I got what look like sensible results in default

Code:
PS C:\Users\NoelAsus> $wmiObj = New-Object System.Management.ManagementClass SoftwareLicensingProduct
PS C:\Users\NoelAsus> $LicenseStats = @("Unlicensed", "Licensed", "OOBGrace", "OOTGrace", "NonGenuineGrace", "Notificati
on", "ExtendedGrace")
PS C:\Users\NoelAsus> foreach($p in $wmiObj.GetInstances())
>> {
>>     "Name: {0}" -f $p.Name
>>     "GenuineStatus: {0}" -f ($p.GenuineStatus -eq 0)
>>     "LicenseStatus: {0}" -f $LicenseStats[$p.LicenseStatus]
>>     "PartialProductKey: {0}" -f $p.PartialProductKey
>>     "ProductKeyID: {0}" -f $p.ProductKeyID
>>     "ValidationURL: {0}" -f $p.ValidationURL
>>     "--------------------------------`n"
>> }
>>
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, OCUR add-on for Ultimate,HomePremium,Enterprise,Professional,ServerHomePremium,Embedded
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, OCUR add-on for Ultimate,HomePremium,Enterprise,Professional,ServerHomePremium,Embedded
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Licensed
PartialProductKey: 9YQTR
ProductKeyID: 00359-00178-926-800007-02-1033-7600.0000-2092009
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
Name: Windows(R) 7, HomePremium edition
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------
PS C:\Users\NoelAsus> $wmiObj = New-Object System.Management.ManagementClass SoftwareLicensingProduct
PS C:\Users\NoelAsus> $wmiProperties = $wmiObj.Properties
PS C:\Users\NoelAsus> "{0} Properties:`n" -f $wmiProperties.count
44 Properties:
PS C:\Users\NoelAsus>
PS C:\Users\NoelAsus> foreach ($obj in $wmiProperties)
>> {
>>     "`tProperty Name: {0}" -f $obj.Name
>> }
>>
        Property Name: ApplicationID
        Property Name: Description
        Property Name: DiscoveredKeyManagementServiceMachineName
        Property Name: DiscoveredKeyManagementServiceMachinePort
        Property Name: EvaluationEndDate
        Property Name: ExtendedGrace
        Property Name: GenuineStatus
        Property Name: GracePeriodRemaining
        Property Name: ID
        Property Name: IsKeyManagementServiceMachine
        Property Name: KeyManagementServiceCurrentCount
        Property Name: KeyManagementServiceFailedRequests
        Property Name: KeyManagementServiceLicensedRequests
        Property Name: KeyManagementServiceMachine
        Property Name: KeyManagementServiceNonGenuineGraceRequests
        Property Name: KeyManagementServiceNotificationRequests
        Property Name: KeyManagementServiceOOBGraceRequests
        Property Name: KeyManagementServiceOOTGraceRequests
        Property Name: KeyManagementServicePort
        Property Name: KeyManagementServiceProductKeyID
        Property Name: KeyManagementServiceTotalRequests
        Property Name: KeyManagementServiceUnlicensedRequests
        Property Name: LicenseDependsOn
        Property Name: LicenseFamily
        Property Name: LicenseIsAddon
        Property Name: LicenseStatus
        Property Name: LicenseStatusReason
        Property Name: MachineURL
        Property Name: Name
        Property Name: OfflineInstallationId
        Property Name: PartialProductKey
        Property Name: ProcessorURL
        Property Name: ProductKeyID
        Property Name: ProductKeyURL
        Property Name: RequiredClientCount
        Property Name: TokenActivationAdditionalInfo
        Property Name: TokenActivationCertificateThumbprint
        Property Name: TokenActivationGrantNumber
        Property Name: TokenActivationILID
        Property Name: TokenActivationILVID
        Property Name: TrustedTime
        Property Name: UseLicenseURL
        Property Name: VLActivationInterval
        Property Name: VLRenewalInterval
PS C:\Users\NoelAsus>

Thanks again!
 
I've had the results back - the following was the result of the first.....
Code:
Name: Windows(R) 7, OCUR add-on for Ultimate,HomePremium,Enterprise,Professional,ServerHomePremium,Embedded
GenuineStatus: True
LicenseStatus: Unlicensed
PartialProductKey:
ProductKeyID:
ValidationURL:
--------------------------------

An error occurred while enumerating through a collection: .
At line:1 char:8
+ foreach <<<< ($p in $wmiObj.GetInstances())
    + CategoryInfo          : InvalidOperation: (System.Manageme...bjectEnumerator:ManagementObjectEnumerator) [], Run
   timeException
    + FullyQualifiedErrorId : BadEnumeration

The second looked fin - 44 items that looked right..

Any ideas how to proceed?
 
If you don't feel like having Powershell Console pinned anywhere, you can actually start it and run it directly through cmd.exe if you start it from there, it will run in the cmd.exe console as Powershell. If running these scripts didn't break though then I'm wondering about WMI.

Okay, guess it's time I looked at slmgr.vbs... Looking at DisplayAllInformation Sub which displays info in a loop through GetProductCollection... It seems that GetProductCollection, GetServiceObject, and booleanConnect are the main ones here for WMI based queries (from my quick look at it). So i'll see if I can duplicate a script that will perform some similar queries to see if that's where the issue is...

Just to make sure, this is your local computer is it? I can help with the WMI and VBS stuff, but product genuine validity checks and all of that is not my expertise I will admit.

There's a whole bunch of constant variables for WMI at the top though in that huge list of private accessible variables:
Code:
' WMI class names
private const ServiceClass                            = "SoftwareLicensingService"
private const ProductClass                            = "SoftwareLicensingProduct"
private const TkaLicenseClass                         = "SoftwareLicensingTokenActivationLicense"
private const WindowsAppId                            = "55c92734-d682-4d71-983e-d6ec3f16059f"

private const ProductIsPrimarySkuSelectClause         = "ID, ApplicationId, PartialProductKey, LicenseIsAddon, Description, Name"

private const PartialProductKeyNonNullWhereClause     = "PartialProductKey <> null"
private const EmptyWhereClause                        = ""

private const wbemImpersonationLevelImpersonate       = 3
private const wbemAuthenticationLevelPktPrivacy       = 6

Top 4 are most significant for now... I guess I could try the 2 other classes here as well and see what that does. I'll take a deeper look into the meat of the main Sub()'s of the script though to see what they are doing becuase that's really the most important factor here.
 
Last edited:
I can deal with the not-genuine problems - it when it starts getting into programming that I get the heebie-jeebies :)

No, this isn't my local machine - it's in another forum (guess where!), but no-one there seems to really know their stuff as well as you guys here, so when MS came up duff, I turned to you :)

The OP seems to have enough knowledge to be a useful partner, and follows instructions well - he also doesn't appear to be in too much of a hurry.

(the machine is showing as not-genuine because of this problem, rather than the other way around)
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top