Hello,

I'm trying the following script on 32 bit remote servers and it is
working great. However, as soon as I use this same script to run on 64
bit systems, it gives me the errors mentioned after the script below:

'On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
strServer = InputBox("Enter Server Name here: ")
strServer = Trim(strServer)
If IsEmpty(strServer) Then
WScript.Echo "You have to enter a valid Server Name...ending Script"
ElseIf Len(strServer) = 0 Then
WScript.Echo "You have to enter a valid Server Name...ending Script"
Else
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
strServer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Session Manager
\Environment"
strValueName = "PROCESSOR_ARCHITECTURE"
oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,
strValue
If strValue = "x86" Then
WScript.Echo "32 bit OS"
Else
WScript.Echo "64 bit OS"
End If
End If

Error:
C:\BT\Scripts\2003SP2Auto\32or64.vbs(19, 1) Microsoft VBScript runtime
error: Th
e remote server machine does not exist or is unavailable: 'GetObject'

Note: I'm trying to run the above script from a 2003 SP2 32-bit server
and entering a remote 64-bit server name at the prompt.

Please help !

Re: Error on 64 bit systems... by Alex

Alex
Wed May 07 14:27:15 CDT 2008

I'm not having any trouble with this against Vista x64, which suggests the
problem is not 64-bitness but security settings for the specific system in
question. I suggest checking the following:

+ try to ping the machine in question (as well as any other 64-bit servers
you have, as a comparison). If it drops ping requests, the firewall is
probably configured very tightly. If it lets them through, the problem is
more specific to WMI, and may even be an issue with a corrupt WMI
repository.

+ Confirm whether the system is just an average server, or has a special
configuration that may be causing security problems. Those would include a
distinct domain role (being a member server only, for example, or not a
domain member) or a special version such as SBS - unlikely given what you've
said, but still possible.

+ Check the event logs on the system in question. I recall some of the
2006-2007 era patches causing possible problems with DCOM that could
interfere with WMI. You'd be looking specifically for the following issues:
blanket errors with the DCOM subsystem, WMI, or the Windows Firewall; and
repeated remote authentication failures.

+ One other thing: is the account you are using to connect to the remote
system in question one with local as well as domain administration
privileges on the system in question?

"thestriver" <bijusinbox@gmail.com> wrote in message
news:c2a93d36-af1f-48f2-a22f-6901420b8856@m3g2000hsc.googlegroups.com...
> Hello,
>
> I'm trying the following script on 32 bit remote servers and it is
> working great. However, as soon as I use this same script to run on 64
> bit systems, it gives me the errors mentioned after the script below:
>
> 'On Error Resume Next
> Const HKEY_LOCAL_MACHINE = &H80000002
> strServer = InputBox("Enter Server Name here: ")
> strServer = Trim(strServer)
> If IsEmpty(strServer) Then
> WScript.Echo "You have to enter a valid Server Name...ending Script"
> ElseIf Len(strServer) = 0 Then
> WScript.Echo "You have to enter a valid Server Name...ending Script"
> Else
> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
> strServer & "\root\default:StdRegProv")
> strKeyPath = "SYSTEM\CurrentControlSet\Control\Session Manager
> \Environment"
> strValueName = "PROCESSOR_ARCHITECTURE"
> oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,
> strValue
> If strValue = "x86" Then
> WScript.Echo "32 bit OS"
> Else
> WScript.Echo "64 bit OS"
> End If
> End If
>
> Error:
> C:\BT\Scripts\2003SP2Auto\32or64.vbs(19, 1) Microsoft VBScript runtime
> error: Th
> e remote server machine does not exist or is unavailable: 'GetObject'
>
> Note: I'm trying to run the above script from a 2003 SP2 32-bit server
> and entering a remote 64-bit server name at the prompt.
>
> Please help !


Re: Error on 64 bit systems... by thestriver

thestriver
Fri May 09 13:36:24 CDT 2008

On May 7, 3:27=A0pm, "Alex K. Angelopoulos" <aka(at)mvps.org> wrote:
> I'm not having any trouble with this against Vista x64, which suggests the=

