Drive Letters Usage with the FileSystemObject - VBScript
I am migrating from a Win 2003 server to a Win 2008 R2 server. I'm running a classic ASP application. In the 2003 server the following code worked for creating a file:
CONST SCRATCH_DIR = "E:\Temp\"
Set FSO = CreateObject("Scripting.FileSystemObject") Set TFL = FSO.CreateTextFile(SCRATCH_DIR & "Debug.txt", True)On the NEW server the Set TFL line gives me this error:
Microsoft VBScript runtime error '800a0046'
Permission d开发者_运维技巧enied /inc/vbutil.inc, line 110If I remove the Drive designation "E:\" from the CONST, the procedure works just fine; (except it writes to the C:\ drive) so I'm sure the error message is correct.
Could anyone please point me at where/how I'd change permissions for this (E:\Temp) directory?
Thanks very much in advance,
(A dumb application programmer;)
You can change permissions on the folder by right clicking it > Properties > Security > Advanced.
Uncheck "Include inheritable permissions from this object's parent".
Click "Add"
Modify permissions for the user running the script. They will need read, write and create permissions.
精彩评论