Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WSH fails to delete a temporary file it creates

20 views
Skip to first unread message

Paul Baker

unread,
Mar 22, 2006, 3:34:06 PM3/22/06
to
I am finding that WSH fails to delete a temporary file it creates. This is a
problem because I wrote an application that frequently runs WSH and so the
files build up quickly. When there are finally no unique file names left,
WSH fails to run the script with a "file exists" error.

Steps to reproduce:

1. Create a text file named test1.wsf containing this text:

<job>
<script language="vbscript">

Set controller = WScript.CreateObject("WSHController")
Set script = controller.CreateScript("test2.wsf")
script.Execute
WScript.Sleep 1000

</script>
</job>

2. Create a text file named test2.wsf containing this text:

<job>
</job>

3. With test1.wsf in the same folder as test2.wsf, run test1.wsf

4. Observe that a file is created in the temporary folder named
"wsh???.tmp".

Tbe problem does not occur if test1.wsf finishes before test2.wsf. The
version of Windows is Windows XP Professoinal Service Pack 2. The version of
wscript.exe is 5.6.0.8820.

Does anyone have any advice on this?

Thanks,

Paul


asdf

unread,
Mar 23, 2006, 3:35:47 AM3/23/06
to
An OS should not create files on another hard drive or connected device.


-------------

Does you mail man look into your fridge or bathroom ?

"Paul Baker" <pa...@online.rochester.rr.com> wrote in message
news:%23osMOAf...@TK2MSFTNGP09.phx.gbl...

Paul Baker

unread,
Mar 23, 2006, 9:33:10 AM3/23/06
to
Well it does not. It creates a file in the (local) temporary folder (eg.
C:\Documents and Settings\<name>\Local Settings\Temp) and does not delete
it.

Paul

"asdf" <as...@asdf.com> wrote in message
news:e%236A8Tl...@TK2MSFTNGP10.phx.gbl...

asdf

unread,
Mar 29, 2006, 1:19:26 AM3/29/06
to
There was a "bin" file written by some msvp, and that did not either.


Below I post my bat on startup,

--------

For newbies, I also install xp or 2003 from a dos partition
(that is max drive utilization - e.g. 120 GiG in FAT32)


********************************

Post :

That drew me admiration from network guys even from down under.

if exist c:\windows\cookies\*.* deltree /y c:\windows\cookies\*.*
if exist c:\windows\locals~1\tempor~1\*.* deltree /y
c:\windows\locals~1\tempor~1\*.*
if exist c:\windows\tempor~1\*.* deltree /y c:\windows\tempor~1\*.*
if exist c:\windows\temp\*.* deltree /y c:\windows\temp\*.*

I think by querying the code strings you will find a guy named Langa (some
newspaper)
that I had "bricked" years ago for his ms benevolent publications.

He then retired for years but came up with it.

And it works.


"Paul Baker" <pa...@online.rochester.rr.com> wrote in message

news:uRWDcboT...@TK2MSFTNGP14.phx.gbl...

Paul Baker

unread,
Mar 29, 2006, 9:25:24 AM3/29/06
to
Thank you, but I am not looking for a workaround. I am looking for a fix. I
had hoped that this would help bring the bug to Microsoft's attention.

Paul

"asdf" <as...@asdf.com> wrote in message

news:Oyk$8ivUGH...@TK2MSFTNGP12.phx.gbl...

Paul Baker

unread,
Apr 4, 2006, 10:49:28 AM4/4/06
to
I can reproduce it with wscript.exe version 5.6.0.8825 too.

Paul

"Paul Baker" <pa...@online.rochester.rr.com> wrote in message
news:%23osMOAf...@TK2MSFTNGP09.phx.gbl...

asdf

unread,
Apr 13, 2006, 2:40:03 AM4/13/06
to
I routinely delete all temp or Internet , or cookie, or like folders

from a .bat in autoexec.bat / xp you need to set parsing for it.

=================

I also have numerous things running. Some try to put in temp files
a legion of stuff supposed to run after Os starts up.

sicne I delete those "suspect" folder,

I found that windows does keep a " " secret " " way for
e.g. ms important stuff to be present on reboot.
**********
But this is my opinion only.
I am not trying to compete with any "msvp" on the side.

"Paul Baker" <pa...@online.rochester.rr.com> wrote in message

news:O8PLfyzU...@tk2msftngp13.phx.gbl...

Paul Baker [MVP, Windows - Networking]

unread,
Apr 19, 2006, 9:25:49 AM4/19/06
to
Again, I thank you, but that is only a workaround.

Paul

"asdf" <as...@asdf.com> wrote in message

news:O%23QopUsX...@TK2MSFTNGP04.phx.gbl...

asdf

unread,
Apr 22, 2006, 4:29:52 AM4/22/06
to
Yes it is only a workaround.

And I remember MS having had to "teach" AOL
what it was supossed to could have done with "Messenger" or not.

-------------------------------------

Be implicit in what you are trying to post or
gettting a workaround for.

-----------------------


Listening.


"Paul Baker [MVP, Windows - Networking]" <pa...@online.rochester.rr.com>
wrote in message news:eY0aHT7Y...@TK2MSFTNGP04.phx.gbl...

0 new messages