|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
I have an issue that I have been trying to solve for quite a while now.
When the vbscript is executed from a command line there is no issue, but when executed as a custom action during installation it failes. Here is the script: ------------------------------------------- Dim objLocator, objService, obj, BuildNumber Set objLocator = CreateObject("WbemScripting.SWbemLocator") Set objService = objLocator.ConnectServer( , "root\cimv2") <---- it failes here on some PC's objService.Security_.ImpersonationLevel = 4 Set obj = objService.Get("Win32_OperatingSystem=@") BuildNumber = obj.BuildNumber If obj.BuildNumber >= 6000 Then If InStr(obj.OSArchitecture,"64") Then OS = True End If End If If OS Then 'IsVista64 = True MsgBox "You are running 64-bit" Else 'IsVista64 = False MsgBox "You are running 32-bit" End If ------------------------------------------- First I thourght that the issue has something to do with rights, but I have not been able to fine any setting that could solve the issye |
|
|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
Still waiting for an answer in platformsdk.msi.....
-- Phil Wilson "MAN" <mads.andersen@dantecdynamics.com> wrote in message news:3CEEA351-45CA-4B16-B8A2-982E342FD639@microsoft.com... >I have an issue that I have been trying to solve for quite a while now. > > When the vbscript is executed from a command line there is no issue, but > when executed as a custom action during installation it failes. Here is > the script: > ------------------------------------------- > Dim objLocator, objService, obj, BuildNumber > > Set objLocator = CreateObject("WbemScripting.SWbemLocator") > Set objService = objLocator.ConnectServer( , "root\cimv2") <---- it failes > here on some PC's > objService.Security_.ImpersonationLevel = 4 > Set obj = objService.Get("Win32_OperatingSystem=@") > > BuildNumber = obj.BuildNumber > > If obj.BuildNumber >= 6000 Then > If InStr(obj.OSArchitecture,"64") Then > OS = True > End If > End If > > > If OS Then > 'IsVista64 = True > MsgBox "You are running 64-bit" > Else > 'IsVista64 = False > MsgBox "You are running 32-bit" > End If > ------------------------------------------- > First I thourght that the issue has something to do with rights, but I > have not been able to fine any setting that could solve the issye |
|