#1 22 Sep 2010 10:52

scott_humphris
Member
Registered: 03 Sep 2010
Posts: 7

VBS - Access denied txt doc

Please can someone help me with editing an access denied text document?

Normaly i use this to add a line to text docs:
fname=Inputbox("Please enter the text you would like added")
Set ObjFso = Wscript.CreateObject("Scripting.FileSystemObject")
Set ObjFileHandle = _
ObjFso.OpenTextFile("C:\test.txt", 8, "True")

But this will not work for access denied document.

Offline

#2 22 Sep 2010 16:30

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,083

Re: VBS - Access denied txt doc

Access denied is the usual response if a file is locked for writing by another process or the ACLs are not permitting write access to the user running the script.  In these scenarios this is the operating system working correctly, so I wouldn't hold your breath.  If it's permissions, perhaps moving the file elsewhere (C:\ is a likely candidate for security lock down) will yield positive results.


cmd | *sh | Ruby | Chef

Offline

Board footer

Powered by FluxBB