PDA

View Full Version : Microsoft VBScript runtime error: Permission denied (W2K)



sentme_mail
03-04-2004, 08:37 AM
hi,
i always get "C:\scripts\1.vbs(8, 1) Microsoft VBScript runtime error:
Permission denied" error when trying to run the below script.
any idea?

Set objFSO = CreateObject("Scripting.FileSystemObject")
set objshell = CreateObject("WScript.Shell")

Const ForAppending = 8
Set objFile = objFSO.CreateTextFile("c:\scripts\results.txt")
If objFSO.FileExists("\\server\c$\backup\file222.txt") Then
Set objTextFile = objFSO.OpenTextFile ("c:\scripts\results.txt",
ForAppending, True)
objTextFile.WriteLine "\\server\c$\backup\file222.evt exists"
ObjTextFile.Close
end if

pculmo
03-10-2004, 08:40 PM
Do you have Admin access on the \\server ?

In order to get to C$ (Administrative share) you need to an admin on that system.

sentme_mail
03-11-2004, 04:27 AM
its ok now. thanks