VirtualSoftwarePackage class
All the standard SVScmd and SVSadmin functions are located in the VirtualSoftwarePackage class.
The following table indicates the properties for this layer class.
Table: VirtualSoftwarePackage Properties
Name | Datatype | Description |
|---|
ID | string | Layer ID. This value is a GUID. |
Name | string | Layer name. Writeable. |
Active | Boolean | Current active or inactive state of the layer |
AutoActivate | Boolean | The layer is activated automatically when the system is started. Writeable. Type of the virtual software package. |
Type | uint32 | 0 = Application 1 = Data |
CreatedTime | datetime | When the layer was created. |
ActivatedTime | datetime | When the layer was last activated. May be null if the layer has never been activated. |
ResetTime | datetime | When the layer was last reset. May be null if the layer has never been reset. |
If there is a switch for an action in SVScmd, it can also be performed with WMI.
The following table indicates the methods for WMI actions:
Table: VirtualSoftwarePackage Methods
Action Name | Example | Explanation |
|---|
Import | static uint32 Import( [in] string Filename, [in] bool Overwrite, [out] string PackageId ) | Imports a new layer. Once the import is complete, the layer can be enumerated, and the other (non-static) methods can be called. |
Activate | uint32 Activate( ) | Activates a layer. Activating a layer through SVSAdmin or SVSCmd results in the current user's desktop being refreshed. Due to security limitations, activating through WMI does not refresh the desktop or the Admin utility if it is open. |
Deactivate | uint32 Deactivate( [in] Boolean Force, [out] uint32 ProcessId ) | Deactivates a layer. You can force the deactivation if there is a process still running from the layer. The same security limitations that apply to activation also apply to deactivation. |
Reset | uint32 Reset( [in] Boolean Force, [out] uint32 ProcessId ) | Resets a layer. Similar to SVSAdmin, this call deactivates the layer if necessary, and thus supports the same parameters as deactivate. The layer returns to the previous state before reset: e.g., if the layer was active before the reset, it is restored to the active state. |
SetAutoActivate | uint32 SetAutoActivate( [in] Boolean AutoActivate ) | Sets the value of the AutoActivate property. |
Export | uint32 Export( [in] string Filename, [in] bool Overwrite ) | Exports the layer to an archive file on the disk. |
Delete | uint32 Delete( ) | Deletes the layer. The layer must be deactivated. |
Rename | uint32 Rename( [in] string Name ) | Renames the layer. |