Page 1 of 1 1
Topic Options
#144731 - 2005-08-03 09:16 PM Is There A Script That Will Delete The ntuser.pol.tmp Files??
giant45man Offline
Fresh Scripter

Registered: 2001-11-29
Posts: 10
Is there a logon script that I can use that will delete the ntuser.pol.tmp, ntuser.pol.tmp.tmp, etc, from the user profiles folder?
Top
#144732 - 2005-08-04 12:45 AM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you are asking does anyone have a code that does that?
as I bet, you don't want the whole logonscript.

k, "user profiles" you say... what is the exact path where these temp files appear?
_________________________
!

download KiXnet

Top
#144733 - 2005-08-04 10:13 AM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Might want to take a look here

http://support.microsoft.com/kb/q271518/

Top
#144734 - 2005-08-04 06:57 PM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
giant45man Offline
Fresh Scripter

Registered: 2001-11-29
Posts: 10
The ntuser.pol.tmp files appear in the root of the affect users "Profiles" folder/directory. I have looked at that Microsoft article before, I even applied the hotfix the way they tell you to, but I still have users that are getting the ntuser.pol.tmp files. I was hoping to get a login script that would delete these files. Can anyone help me?
Top
#144735 - 2005-08-04 08:04 PM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Well, untested but perhaps something like this would work.

Code:
SHELL '%COMSPEC% /e:1024 /c DEL /S /F /Q ' + '%%USERPROFILE%%'+'\*.TMP'


Top
#144736 - 2005-08-04 08:35 PM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
giant45man Offline
Fresh Scripter

Registered: 2001-11-29
Posts: 10
I tried this code:

SHELL '%COMSPEC% /e:1024 /c DEL /S /F /Q ' + '%%USERPROFILE%%'+'\*.TMP'

and it did not work. Any ideas?

Top
#144737 - 2005-08-04 11:05 PM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
there still is no such dir as users "profiles"
_________________________
!

download KiXnet

Top
#144738 - 2005-08-05 04:23 PM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
giant45man Offline
Fresh Scripter

Registered: 2001-11-29
Posts: 10
Quote:

there still is no such dir as users "profiles"




I might have misued the term "profiles", that is what the directory that holds the users environment is called, however, the actual name as it exists on the server may be different. The folder that I am referring to is found on the PC's "C" drive in the following path: c:\Documents and Settings\%username%

Where %username% is a variable that means the logon name for the user, (i.e. if one user's logon name is lsmith, the path to his profile is c:\Documents and Settings\lsmith). The problem I am having, using lsmith as an example, is that in the following path c:\Documents and Settings\lsmith, ntuser.pol.tmp files are being recreated over and over until it prevents the profile from being loaded properly. Since we are using roaming profiles, these temp files are being uploaded to the server whenever the user logs out. I already tried the Microsoft hotfix/patch and it doesn't work. I was hoping someone new of a script or code that would delete these files at logon or logoff. Hopefully this explanation makes things alot clearer. Let me know if it doesn't. Thanks

Top
#144739 - 2005-08-05 04:47 PM Re: Is There A Script That Will Delete The ntuser.pol.tmp Files??
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well, DOC's untested code might do with some smithing. Don't think you need to wrap the enviro var in quotes and no need to double up on the %%. No need for 1024 of env space either.

Might stand to have a few well placed quotes thought.

(untested)
SHELL '"%COMSPEC%" /c DEL /S /F /Q "' + %USERPROFILE% + '\*.TMP"'
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.143 seconds in which 0.11 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org