Jump to content

Recommended Posts

Posted

I finished the installation of System Center Configuration Manager 2012 here at my company, but I'm having some problems to consolidate the number of installed clients, because I try to delete the customer problem SCCM 2007.

Command I'm using:

$SITECODE=regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Mobile Client\","AssignedSiteCode")

I'm sure the key exists (follows a chunk of export record):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS\Mobile Client]

"ProductCode"="{D6804B3A-BFEC-4AB4-BFA5-FD9BECC80630}"

"ProductVersion"="5.00.7804.1000"

"PackageCode"="{59A0EA77-D28C-4286-83A6-04BB57B9CDD6}"

"AssignedSiteCode"="001"

Whenever I get a blank value with the command mentioned, I believe that space is the "Mobile Client".

Can someone help me?

Posted

What's the value of @error after RegRead?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Not the return value of the function but the value of the macro @error is needed.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

And How do I get the @erro ?

The script runs normally.

>"C:Program Files (x86)AutoIt3SciTE..autoit3.exe" /ErrorStdOut "L:ScriptsAutoit_Codigosinventario_scriptlogon_novo.au3"

>Exit code: 0 Time: 0.311

Posted

MsgBox(0, "", "@error = " & @error)
after RegRead.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

BTW: Do you run a 32 or 64 bit Windows version?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

According to the help file -1 stands for: "unable to open requested value"

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

  On 4/4/2013 at 9:56 PM, 'water said:

According to the help file -1 stands for: "unable to open requested value"

I'm guessing that is the space of the "Mobile Client" because I could read other values ​​without problem. Only team registration problems on the roads with space.

$SCCM2012=regread("HKEY_LOCAL_MACHINESOFTWAREClassesInstallerProductsA3B4086DCEFB4BA4FB5ADFB9CE8C6003","ProductName") ----> I can read smoothly and returns me the key value

$SITECODE=regread("HKEY_LOCAL_MACHINESOFTWAREMicrosoftSMSMobile Client","AssignedSiteCode") ---> I can not read, I believe the problem is in the "Mobile Client"

the record exists and can also access the DOS ( reg query )

Posted

Then you have to modify the key.

According to the help file (again): "When running on 64-bit Windows if you want to read a value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64."

$SITECODE = RegRead("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\SMS\Mobile Client","AssignedSiteCode")
And I don't think you need the slash at the end of the keyname.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

  On 4/4/2013 at 10:09 PM, 'water said:

Then you have to modify the key.

According to the help file (again): "When running on 64-bit Windows if you want to read a value specific to the 64-bit environment you have to suffix the HK... with 64 i.e. HKLM64."

$SITECODE = RegRead("HKEY_LOCAL_MACHINE64\SOFTWARE\Microsoft\SMS\Mobile Client","AssignedSiteCode")
And I don't think you need the slash at the end of the keyname.

Thank you!! worked ...
Posted
:D

My UDFs and Tutorials:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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