That code is not complete. The following is the path (No drive letter?) which you're trying to create:
- - -
_Log_Feb7.2007_13.51.txt
- - -
What does the variable "OutputFilePrefix" contain? For me to replicate the problem, I need the complete code.
--
Regards,
Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting
http://www.winhelponline.com
"Valerio" <Valerio@discussions.microsoft.com> wrote in message news:5BF343EE-7523-4F3E-B45C-0F7E9AE81675@microsoft.com...
Hellow All,
Below is an excerpt from a VB script file that does not execute on Vista....
Can anyone be kind enough to provide any feedback on it? It bombs on the
last line....I get the "Permission Denied" 800A0046 error.
I tried to remove all right and have it run in the administrator group, but
failed miserably...... Any help would be appreciated....
tempdate = now()
dim filenamedate 'format is _mmmdd.yyyy_hh.mm
filenamedate = MonthName(DatePart("m",tempdate), True) 'abbreviated month
name
filenamedate = "_" & filenamedate & DatePart ("d",tempdate) &_
"." & DatePart ("yyyy",tempdate) & "_"
temp = DatePart ("h",tempdate)
If temp < 10 Then temp = "0" & temp
filenamedate = filenamedate & temp & "." 'hour as hh
temp = DatePart ("n",tempdate)
If temp < 10 Then temp = "0" & temp
filenamedate = filenamedate & temp 'minutes as mm
logfilename = OutputFilePrefix & "_Log" & filenamedate & ".txt"
set logfileobj = fso.createtextfile(logfilename,true)