> problem is not64-bitness but security settings for the specific system in
> question. I suggest checking the following:
>
> + try to ping the machine in question (as well as any other64-bitservers
> you have, as a comparison). If it drops ping requests, the firewall is
> probably configured very tightly. If it lets them through, the problem is
> more specific to WMI, and may even be an issue with a corrupt WMI
> repository.
>
> + Confirm whether the system is just an average server, or has a special
> configuration that may be causing security problems. Those would include a=

> distinct domain role (being a member server only, for example, or not a
> domain member) or a special version such as SBS - unlikely given what you'=
ve
> said, but still possible.
>
> + Check the event logs on the system in question. I recall some of the
> 2006-2007 era patches causing possible problems with DCOM that could
> interfere with WMI. You'd be looking specifically for the following issues=
:
> blanket errors with the DCOM subsystem, WMI, or the Windows Firewall; and
> repeated remote authentication failures.
>
> + One other thing: is the account you are using to connect to the remote
> system in question one with local as well as domain administration
> privileges on the system in question?
>
> "thestriver" <bijusin...@gmail.com> wrote in message
>
> news:c2a93d36-af1f-48f2-a22f-6901420b8856@m3g2000hsc.googlegroups.com...
>
>
>
> > Hello,
>
> > I'm trying the following script on 32bitremote servers and it is
> > working great. However, as soon as I use this same script to run on64
> >bitsystems, it gives me the errors mentioned after the script below:
>
> > 'OnErrorResume Next
> > Const HKEY_LOCAL_MACHINE =3D &H80000002
> > strServer =3D InputBox("Enter Server Name here: ")
> > strServer =3D Trim(strServer)
> > If IsEmpty(strServer) Then
> > WScript.Echo "You have to enter a valid Server Name...ending Script"
> > ElseIf Len(strServer) =3D 0 Then
> > WScript.Echo "You have to enter a valid Server Name...ending Script"
> > Else
> > Set oReg=3DGetObject("winmgmts:{impersonationLevel=3Dimpersonate}!\\" &
> > strServer & "\root\default:StdRegProv")
> > strKeyPath =3D "SYSTEM\CurrentControlSet\Control\Session Manager
> > \Environment"
> > strValueName =3D "PROCESSOR_ARCHITECTURE"
> > oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,
> > strValue
> > If strValue =3D "x86" Then
> > WScript.Echo "32bitOS"
> > Else
> > WScript.Echo "64bitOS"
> > End If
> > End If
>
> >Error:
> > C:\BT\Scripts\2003SP2Auto\32or64.vbs(19, 1) Microsoft VBScript runtime
> >error: Th
> > e remote server machine does not exist or is unavailable: 'GetObject'
>
> > Note: I'm trying to run the above script from a 2003 SP2 32-bitserver
> > and entering a remote64-bitserver name at the prompt.
>
> > Please help !- Hide quoted text -
>
> - Show quoted text -

I can ping them and others just as well as pining any 32 on the same
domain.
Is a member app server with similar fqdn as 32 bits. Nothing
extraordinary about its their builds.
No authentication errors in eventvwr and can't stop dcom as other apps
on it require it.
I use an admin account to try out the scripts and it has has local
admin rights as well.
Thanks for your effrots...

Re: Error on 64 bit systems... by Alex

Alex
Sun May 11 06:15:24 CDT 2008

Here's one more experiment that should give us a bit more insight into
what's happening. Try logging on to the 64-bit system and running the script
from that system against itself and against other servers.

At this point, we're not seeing any errors that would indicate breakage in
WMI or an odd configuration, so the problem is apparently rather
well-hidden. Running the code on the 64-bit server will fill in the picture.

+ If it fails to run, there's a clear local problem of some kind with WMI
configuration or permissions.
+ If it runs ok locally but doesn't run against the remote systems, there's
a symmetric problem - likely something with the credentials being used.
+ If it runs ok locally and against remote servers, we know that the problem
apparently only shows up calling from your 32-bit server to the 64-bit
server. We also know of one workaround, albeit a weird one - run from the
64-bit system.

