DISM Inventory
2 Votes |
Collections (part of 1 collection)
Versioning - This is the latest version.
1 | DISM Inventory | 10/17/2012 9:31:55 AM |
2 | DISM Inventory | 4/1/2013 4:10:22 PM |
Description
Calls the DISM utility present on Windows computers.
This will generate a DISM.txt file in the client path. This file will contain the Enabled/Disabled state of all the available features.
This will also enable many of the feature on/off tasks that are included in this custom site.
This task also generates a diffDISM.txt file in the client path. This file lists a difference between the features available and the "missing" fixlets in the site. IE: We can't cover every single feature the instant it comes out. This results file is pulled into an analysis so new fixlets can be created (manually) for features we don't already have fixlets for.
Source: http://bigfix.me/features/
Property Details
1420 | |
DISM Inventory | |
SYST | |
Common Tasks | |
0 | |
danielheth@bigfix.me | |
<Unspecified> | |
<Unspecified> | |
10/2/2012 12:00:00 AM | |
DISM file features fixlets Inventory | |
danielheth on 4/1/2013 4:10:22 PM | |
danielheth on 4/1/2013 4:10:22 PM | |
14681 Views / 514 Downloads | |
* Average over 0 ratings. ** Log In or Register to add your rating. |
Relevance
Used in 365 fixlets | * Results in a true/false |
Used in 531 fixlets | * Results in a true/false |
Actions
Action 1 (default)
//FIRST RUN AN INVENTORY AND OUTPUT TO A TEXT FILE WHICH FIXLETS TRIGGER OFF FROM.Success Criteria
delete __appendfile
if {version of client < "9.0"}
appendfile "{pathname of system folder}\dism.exe" /online /get-features /format:table > "{pathname of parent folder of client}\DISM.txt"
else
appendfile "{pathname of native system folder}\dism.exe" /online /get-features /format:table > "{pathname of parent folder of client}\DISM.txt"
endif
delete __Download\dism.bat
move __appendfile __Download\dism.bat
action uses wow64 redirection {not x64 of operating system}
waithidden __Download\dism.bat
action uses wow64 redirection {x64 of operating system}
//NOW LOOP THROUGH THE OUTPUT COMPARING TO EXISTING FIXLETS. OUTPUT A LIST OF FEATURES WE DONT HAVE FIXLETS FOR WHICH AN ANALYSIS WILL PULL IN.
delete __appendfile
appendfile Set objFSO = CreateObject("Scripting.FileSystemObject")
appendfile subFolderName = Replace("CustomSite_{name of current site}"," ","_")
appendfile objStartFolder = "{pathname of parent folder of client folder of current site}\" & subFolderName & "\"
appendfile Set objFolder = objFSO.GetFolder(objStartFolder)
appendfile Set colFiles = objFolder.Files
appendfile Set dismFile = objFSO.OpenTextFile("{pathname of parent folder of client}\DISM.txt", 1)
appendfile Set objResults = objFSO.CreateTextFile("{pathname of parent folder of client}\diffDISM.txt", true)
appendfile headerLine1 = false
appendfile headerLine2 = false
appendfile Do Until dismFile.AtEndOfStream
appendfile strAvailableFeature = dismFile.ReadLine
appendfile if NOT(headerLine1) AND NOT(headerLine2) then
appendfile if (InStr(strAvailableFeature, "----------")) then
appendfile headerLine1 = true
appendfile end if
appendfile elseif (headerLine1) AND NOT(headerLine2) then
appendfile if (InStr(strAvailableFeature, "----------")) then
appendfile headerLine2 = true
appendfile end if
appendfile else
appendfile if (InStr(strAvailableFeature, "|")) then
appendfile s = Split(strAvailableFeature)
appendfile strFeatureName = Trim(s(0))
appendfile foundIt = false
appendfile For Each objFile in colFiles
appendfile if UCase(objFSO.GetExtensionName(objFile.name)) = "FXF" then
appendfile Set fixletFile = objFSO.OpenTextFile(objStartFolder & objFile.Name, 1)
appendfile Set objRegEx = CreateObject("VBScript.RegExp")
appendfile objRegEx.Pattern = strFeatureName
appendfile Do Until fixletFile.AtEndOfStream
appendfile strSearchString = fixletFile.ReadLine
appendfile Set colMatches = objRegEx.Execute(strSearchString)
appendfile If colMatches.Count > 0 Then
appendfile For Each strMatch in colMatches
appendfile FeatureString = Replace(strSearchString,objRegEx.Pattern,"")
appendfile foundIt = true
appendfile exit do
appendfile Next
appendfile End If
appendfile Loop
appendfile fixletFile.Close
appendfile end if
appendfile Next
appendfile if NOT (foundIt) then
appendfile objResults.WriteLine strFeatureName
appendfile end if
appendfile end if
appendfile end if
appendfile Loop
appendfile dismFile.Close
delete diffDISM.vbs
move __appendfile diffDISM.vbs
waithidden cmd /c cscript diffDISM.vbs
This action will be considered successful when the following relevance clause evaluates to false:
Action 2
http://technet.microsoft.com/en-us/library/dd744566(v=ws.10).aspx
Action 3
http://bigfix.me/winfeatures/
Action 4
http://bigfix.me/cdb/fixlet/68
Sharing
Social Media: |
Comments
|
|
There may be 3rd party plugins or libraries that would work better than Disque. Not sure if either of these other 2 would work: http://www.hongkiat.com/blog/3rdparty-comment-discuss-systems-reviewed/ |
|
|
I was impressed by the Disque. I've set it up and testing it out. Still not happy about the multiple logins thing. I'll work on the commenting to see if I can make this part of the experience nicer. |
|
|
I see what you mean by the separate user name stuff, that would be a bit of a bummer. I like the idea of Disque, and I think it gets you more than just threaded comments, but I see how the seperate accounts is more of an issue for a site like BigFix.me and less of an issue for a public blog that does not need accounts otherwise. |
|
|
I've explored that commenting solution... Only problem I see with it is they have a completely separate username database... and they want $1000/year or $99/month to link the comments to our community username database. Not sure I like that. I don't want our users to have to keep track of more than one account to interact with our site. But like many other solutions, I just need to put some time into it and I can get similar interactivity with the only cost being my personal time. |
|
|
Threaded comments are a plus. You might look at adding http://disqus.com/ and just replace the commenting system with that. |
|
|
that is very helpful... thanks! On a side note, I'm going to have to add in "reply" ability to comments... so users don't get confused when threads go on like this... LOL. |
|
|
very last paragraph of the MSDN article I just linked. |
|
|
http://msdn.microsoft.com/en-us/library/aa384187%28VS.85%29.aspx |
|
|
"sysnative" is from microsoft, it is inside the windows kernel I believe... some sort of special exception to WOW redirection. |
|
|
Basically, C:\Windows\sysnative\ is a hard coded way for 32bit applications to refer to the 64bit folder, kind of like a special symbolic link that gets around redirection. |
|
|
Is the "sysnative" of your design? or is that some 3rd party thing? I've never seen that, it's a cool work around. One note on the "native system folder", it's only supported by 9.0+ clients... Which is why I added in the if/else/endif above. |
|
|
a similar example: http://bigfix.me/cdb/fixlet/1352 |
|
|
ah, now I see the native system folder above... that makes sense. This was my work around before that existed: http://bigfix.me/cdb/fixlet/723 |
|
|
I discovered it was a bug which has been submitted to be fixed. Turns out this functionality was a secondary to the primary purpose of that "system folder" inspector. They're wanting to go in the direction of "native" inspectors to accomplish this functionality just like the "native registry" inspector. So they've added the "native system folder" to accomplish this. |
|
|
What is the nature of the change of wow64 redirection in v9? is there any documentation on the changes? |
|
|
The previous task was failing due to the functionality changes to wow64 redirection in v9. |
|
|
Turns out, in version 9, the wow64 redirection functionality has changed. Thus I needed to modify this script... http://bigfix.me/cdb/fixlet/1420 is the result of my search. |