Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WshRemote generating wsh files 2

Status
Not open for further replies.

xwb

Programmer
Jul 11, 2002
6,828
GB
I'm getting this problem on some Win XP PCs. Whenever a wsh remote command is executed, a wshxxxx.tmp file is created in C:\Documents and Settings\..\temp. xxxx is a hex number. After running for a few weeks, the system starts slowing down because it keeps on generating new numbers. After a few months it eventually stops when all 65536 numbers have been used up. Took me quite a while to find this out.

I don't know what these files are for: possibly semaphore locks of some sort. The size is always 0.

Other than deleting the files every morning, is there a registry setting somewhere that will tell the system to tidy up when it exits from wshremote?
 
Why not create a scheduled task to delete the files?


A slight mod to my CleanBadMail.vbs should do nicely.


I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Thanks for the reply but deleting the fies is not the answer. The question is

1) why does it happen on some machines but not on others
2) how do I stop it happening

It isn't a problem scheduling something to delete files but that is just fixing the symptom. I'd really like to know what the root cause is and to fix the cause instead of the symptom. If I had the program running in a continuous loop, it could generate more than 65535 files in one day in which case the schedule wouldn't work unless I scheduled it every hour. In fact, it would start slowing down after it created about 1000 files.
 
Have you compared images of the different machines? More than likely it is a permissions issue.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
It is because you're running script host provided by w2k3 server and there is a design change.

<quote>[tt]
Note

In WSH version 5.6.6626, which ships with Internet Explorer 6 and Windows XP, a remote script is copied to memory in the remote machine and run from there. In later versions of WSH, such as the one provided by Windows Server 2003, a remote script is copied to the temporary directory of the account that accesses the remote machine. The script is run with the security settings for the remote machine and the temporary directory.
</quote>[/tt]
 
So if I get the end event to delete the file, it should tidy up regardless of which version I use. Sounds like it might work. I'll give it a try.
 
Yes, putting a delete in the end event worked. Thanks for the tips.
 
Thanks for bring up the issue worthwhile to take note of.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top