From: Keithr on
The following VBS code:
'''''Starts here
Main

Sub Main()
Dim wPage, sURL, sPage
sURL = "http://api.fastsms.co.uk/api/api.php" _
& "?Username=USERNAME&Password=PASSWORD&Action=Send" _
& "&DestinationAddress=TELEPHONENUMBER&SourceAddress=SENDER" _
& "&SourceTON=5&Validity=86400&Body=This+is+a+test+message2"
Set wPage = CreateObject("MSXML2.XMLHTTP")
With wPage
.Open "GET", sURL, False
.send
Do Until .readyState = 4 : Wscript.Sleep 50 : Loop
sPage = .responseText
End With
Set wPage = Nothing
End Sub
'''' End here

works for user A and can also be typed in to the address line of IE6 and
still work (with valid name/password, etc.)

User B on the same PC (with same privileges) works in the address line of
IE6, but when running the VBS file returns the error 800C0005 with message
"The system cannot locate the resource specified" from source msxml3.dll,
occurring on the .send line.

Anyone have any ideas why the two users get a different reaction to the VBS
script but the same response in the browser?

Any help gratefully received - this one has us all stumped.
From: ekkehard.horner on
Keithr schrieb:
> The following VBS code:
> '''''Starts here
> Main
>
> Sub Main()
> Dim wPage, sURL, sPage
> sURL = "http://api.fastsms.co.uk/api/api.php" _
> & "?Username=USERNAME&Password=PASSWORD&Action=Send" _
> & "&DestinationAddress=TELEPHONENUMBER&SourceAddress=SENDER" _
> & "&SourceTON=5&Validity=86400&Body=This+is+a+test+message2"
> Set wPage = CreateObject("MSXML2.XMLHTTP")
> With wPage
> .Open "GET", sURL, False
> .send
> Do Until .readyState = 4 : Wscript.Sleep 50 : Loop
> sPage = .responseText
> End With
> Set wPage = Nothing
> End Sub
> '''' End here
>
> works for user A and can also be typed in to the address line of IE6 and
> still work (with valid name/password, etc.)
>
> User B on the same PC (with same privileges) works in the address line of
> IE6, but when running the VBS file returns the error 800C0005 with message
> "The system cannot locate the resource specified" from source msxml3.dll,
> occurring on the .send line.
>
> Anyone have any ideas why the two users get a different reaction to the VBS
> script but the same response in the browser?
>
> Any help gratefully received - this one has us all stumped.

<speculative>

There are different versions of MSXML2.XMLHTTP; which one you get by
asking for plain MSXML2.XMLHTTP depends on registry settings

HKEY_CLASSES_ROOT\Msxml2.XMLHTTP\CurVer
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Msxml2.XMLHTTP\CurVer

I don't know if this can be specified for each user separately, but you
can use code like this:

Dim oXML3 : Set oXML3 = CreateObject( "MSXML2.XMLHTTP.3.0" )
WScript.Echo "MSXML2.XMLHTTP.3.0", TypeName( oXML3 )
Dim oXML4 : Set oXML4 = CreateObject( "MSXML2.XMLHTTP.4.0" )
WScript.Echo "MSXML2.XMLHTTP.4.0", TypeName( oXML4 )
Dim oXML : Set oXML = CreateObject( "MSXML2.XMLHTTP" )
WScript.Echo "MSXML2.XMLHTTP", TypeName( oXML )

sample output:

=== MSXMLVersion: trying to get MSXML2.XMLHTTP version ==
MSXML2.XMLHTTP.3.0 IXMLHTTPRequest
MSXML2.XMLHTTP.4.0 IServerXMLHTTPRequest2
MSXML2.XMLHTTP IXMLHTTPRequest
=== MSXMLVersion: 0 done (00:00:00) =====================

to make sure that User A and B get the same version.

Another point to check: Could different %PATH% variables cause
different (versions of) msxml3.dll to be loaded?

</speculative>




From: Keithr on
Thanks Ekkehard. Unfortunately, I'd checked that one already and all users
see the same versions. To make it worse, I also checked on a different PC
with both users. On the other PC, all versions of software are identical,
but User A and B exhibit the same symptom of being unable to run the VBS, so
it looks like a combined user/workstation profile problem if I can just track
it down. I'll keep trying , but any other suggestions are welcome

"ekkehard.horner" wrote:

> Keithr schrieb:
> > The following VBS code:
> > '''''Starts here
> > Main
> >
> > Sub Main()
> > Dim wPage, sURL, sPage
> > sURL = "http://api.fastsms.co.uk/api/api.php" _
> > & "?Username=USERNAME&Password=PASSWORD&Action=Send" _
> > & "&DestinationAddress=TELEPHONENUMBER&SourceAddress=SENDER" _
> > & "&SourceTON=5&Validity=86400&Body=This+is+a+test+message2"
> > Set wPage = CreateObject("MSXML2.XMLHTTP")
> > With wPage
> > .Open "GET", sURL, False
> > .send
> > Do Until .readyState = 4 : Wscript.Sleep 50 : Loop
> > sPage = .responseText
> > End With
> > Set wPage = Nothing
> > End Sub
> > '''' End here
> >
> > works for user A and can also be typed in to the address line of IE6 and
> > still work (with valid name/password, etc.)
> >
> > User B on the same PC (with same privileges) works in the address line of
> > IE6, but when running the VBS file returns the error 800C0005 with message
> > "The system cannot locate the resource specified" from source msxml3.dll,
> > occurring on the .send line.
> >
> > Anyone have any ideas why the two users get a different reaction to the VBS
> > script but the same response in the browser?
> >
> > Any help gratefully received - this one has us all stumped.
>
> <speculative>
>
> There are different versions of MSXML2.XMLHTTP; which one you get by
> asking for plain MSXML2.XMLHTTP depends on registry settings
>
> HKEY_CLASSES_ROOT\Msxml2.XMLHTTP\CurVer
> HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Msxml2.XMLHTTP\CurVer
>
> I don't know if this can be specified for each user separately, but you
> can use code like this:
>
> Dim oXML3 : Set oXML3 = CreateObject( "MSXML2.XMLHTTP.3.0" )
> WScript.Echo "MSXML2.XMLHTTP.3.0", TypeName( oXML3 )
> Dim oXML4 : Set oXML4 = CreateObject( "MSXML2.XMLHTTP.4.0" )
> WScript.Echo "MSXML2.XMLHTTP.4.0", TypeName( oXML4 )
> Dim oXML : Set oXML = CreateObject( "MSXML2.XMLHTTP" )
> WScript.Echo "MSXML2.XMLHTTP", TypeName( oXML )
>
> sample output:
>
> === MSXMLVersion: trying to get MSXML2.XMLHTTP version ==
> MSXML2.XMLHTTP.3.0 IXMLHTTPRequest
> MSXML2.XMLHTTP.4.0 IServerXMLHTTPRequest2
> MSXML2.XMLHTTP IXMLHTTPRequest
> === MSXMLVersion: 0 done (00:00:00) =====================
>
> to make sure that User A and B get the same version.
>
> Another point to check: Could different %PATH% variables cause
> different (versions of) msxml3.dll to be loaded?
>
> </speculative>
>
>
>
>
>