"thestriver" <bijusinbox@gmail.com> wrote in message
news:44750ccb-8800-4cdb-b79f-4891fe26117f@z72g2000hsb.googlegroups.com...
> On May 7, 3:27 pm, "Alex K. Angelopoulos" <aka(at)mvps.org> wrote:
>> I'm not having any trouble with this against Vista x64, which suggests
>> the
>> problem is not64-bitness but security settings for the specific system in
>> question. I suggest checking the following:
>>
>> + try to ping the machine in question (as well as any other64-bitservers
>> you have, as a comparison). If it drops ping requests, the firewall is
>> probably configured very tightly. If it lets them through, the problem is
>> more specific to WMI, and may even be an issue with a corrupt WMI
>> repository.
>>
>> + Confirm whether the system is just an average server, or has a special
>> configuration that may be causing security problems. Those would include
>> a
>> distinct domain role (being a member server only, for example, or not a
>> domain member) or a special version such as SBS - unlikely given what
>> you've
>> said, but still possible.
>>
>> + Check the event logs on the system in question. I recall some of the
>> 2006-2007 era patches causing possible problems with DCOM that could
>> interfere with WMI. You'd be looking specifically for the following
>> issues:
>> blanket errors with the DCOM subsystem, WMI, or the Windows Firewall; and
>> repeated remote authentication failures.
>>
>> + One other thing: is the account you are using to connect to the remote
>> system in question one with local as well as domain administration
>> privileges on the system in question?
>>
>> "thestriver" <bijusin...@gmail.com> wrote in message
>>
>> news:c2a93d36-af1f-48f2-a22f-6901420b8856@m3g2000hsc.googlegroups.com...
>>
>>
>>
>> > Hello,
>>
>> > I'm trying the following script on 32bitremote servers and it is
>> > working great. However, as soon as I use this same script to run on64
>> >bitsystems, it gives me the errors mentioned after the script below:
>>
>> > 'OnErrorResume Next
>> > Const HKEY_LOCAL_MACHINE = &H80000002
>> > strServer = InputBox("Enter Server Name here: ")
>> > strServer = Trim(strServer)
>> > If IsEmpty(strServer) Then
>> > WScript.Echo "You have to enter a valid Server Name...ending Script"
>> > ElseIf Len(strServer) = 0 Then
>> > WScript.Echo "You have to enter a valid Server Name...ending Script"
>> > Else
>> > Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &
>> > strServer & "\root\default:StdRegProv")
>> > strKeyPath = "SYSTEM\CurrentControlSet\Control\Session Manager
>> > \Environment"
>> > strValueName = "PROCESSOR_ARCHITECTURE"
>> > oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,
>> > strValue
>> > If strValue = "x86" Then
>> > WScript.Echo "32bitOS"
>> > Else
>> > WScript.Echo "64bitOS"
>> > End If
>> > End If
>>
>> >Error:
>> > C:\BT\Scripts\2003SP2Auto\32or64.vbs(19, 1) Microsoft VBScript runtime
>> >error: Th
>> > e remote server machine does not exist or is unavailable: 'GetObject'
>>
>> > Note: I'm trying to run the above script from a 2003 SP2 32-bitserver
>> > and entering a remote64-bitserver name at the prompt.
>>
>> > Please help !- Hide quoted text -
>>
>> - Show quoted text -
>
> I can ping them and others just as well as pining any 32 on the same
> domain.
> Is a member app server with similar fqdn as 32 bits. Nothing
> extraordinary about its their builds.
> No authentication errors in eventvwr and can't stop dcom as other apps
> on it require it.
> I use an admin account to try out the scripts and it has has local
> admin rights as well.
> Thanks for your effrots...


Re: Error on 64 bit systems... by thestriver

thestriver
Mon May 12 14:35:49 CDT 2008

On May 11, 7:15=A0am, "Alex K. Angelopoulos" <aka(at)mvps.org> wrote:
> Here's one more experiment that should give us abitmore insight into
> what's happening. Try logging on to the64-bitsystem and running the script=

> from that system against itself and against other servers.
>
> At this point, we're not seeing any errors that would indicate breakage in=

> WMI or an odd configuration, so the problem is apparently rather
> well-hidden. Running the code on the64-bitserver will fill in the picture.=

