forked from DeploymentBunny/Files
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fee6719
commit 2e993f4
Showing
3 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This is a custom version of the ZTITatoo included in MDT. Use this as a template instead of modifying the ZTITatoo file in MDT, since it could be overwritten dusring upgrades. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
|
||
//================================================================== | ||
// Register Registry property provider (shipped with WMI) | ||
// Refer to WMI SDK documentation for use | ||
//================================================================== | ||
|
||
#pragma namespace("\\\\.\\root\\cimv2") | ||
|
||
// Registry instance provider | ||
instance of __Win32Provider as $InstProv | ||
{ | ||
Name ="RegProv" ; | ||
ClsID = "{fe9af5c0-d3b6-11ce-a5b6-00aa00680c3f}" ; | ||
ImpersonationLevel = 1; | ||
PerUserInitialization = "False"; | ||
}; | ||
|
||
instance of __InstanceProviderRegistration | ||
{ | ||
Provider = $InstProv; | ||
SupportsPut = True; | ||
SupportsGet = True; | ||
SupportsDelete = False; | ||
SupportsEnumeration = True; | ||
}; | ||
|
||
|
||
// Registry property provider | ||
instance of __Win32Provider as $PropProv | ||
{ | ||
Name ="RegPropProv" ; | ||
ClsID = "{72967901-68EC-11d0-B729-00AA0062CBB7}"; | ||
ImpersonationLevel = 1; | ||
PerUserInitialization = "False"; | ||
}; | ||
|
||
instance of __PropertyProviderRegistration | ||
{ | ||
Provider = $PropProv; | ||
SupportsPut = True; | ||
SupportsGet = True; | ||
}; | ||
|
||
|
||
//================================================================== | ||
// ViaMonstra Information class and instance definition | ||
//================================================================== | ||
|
||
#pragma namespace ("\\\\.\\root\\cimv2") | ||
|
||
// Class definition | ||
|
||
#pragma deleteclass("ViaMonstra_Info",nofail) | ||
[DYNPROPS] | ||
class ViaMonstra_Info | ||
{ | ||
[key] | ||
string InstanceKey; | ||
string ViaClass; | ||
string ViaRole; | ||
string ViaTag; | ||
string ViaOwner; | ||
|
||
}; | ||
|
||
|
||
// Instance definition | ||
|
||
[DYNPROPS] | ||
instance of ViaMonstra_Info | ||
{ | ||
InstanceKey = "@"; | ||
|
||
[PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\ViaMonstra\\OSD|ViaClass"), Dynamic, Provider("RegPropProv")] | ||
ViaClass; | ||
|
||
[PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\ViaMonstra\\OSD|ViaRole"), Dynamic, Provider("RegPropProv")] | ||
ViaRole; | ||
|
||
[PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\ViaMonstra\\OSD|ViaTag"), Dynamic, Provider("RegPropProv")] | ||
ViaTag; | ||
|
||
[PropertyContext("local|HKEY_LOCAL_MACHINE\\Software\\ViaMonstra\\OSD|ViaOwner"), Dynamic, Provider("RegPropProv")] | ||
ViaOwner; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<job id="ViaMonstraTatoo"> | ||
<script language="VBScript" src="ZTIUtility.vbs"/> | ||
<script language="VBScript"> | ||
|
||
' // *************************************************************************** | ||
' // File: ViaMonstraTatoo.wsf | ||
' // Version: 1.0 | ||
' // Purpose: Tattoo the machine with ViaMonstra info | ||
' // Usage: cscript.exe [//nologo] ViaMonstraTatoo.wsf [/debug:true] | ||
' // *************************************************************************** | ||
|
||
Option Explicit | ||
RunNewInstance | ||
|
||
'//---------------------------------------------------------------------------- | ||
'// Global Constants | ||
'//---------------------------------------------------------------------------- | ||
|
||
' No constants are required | ||
|
||
|
||
'//---------------------------------------------------------------------------- | ||
'// Main Class | ||
'//---------------------------------------------------------------------------- | ||
|
||
Class ViaMonstraTatoo | ||
|
||
'//---------------------------------------------------------------------------- | ||
'// Class instance variable declarations | ||
'//---------------------------------------------------------------------------- | ||
|
||
' No instance variables are required | ||
|
||
|
||
'//---------------------------------------------------------------------------- | ||
'// Constructor to initialize needed global objects | ||
'//---------------------------------------------------------------------------- | ||
|
||
Private Sub Class_Initialize | ||
|
||
' No initialization is required | ||
|
||
End Sub | ||
|
||
|
||
'//---------------------------------------------------------------------------- | ||
'// Main routine | ||
'//---------------------------------------------------------------------------- | ||
|
||
Function Main | ||
|
||
Dim iRetVal | ||
Dim sMOFFile | ||
Dim sCmd | ||
Dim oInfo | ||
|
||
iRetVal = Success | ||
|
||
'//---------------------------------------------------------------------------- | ||
'// Copy and compile the MOF | ||
'//---------------------------------------------------------------------------- | ||
|
||
iRetVal = oUtility.FindFile("ViaMonstraTatoo.mof", sMOFFile) | ||
If iRetVal <> Success then | ||
|
||
oLogging.CreateEntry "Unable to find ViaMonstraTatoo.mof, information will not be available via WMI.", LogTypeInfo | ||
|
||
Else | ||
|
||
oLogging.CreateEntry "Copying " & sMOFFile & " to " & oEnv("WINDIR") & "\SYSTEM32\WBEM\ViaMonstraTatoo.mof.", LogTypeInfo | ||
If oFSO.FileExists(oEnv("WINDIR") & "\SYSTEM32\WBEM\ViaMonstraTatoo.mof") then | ||
oFSO.GetFile(oEnv("WINDIR") & "\SYSTEM32\WBEM\ViaMonstraTatoo.mof").Attributes = 0 | ||
End if | ||
oFSO.CopyFile sMOFFile, oEnv("WINDIR") & "\SYSTEM32\WBEM\ViaMonstraTatoo.mof", true | ||
|
||
sCmd = oEnv("WINDIR") & "\SYSTEM32\WBEM\MOFCOMP.EXE -autorecover " & oEnv("WINDIR") & "\SYSTEM32\WBEM\ViaMonstraTatoo.mof" | ||
oLogging.CreateEntry "About to compile MOF: " & sCmd, LogTypeInfo | ||
iRetVal = oShell.Run(sCmd, 0, true) | ||
oLogging.CreateEntry "MOFCOMP return code = " & iRetVal, LogTypeInfo | ||
|
||
End if | ||
|
||
' Retrieve the new WMI instance | ||
|
||
Set oInfo = objWMI.Get("ViaMonstra_Info.InstanceKey=""@""") | ||
|
||
'//---------------------------------------------------------------------------- | ||
'// Record Customdata | ||
'//---------------------------------------------------------------------------- | ||
|
||
oInfo.ViaClass = oEnvironment.Item("ViaClass") | ||
oInfo.ViaRole = oEnvironment.Item("ViaRole") | ||
oInfo.ViaTag = oEnvironment.Item("ViaTag") | ||
oInfo.ViaOwner = oEnvironment.Item("ViaOwner") | ||
|
||
' Save the changes | ||
|
||
oInfo.Put_ | ||
|
||
Main = iRetVal | ||
|
||
End Function | ||
|
||
End Class | ||
|
||
</script> | ||
</job> |