[Wine]Re: Can WMI be used in WINE apps?

Joachim von Thadden thadden at web.de
Thu Jun 2 04:46:22 CDT 2005


Hi Juan,

this just worked by executing

wine wscript test.vbs

It showed me the desired four dialogs with version numbers only
complaining that ADSI (Active Directory Scripting Interface?) is not
installed. Tried also sokme other script from the scriptcenter which
worked also.

Regards
	Joachim von Thadden 

Am Mi, Jun 01, 2005 at 11:11:50 -0700 schrieb Juan Alvarez:
> Simplest way to test WMI is running a simple script
> with MSH (Microsoft Scripting Host). There are plenty
> at MS scriptcenter
> (http://www.microsoft.com/technet/scriptcenter/default.mspx).
> This one here will check the version of WMI, and other
> Windows components:
> 
> (taken from
> http://www.computerperformance.co.uk/Logon/WSH_Simple.htm):
> 
> 'Script to display WSH, VBScript, WMI, and ADSI
> versions
> 'Script created by Guy Thomas
> 
> On Error Resume Next
> 
> WScript.Echo "WSH Version: " & WScript.Version
> 
> Wscript.Echo "VBScript Version: " &
> ScriptEngineMajorVersion _
> & "." & ScriptEngineMinorVersion
> 
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" & strComputer
> _
> & "\root\cimv2")
> Set colWMISettings = objWMIService.ExecQuery _
> ("Select * from Win32_WMISetting")
> For Each objWMISetting in colWMISettings
> Wscript.Echo "WMI Version: " &
> objWMISetting.BuildVersion
> Next
> 
> Set objShell = CreateObject("WScript.Shell")
> strAdsiVersion = _
> objShell.RegRead("HKLM\SOFTWARE\Microsoft\Active
> Setup\Installed
> Components\{E92B03AB-B707-11d2-9CBD-0000F87A369E}\Version")
> If strAdsiVersion = vbEmpty Then
> strAdsiVersion =
> objShell.RegRead("HKLM\SOFTWARE\Microsoft\ADs\Providers\LDAP\")
> If strAdsiVersion = vbEmpty Then
> strAdsiVersion = "ADSI is not installed."
> Else
> strAdsiVersion = "2.0"
> End If
> End If
> WScript.Echo "ADSI Version: " & strAdsiVersion
>  
> 
> --- Joachim von Thadden <thadden at web.de> wrote:
> 
> > Am Mi, Jun 01, 2005 at 01:25:17 +0100 schrieb Mike
> > Hearn:
> > > On Wed, 01 Jun 2005 04:06:38 -0700, Juan Alvarez
> > wrote:
> > > > After some googling I've found that there's very
> > > > little said about the possibility of using WMI
> > from
> > > > Wine.
> > > 
> > > IIRC WMI is based on DCOM, so our DCOM code would
> > need a lot more work.
> > 
> > I just made a short test (WineTools, native DCOM98)
> > and with a little
> > bit of luck it is installable and the testing app is
> > running. But as I
> > don't have any apps using the API I do not know
> > whether it really works
> > good.
> > 
> > Regards
> > 	Joachim von Thadden
> > -- 
> > "Never touch a running system! Never run a touching
> > system?
> >           Never run a touchy system!!!"
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 

-- 
"Never touch a running system! Never run a touching system?
          Never run a touchy system!!!"



More information about the wine-users mailing list