Problems seeing network shares when VBS script is run from OEM event or if script is running as a service. 
Author Message
 Problems seeing network shares when VBS script is run from OEM event or if script is running as a service.

I have a VBScript which accesses an NT file share on another server. When I
run this vbscript from the local hard drive it sees my mapped drive (X:)
fine. If I run my vbscript as a service, or an OEM event, then the vbscript
will no longer see the mapped file share but it still sees the local folders
on "C:".

Norton Anti-Virus is intalled on the computer where the script is running.
Could this be blocking something?...with "ILoveU.vbs" virus type threats
still lingering?

How might I fix this problem? Thanks, Kevin

'*******************************************
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")

'Can't see the folder
if fs.folderexists("X:\Transfer\") then    ' X: is a drive that is mapped to
our server
    'do something
end if

'Sees the folder
if fs.folderexists("C:\Transfer\") then    ' C: is a local drive
    'do something
end if



Sun, 10 Apr 2005 03:06:10 GMT  
 Problems seeing network shares when VBS script is run from OEM event or if script is running as a service.

Quote:

> I have a vbscript which accesses an NT file share on another server.
> When I run this vbscript from the local hard drive it sees my mapped
> drive (X:) fine. If I run my vbscript as a service, or an OEM event,
> then the vbscript will no longer see the mapped file share but it
> still sees the local folders on "C:".

> Norton Anti-Virus is intalled on the computer where the script is
> running. Could this be blocking something?...with "ILoveU.vbs" virus
> type threats still lingering?

> How might I fix this problem? Thanks, Kevin

UNC paths that you as a user have mapped to drive letters are not seen by processes that run under a different security account.  Assuming these processes have network access rights to remote machine resources, just use UNC paths diretly rather than mapped drives...

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



Sun, 10 Apr 2005 03:21:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. vbs scrip to run automatically in html onLoad

2. Scrip Run Error Problem

3. email me ny vbs scripts i am making a huge prog with any features u send

4. email me ny vbs scripts i am making a huge prog with any features u send

5. accessing network shares while running remote WSH

6. Running a .vbs script from within a .vbs script

7. Network share problem

8. How to sink events in MS Scrip Control

9. How to sink events in MS Scrip Control

10. Running a file from a .VBS script

11. Running .NET application from network share

12. Running ASP Script as .VBS

 

 
Powered by phpBB® Forum Software