>
> + If it fails to run, there's a clear local problem of some kind with WMI
> configuration or permissions.
> + If it runs ok locally but doesn't run against the remote systems, there'=
s
> a symmetric problem - likely something with the credentials being used.
> + If it runs ok locally and against remote servers, we know that the probl=
em
> apparently only shows up calling from your 32-bitserver to the64-bit
> server. We also know of one workaround, albeit a weird one - run from the6=
4-bitsystem.
>
> "thestriver" <bijusin...@gmail.com> wrote in message
>
> news:44750ccb-8800-4cdb-b79f-4891fe26117f@z72g2000hsb.googlegroups.com...
>
>
>
> > On May 7, 3:27 pm, "Alex K. Angelopoulos" <aka(at)mvps.org> wrote:
> >> I'm not having any trouble with this against Vista x64, which suggests
> >> the
> >> problem is not64-bitness but security settings for the specific system =
in
> >> question. I suggest checking the following:
>
> >> + try to ping the machine in question (as well as any other64-bitserver=
s
> >> you have, as a comparison). If it drops ping requests, the firewall is
> >> probably configured very tightly. If it lets them through, the problem =
is
> >> more specific to WMI, and may even be an issue with a corrupt WMI
> >> repository.
>
> >> + Confirm whether the system is just an average server, or has a specia=
l
> >> configuration that may be causing security problems. Those would includ=
e
> >> a
> >> distinct domain role (being a member server only, for example, or not a=

> >> domain member) or a special version such as SBS - unlikely given what
> >> you've
> >> said, but still possible.
>
> >> + Check the event logs on the system in question. I recall some of the
> >> 2006-2007 era patches causing possible problems with DCOM that could
> >> interfere with WMI. You'd be looking specifically for the following
> >> issues:
> >> blanket errors with the DCOM subsystem, WMI, or the Windows Firewall; a=
nd
> >> repeated remote authentication failures.
>
> >> + One other thing: is the account you are using to connect to the remot=
e
> >> system in question one with local as well as domain administration
> >> privileges on the system in question?
>
> >> "thestriver" <bijusin...@gmail.com> wrote in message
>
> >>news:c2a93d36-af1f-48f2-a22f-6901420b8856@m3g2000hsc.googlegroups.com...=

>
> >> > Hello,
>
> >> > I'm trying the following script on 32bitremote servers and it is
> >> > working great. However, as soon as I use this same script to run on64=

> >> >bitsystems, it gives me the errors mentioned after the script below:
>
> >> > 'OnErrorResume Next
> >> > Const HKEY_LOCAL_MACHINE =3D &H80000002
> >> > strServer =3D InputBox("Enter Server Name here: ")
> >> > strServer =3D Trim(strServer)
> >> > If IsEmpty(strServer) Then
> >> > WScript.Echo "You have to enter a valid Server Name...ending Script"
> >> > ElseIf Len(strServer) =3D 0 Then
> >> > WScript.Echo "You have to enter a valid Server Name...ending Script"
> >> > Else
> >> > Set oReg=3DGetObject("winmgmts:{impersonationLevel=3Dimpersonate}!\\"=
&
> >> > strServer & "\root\default:StdRegProv")
> >> > strKeyPath =3D "SYSTEM\CurrentControlSet\Control\Session Manager
> >> > \Environment"
> >> > strValueName =3D "PROCESSOR_ARCHITECTURE"
> >> > oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,
> >> > strValue
> >> > If strValue =3D "x86" Then
> >> > WScript.Echo "32bitOS"
> >> > Else
> >> > WScript.Echo "64bitOS"
> >> > End If
> >> > End If
>
> >> >Error:
> >> > C:\BT\Scripts\2003SP2Auto\32or64.vbs(19, 1) Microsoft VBScript runtim=
e
> >> >error: Th
> >> > e remote server machine does not exist or is unavailable: 'GetObject'=

>
> >> > Note: I'm trying to run the above script from a 2003 SP2 32-bitserver=

> >> > and entering a remote64-bitserver name at the prompt.
>
> >> > Please help !- Hide quoted text -
>
> >> - Show quoted text -
>
> > I can ping them and others just as well as pining any 32 on the same
> > domain.
> > Is a member app server with similar fqdn as 32 bits. Nothing
> > extraordinary about its their builds.
> > No authentication errors in eventvwr and can't stop dcom as other apps
> > on it require it.
> > I use an admin account to try out the scripts and it has has local
> > admin rights as well.
> > Thanks for your effrots...- Hide quoted text -
>
> - Show quoted text -

It is running from a 64 bit server, for both 32 and 64 ones and Now is
running fine vice-versa. all this while I was trying on servers that
were in DMZ. All servers outside the DMZ answered just fine.
So, in the end, it was not an issue with the code after all.
Thanks for your help !