Mof Updater
First i would like to thank Sherry Kissinger for her blog post about the mini mof. If it weren't for her posts i would have never come up with this Idea. I would also like to thank the authors of "SMS 2003 Recipes" it came in handy when i was writing the script to create the advertisement.
Any way here is the source so that you can create your own Mof Updater. The main reason i created this tool was to help the 35+ agency admins under my Central site who have never messed with mof modifications.
Note: The zip file that is attached does not include the executable so you will need SMS installer 32 installation and my source file to complie it. Sorry for any inconvenience this may have cause but the file was to large complied to upload.
The application will do the following:
- Prompt admin for their name
- Prompt admin for their SMS installed directory
- Checks the Server for SMSInstaller32
- If SMSI32 is not found it will install it to the system
Note: If SMS installer is installed on the system but not in the default location the program will fail.
i. Default location is :
1. C:\Program Files\Microsoft SMS Installer
- Renames the SMS_DEF.MOF to SMS_DEF.MOF.backup
- Copies SMS 2003 SP2 SMS_DEF.MOF to the (driveletter)\SMS\inboxes\clifiles.src\hinv
- This SMS_DEF.mof is identical to the out of the box file with 1 line changed.
i. Last line contains: #pragma Include ("SMS_mini.mof")
- Copies SMS_Mini.mof to (driveletter)\SMS\inboxes\clifiles.src\hinv
- SMS_Mini.mof contains all of the Mof modifications that the State presently uses plus a few additions
i. MOF File Revision
ii. Printer Tracking (not sure if this is working)
iii. UserTracking (using SMS User Logon Audit-Security Tool by Steve Bobosky)
iv. Fix ScanWrapper Error
v. Legal Notice
vi. McAfee ePO Agent
vii. Network Associates/McAfee Anti-Virus
viii. SQL Version
ix. SMS Advance Client Cache (size)
x. OA Package Tracking
xi. DPW SMS Package Tracking
xii. MS Virtual PC
- Changes the line for the Mof revision date
- ModifiedBy="Chris Stauffer"; ( this will reflect the person who did the installation)
- ModifiedDate="12/15/2006"; ( This will reflect the time that the installation was executed on the SMS server)
- Creates a directory on the c drive called “c:\SMS_MOF_PACKAGE” that contains the following files:
· mof_mini_updater1.3.ipf
· SMS_def.mof (from above)
· SMS_Mini.mof (this changes)
· ScanHlpr.dll
· Createpackage.vbs
- Next It will compile the EXE for for mof_mini_updater1.3.ipf for the admin.
- Next it will Compile SMS_DEF.MOF with the SMS_Mini.mof on SMS server
- Next it will ask you if you want to automatically create the package and advertisement
- If you answer yes it will do the following:
i. It will run a vbs script called Createpackage.vbs
1. this will be executed at the cmd prompt with the cscript command
ii. The script will ask for the name of your SMS server.
iii. It will then create the following:
1. Package called “Mini Mof Updater”
2. Program under the package called “Mini Mof Updater 1.3”
1. The Program will use the following command line
1. mof_mini_updater1.3.exe /s
3. Advertisement for the package called Mof updater
1. This advertisement will point to SMS00001
1. SMS00001 is the default collection for all systems
- Finally it will tell you it is finished.
There is also a document in the zip file that gives details on how you can modify it further.
Thanks
Chris Stauffer <><