| description | Learn how to validate a new location for a driver update using ValidateNewPackageSource class in Configuration Manager. |
|---|---|
| title | ValidateNewPackageSource method in class SMS_DriverPackage |
| ms.date | 09/20/2016 |
| ms.subservice | sdk |
| ms.topic | reference |
| ms.collection | tier3 |
The ValidateNewPackageSource Windows Management Instrumentation (WMI) class method, in Configuration Manager, validates a new location for a driver update.
The following syntax is simplified from Managed Object Format (MOF) code and defines the method.
SInt32 ValidateNewPackageSource(
String PackageSource
);
PackageSource
Data type: String
Qualifiers: [in]
The driver package content to verify.
An SInt32 data type that is 0 to indicate success or non-zero to indicate failure.
For information about handling returned errors, see About Configuration Manager Errors.
This method is new in the latest version of Configuration Manager. Note that it is the only way to change the package source for an SMS_Driver Server WMI Class object. Most other types of packages can be changed in the console, but not the driver package. The access to this package from the console is restricted.
To use this method:
-
Manually copy the package files from the old source location to the new location.
-
In your application, obtain an SMS_DriverPackage Server WMI Class object for the driver.
-
Include a call to
ValidateNewPackageSourceon the package. -
On successful return from the method, have the application change the
StoredPkgPathproperty in the package to indicate the new source location.
For more information, see Configuration Manager Server Runtime Requirements.
For more information, see Configuration Manager Server Development Requirements.
SMS_DriverPackage Server WMI Class RebuildPackage Method in Class SMS_DriverPackage