Simple script won't run on certain user's PC 
Author Message
 Simple script won't run on certain user's PC

The web page below generates an 'Object expected' error
on line 10 when run on one of our employee's PCs,
although it works on everyone elses.  I've reinstalled
Windows Script 5.6 and it did not help.  It occurs
regardless of the logged-in user.  I've even set all
scripting permissions to enable in Tools-Internet Options.

Any ideas?

<html>
<head>
<script language="VBScript">
sub SayHi()
  msgbox "hello"
end sub
</script>
</head>

<body onload="SayHi()">
This is a test.
</body>
</html>



Mon, 21 Mar 2005 22:53:02 GMT  
 Simple script won't run on certain user's PC

Quote:
> <script language="vbscript">
> sub SayHi()
>   msgbox "hello"
> end sub
> </script>
> </head>

> <body onload="SayHi()">
> This is a test.
> </body>
> </html>

<html>
<head>
  <script language="VBScript">
    Sub Window_OnLoad()
      MsgBox "Hello"
    End Sub
  </script>
</head>
<body>
  Test
</body>
</html>

Try the above example, it should work without trying to call a routine from the
body tag itself.  Anywho, if you want to call sayHi anyways, try removing the
parenthesis from the body tag's call....

Mythran



Mon, 21 Mar 2005 23:27:18 GMT  
 Simple script won't run on certain user's PC

Quote:

> The web page below generates an 'Object expected' error
> on line 10 when run on one of our employee's PCs,
> although it works on everyone elses.  I've reinstalled
> Windows Script 5.6 and it did not help.  It occurs
> regardless of the logged-in user.  I've even set all
> scripting permissions to enable in Tools-Internet Options.

> Any ideas?

It behaves as if IE doesn't recognize the VBScript <script> element.  

Try doing an IE repair from Add/Remove programs.

What version of IE is the user running? Is upgrading to IE6 an option?  

There have been posts in the past regarding messages from IE saying (paraphrased) that VBScript support was not installed when in fact it was.  The only feedback I ever got from MS is that it *might* be a registry key problem.  No further details were provided other than it was probably in the branch: HKCU\Software\Microsoft\Active Setup\Installed Components (many cryptic guid keys).  Nothing you could fix yourself...

In every case where an IE repair, reinstall, or upgrade was suggested, the original posters never came back to say whether it fixed the problem.  

(But then they never came back to say it didn't, either <g>...!)

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US



Tue, 22 Mar 2005 00:30:31 GMT  
 Simple script won't run on certain user's PC
I resolved the problem.  The user had two copies of
vbscript.dll in winnt\system32.  One was version
1.0.0.806; the other was 5.5.0.6330.  I don't understand
how two files with the same name were in the same folder,
but they were.  I renamed the old one to vbscript.old;
then reregistered the new one using regsvr32.  IE now
properly runs the script.

BTW, before I discovered the two copies of vbscript.dll,
I tried reinstalling IE 5.5.  This did not fix the
problem.
Roger

Quote:
>-----Original Message-----

>> The web page below generates an 'Object expected' error
>> on line 10 when run on one of our employee's PCs,
>> although it works on everyone elses.  I've reinstalled
>> Windows Script 5.6 and it did not help.  It occurs
>> regardless of the logged-in user.  I've even set all
>> scripting permissions to enable in Tools-Internet
Options.

>> Any ideas?

>It behaves as if IE doesn't recognize the VBScript
<script> element.  

>Try doing an IE repair from Add/Remove programs.

>What version of IE is the user running? Is upgrading to
IE6 an option?  

>There have been posts in the past regarding messages

from IE saying (paraphrased) that VBScript support was
not installed when in fact it was.  The only feedback I
ever got from MS is that it *might* be a registry key
problem.  No further details were provided other than it
was probably in the branch:
HKCU\Software\Microsoft\Active Setup\Installed Components
(many cryptic guid keys).  Nothing you could fix
yourself...
Quote:

>In every case where an IE repair, reinstall, or upgrade

was suggested, the original posters never came back to
say whether it fixed the problem.  

- Show quoted text -

Quote:

>(But then they never came back to say it didn't, either
<g>...!)

>--
>Michael Harris
>Microsoft.MVP.Scripting
>Seattle WA US

>.



Wed, 13 Apr 2005 00:30:37 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. This W98 PC won't run .VBS??

2. Apps w/ MS Inet Xfer Control won't run on non-development PCs

3. gs 2.6.1 and 3.0 won't do anything with a certain .ps file

4. Script to install sw on user's pc

5. IE5.5 + OCX + web page won't display on some PC's

6. Report Won't Print On Some PC's

7. Ghostscript won't run from script.

8. VBS Scripts won't run, bad association?

9. Remote Admin Scripts won't run

10. scripts won't run on 2k prof

11. Logon Date/Time Script Won't Run

12. Script won't run with WSCRIPT/CSCRIPT

 

 
Powered by phpBB® Forum Software