How do I deploy and run Datashift-Printer.vbs on all clients using SMS 2003?

I want to collect network printer information for each client in my organisation.  I downloaded the from '' and extracted the file renaming it to 'DataShift-Printer.vbs'.  I created a package in SMS 2003 with DataShift-Printer.vbs as the source file and created a program with the command line 'cscript.exe DataShift-Printer.vbs'.

I amended the sms_def.mof on the server by adding the following:

#pragma namespace("\\\\.\\root\\cimv2\\sms")
[SMS_Report(TRUE), SMS_Group_Name("SMX Printers"),
class SMX_Printer : SMS_Class_Template
[SMS_Report(TRUE)] string Comment;
[SMS_Report(TRUE)] boolean Default;
[SMS_Report(TRUE)] string DeviceID;
[SMS_Report(TRUE)] string DriverName;
[SMS_Report(TRUE)] boolean Local;
[SMS_Report(TRUE)] string Location;
[SMS_Report(TRUE), key] string Name;
[SMS_Report(TRUE)] boolean Network;
[SMS_Report(TRUE)] string PortName;
[SMS_Report(TRUE)] uint32 PrinterState;
[SMS_Report(TRUE)] string ServerName;
[SMS_Report(TRUE)] boolean Shared;
[SMS_Report(TRUE)] string ShareName;

I advertised the program to a test client and forced a hardware inventory.  SMX Printers is now displayed in Resource Explorer for that client but it only lists local printers.

I ran the vbs locally on the client and forced another hardware inventory.  The list of SMX Printers in Resource Explorer for that client now displays local AND network printers.

Why will the script work locally but not when deployed using SMS?  Am I doing something wrong?
Who is Participating?
Adam LeinssConnect With a Mentor Senior Desktop EngineerCommented:
Under what account are you running the script in package: administrator or the user?  If you use administrator, it uses the computers local SYSTEM account which does not have access to Active Directory.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.