Hello all

I have a problem with a small VB script, which I want to use as login
script.

--------------------
Set oNet = CreateObject("Wscript.Network")
Set oFSO = CreateObject("Scripting.FileSystemObject")
oDrive = "O:"

If oFSO.DriveExists(oDrive) Then
oNet.RemoveNetworkDrive oDrive
End If

oNet.MapNetworkDrive oDrive, "\\server\share"

Set oNet = Nothing
Set oFSO = Nothing
Set oDrive = Nothing
--------------------

When I start the vbs I receive this error:

Line: 2
Char: 1
Error: ActiveX component can't create object: 'Scripting.FileSystemObject'
Code: 800A01AD
Source: Microsoft VBScript runtime error

Any ideas?

Thanks in advance

GoTTi

Re: Runtime Error by Torgeir

Torgeir
Mon Feb 09 04:18:02 CST 2004

GoTTi wrote:

> I have a problem with a small VB script, which I want to use as login
> script.
>
> (snip)
>
> When I start the vbs I receive this error:
>
> Line: 2
> Char: 1
> Error: ActiveX component can't create object: 'Scripting.FileSystemObject'

Hi

Most likely a rough 3rd party software installation that has downgraded
a WSH file.

Download and install Microsoft Windows Script 5.6 and see if it
fixes the problem:

http://msdn.microsoft.com/downloads/list/webdev.asp


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter