roga Posted April 4, 2013 Posted April 4, 2013 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?
water Posted April 4, 2013 Posted April 4, 2013 What's the value of @error after RegRead? My UDFs and Tutorials: Reveal hidden contents UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roga Posted April 4, 2013 Author Posted April 4, 2013 On 4/4/2013 at 9:33 PM, 'water said: What's the value of @error after RegRead?brings no value is blank.
water Posted April 4, 2013 Posted April 4, 2013 Not the return value of the function but the value of the macro @error is needed. My UDFs and Tutorials: Reveal hidden contents UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roga Posted April 4, 2013 Author Posted April 4, 2013 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
water Posted April 4, 2013 Posted April 4, 2013 MsgBox(0, "", "@error = " & @error)after RegRead. My UDFs and Tutorials: Reveal hidden contents UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
water Posted April 4, 2013 Posted April 4, 2013 BTW: Do you run a 32 or 64 bit Windows version? My UDFs and Tutorials: Reveal hidden contents UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roga Posted April 4, 2013 Author Posted April 4, 2013 On 4/4/2013 at 9:48 PM, 'water said: MsgBox(0, "", "@error = " & @error)after RegRead. @error = -1
water Posted April 4, 2013 Posted April 4, 2013 According to the help file -1 stands for: "unable to open requested value" My UDFs and Tutorials: Reveal hidden contents UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roga Posted April 4, 2013 Author Posted April 4, 2013 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 )
water Posted April 4, 2013 Posted April 4, 2013 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 UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
roga Posted April 4, 2013 Author Posted April 4, 2013 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 ...
water Posted April 4, 2013 Posted April 4, 2013 My UDFs and Tutorials: Reveal hidden contents UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now