damon Posted September 1, 2010 Share Posted September 1, 2010 First Question, Is there a plugin that I need to allow WMI to work in VistaPE environment? Hours and hours of searching brought me to a no conclusion. but I feel that there has to be. Here is the problem. using a simple script that i got off of the forums that pulls model. The reason I got it is because it works.tested $computer = '.' $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $oWMIService = ObjGet('winmgmts:\\' & $computer& '\root\CIMV2') If IsObj($oWMIService) Then $colItems = $oWMIService.ExecQuery('SELECT * FROM Win32_ComputerSystem', 'WQL', $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $oItem In $colItems $model = $oItem.Model Next EndIf EndIf MsgBox (0,"",$model) works on XP and Windows7. But VistaPE I get an ERROR -------------------------------------------------------------------- --Line 13 (File "H:\test2.exe"): --Error: Variable used without being declared -------------------------------------------------------------------- I started with using the ScriptoMatic tool and thought maybe it was outputing the wrong code, but truely I have searched for this answer for about 5 days and I keep coming up without an answer. thanks in advance for any help. It always amazes me how one little thing can cause so much havoc Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 1, 2010 Share Posted September 1, 2010 Is the "Windows Management Instrumentation" service running while in PE? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
damon Posted September 1, 2010 Author Share Posted September 1, 2010 I do not think so, and I think that is the problem. I have looked all over the msdn technet to find out how to start the service or what I need to do, and I have not found the answer yet. It always amazes me how one little thing can cause so much havoc Link to comment Share on other sites More sharing options...
damon Posted September 2, 2010 Author Share Posted September 2, 2010 I am thinking that winmgmt should be the service that needs started. It is not on the vistape disk, and I have copied it from win7 but of course I can not start the service because it says that the service name is invalid. I am using net start winmgmt.exe to try and start the service with no luck.... Any Clues? It always amazes me how one little thing can cause so much havoc Link to comment Share on other sites More sharing options...
Marcodl Posted September 4, 2010 Share Posted September 4, 2010 you have to add WMI package manually in WinPE http://technet.microsoft.com/en-us/library/cc709665(WS.10).aspx Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 7, 2010 Share Posted September 7, 2010 you have to add WMI package manually in WinPEhttp://technet.microsoft.com/en-us/library/cc709665(WS.10).aspxNice link. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now