System Center Configuration Manager TechCenter >
System Center Configuration Manager Forums
>
Configuration Manager Asset Intelligence
>
error when importing mof
error when importing mof
- I know I've seen this fix before but I can't recall where or what it was. When attempting to import a report query from a mof file I get the error: The MOF file path and name are not valid yada yada yada. I've tried both a local path and unc path but neither of which worked. What am I doing wrong?Thank you.
All Replies
- I'm trying to use John Marcum's "all-in-one.mof" file to create a more detailed hardware inventory report. I now have found that I need to add this to sms_def.mof in order for to report properly. I ran this file against mofcomp -check but there seems to be a syntax error: "Illegal constant value. (numberic value out of range or strings withyout quotes)"Here's the code:// *********************************************************************************//// Created by SMS Export object wizard//// Friday, December 19, 2008 created//// File Name: all-in-one.mof//// Comments :////// *********************************************************************************// ***** Class : SMS_Report *****[SecurityVerbs(140551)]instance of SMS_Report{Category = "Department Reports";Comment = "";GraphCaption = "";GraphXCol = 1;GraphYCol = 2;MachineDetail = FALSE;MachineSource = FALSE;Name = "All-In-One Machine Details";NumPrompts = 1;RefreshInterval = 0;ReportGUID = "{435A5365-5EE2-4C85-BC2F-6A894E7A682B}";ReportParams = {instance of SMS_ReportParameter{AllowEmpty = FALSE;DefaultValue = "";PromptText = "Enter Machine Name";SampleValueSQL = "select Name0 from v_R_System order by Name0";VariableName = "MachineName";}};SecurityKey = "";SQLQuery = "select v_R_System.Name0, v_R_System.Resource_Domain_OR_Workgr0, v_R_System.User_Name0 as Username, v_R_User.Full_User_Name0, v_R_System.AD_Site_Name0 from v_R_System, v_R_User where v_R_System.Name0 like @MachineName and v_R_System.User_Name0 = v_R_User.User_Name0 and v_R_System.User_Domain0 = v_R_User.Windows_NT_Domain0\n\nselect v_GS_COMPUTER_SYSTEM.Manufacturer0, v_GS_COMPUTER_SYSTEM.Model0, v_GS_SYSTEM_ENCLOSURE.SerialNumber0 from v_R_System, v_GS_SYSTEM_ENCLOSURE, v_GS_COMPUTER_SYSTEM where v_R_System.Name0 like @MachineName and v_R_System.ResourceID = v_GS_SYSTEM_ENCLOSURE.ResourceID and v_R_System.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID\n\nselect v_R_System.Operating_System_Name_and0 as OperatingSystem, v_GS_OPERATING_SYSTEM.CSDVersion0 as ServicePack, v_GS_X86_PC_MEMORY.TotalPhysicalMemory0 as Memory from v_R_System, v_GS_X86_PC_MEMORY, v_GS_OPERATING_SYSTEM where v_R_System.Name0 like @MachineName and v_R_System.ResourceID = v_GS_X86_PC_MEMORY.ResourceID and v_R_System.ResourceID = v_GS_OPERATING_SYSTEM.ResourceID\n\nselect v_GS_LOGICAL_DISK.Name0 as Drive, v_GS_LOGICAL_DISK.Size0 as Size, v_GS_LOGICAL_DISK.FreeSpace0 as FreeSpace from v_R_System, v_GS_LOGICAL_DISK where v_R_System.Name0 like @MachineName and v_GS_LOGICAL_DISK.DriveType0 = 3 and v_R_System.ResourceID = v_GS_LOGICAL_DISK.ResourceID order by v_GS_LOGICAL_DISK.Name0\n\nSelect v_GS_PROCESSOR.MaxClockSpeed0, v_GS_PROCESSOR.Name0,v_GS_PROCESSOR.Manufacturer0 from v_r_system, V_gs_processor where v_R_System.Name0 like @MachineName and v_R_System.ResourceID = v_GS_processor.ResourceID\n\nselect v_GS_ADD_REMOVE_PROGRAMS.Publisher0, v_GS_ADD_REMOVE_PROGRAMS.DisplayName0, v_GS_ADD_REMOVE_PROGRAMS.Version0 from v_R_System, v_GS_ADD_REMOVE_PROGRAMS where v_R_System.Name0 like @MachineName and v_R_System.ResourceID = v_GS_ADD_REMOVE_PROGRAMS.ResourceID order by v_GS_ADD_REMOVE_PROGRAMS.DisplayName0";StatusMessageDetailSource = FALSE;UnicodeData = FALSE;XColLabel = "";YColLabel = "";};// ***** End *****
- Use the import function (found under the reporting section of the console) to create this report.
http://www.enhansoft.com/ - That is what I was attempting to do the first time around. I expanded the Reporting node and then right-clicked on Reports and selected Import Objects. I then provided the path to the MOF file and then when I selected Next the error came up and displayed:"The MOF file path and name are not valid. Path and file names must be in the form c:\path\name.mof or \\server\path\name.mof. Type a valid path and file name."I've tried supplying both a local path and a UNC path but neither have worked.
I don’t know what to say but that error sound like it can’t find the MOF file. I don’t have access to the test lab to try out this report however you can cut and paste this report http://smsug.ca/blogs/garth_jones/archive/2008/02/04/basic-all-in-one.aspx
http://www.enhansoft.com/- Thanks Garth. Your report worked well except mine isn't reporting CPU speed. I assume it's because that entry isn't declared in sms_def.mof?No biggie though.
- Yes, that is mostly likely the reason.. BTW it should be as easy as changing the False to True within that section of the sms_def.mof.
http://www.enhansoft.com/ - I went into sms_def.mof and set "CurrentClockSpeed" to True under the Processor class.I think that is the right spot. I'll have to do a hardware inventory to see if it returns the info needed.

