Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download - Clean, repair and optimize your system



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner 2009 - Free Scan Now

vbscript to create file

microsoft.public.windows.vista.general




Recommended Fix - Fix Vista Errors and Optimize Performance

Click On Your Flag for Translation
Simplified Chinese French Spanish Italian Portugeuse Japanese German Dutch
Driver Scanner 2009 - Free Scan Now
Reply
  #1 (permalink)  
Old 03-01-2007
=?Utf-8?B?VmFsZXJpbw==?=
 

Posts: n/a
vbscript to create file
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-01-2007
Jon
 

Posts: n/a
Re: vbscript to create file

"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)



May be the permissions for the particular directory in which you are trying
to create your output file

--
Jon

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2007
Ramesh, MS-MVP
 

Posts: n/a
Re: vbscript to create file
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-01-2007
=?Utf-8?B?VmFsZXJpbw==?=
 

Posts: n/a
Re: vbscript to create file
Good Afternoon,
I should mention that the code is only an excerpt, and it did run correctly
under Windows XP SP2. It would create a Log file.
The VBScript is currently trying to backup my stuff (to a Y: Drive on a diff
computer) and create a log file under the C:\ drive.


"Ramesh, MS-MVP" wrote:

> 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)
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: vbscript to enable network connections =?Utf-8?B?ZGFr?= microsoft.public.windows.vista.general 4 1 Day Ago 14:46
Install fails with "vbscript not installed" Mirko D. Walter microsoft.public.windows.vista.general 20 10-04-2007 17:05
Vista and VBScript =?Utf-8?B?ZGFr?= microsoft.public.windows.vista.general 2 02-28-2007 21:03
What's Up With Vbscript.dll and Vista? John A. Gallagher microsoft.public.windows.vista.general 0 02-28-2007 20:32
Re: Can't create file on root from context menu Rich Milburn [MVP] microsoft.public.windows.vista.general 0 02-28-2007 17:43




All times are GMT +1. The time now is 04:47.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com and Win7Heads.com.


Funny Commercials to make you laugh :-)

Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119