Page 1 of 1 1
Topic Options
#7452 - 2001-03-09 03:52 AM Cleaning up temporary internet folder
Anonymous
Unregistered


I am using this line to cleanup temporary internet folder from users profile whenever they log on, but with no luck.
$tmpintfolder = "c:\winnt\%userprofile%\tempor~1\*.*"
del $tmpintfolder
I have also tried
RUN %COMSPEC% /C DEL C:\WINNT\%USERPROFILE%\TEMPOR~1\*.* /F /Q /S"

------------------
DoUntil

Top
#7453 - 2001-03-09 06:35 AM Re: Cleaning up temporary internet folder
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

See http://kixtart.org/board/Forum2/HTML/000617.html which item will automatically calculate the correct value by reading registry key.
Also it cleans a lot of other temporary files.
Greetings.


- site: http://home.wanadoo.nl/scripting
- program: cleanup.kix

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#7454 - 2001-03-09 06:37 AM Re: Cleaning up temporary internet folder
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
for cleaning up directory structures we are using deltree /y as command. see above script how we did it.

greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#7455 - 2001-03-09 02:41 PM Re: Cleaning up temporary internet folder
Anonymous
Unregistered


Thanks for your useful help, however, I have used the line deltree /y and ended up with no result cleaning up temporary internet files.

------------------
DoUntil

Top
#7456 - 2001-03-10 02:17 AM Re: Cleaning up temporary internet folder
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

A part of script cleanup.kix is:

code:

$ikey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
IF (Exist($ikey) = 0)
$info=$info+" user_shell_folders=("
;
$ivalue=ReadValue($ikey, "Cache")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\."+CHR(34)
$info=$info+"-cache"
ENDIF
;
$ivalue=ReadValue($ikey, "Cookies")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\."+CHR(34)
$info=$info+"-cookies"
ENDIF
;
$ivalue=ReadValue($ikey, "Local Settings")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\History\."+CHR(34)
$info=$info+"-local.history"
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\Temp\."+CHR(34)
$info=$info+"-local.temp"
ENDIF
IF (len($ivalue) <> 0)
shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\Temporary Internet Files\."+CHR(34)
$info=$info+"-local.temporary_internet_files"
ENDIF
;
$ivalue=ReadValue($ikey, "Recent")
IF ($debug_mode = "yes")
? "recent.user_shell_folders -> "+$ivalue+"="+ExpandEnvironmentVars($ivalue)
ENDIF
IF (len($ivalue) <> 0)
del ExpandEnvironmentVars($ivalue)+"\*.lnk"
$info=$info+"-recent"
ENDIF
$info=$info+"-)"
ENDIF

The shell command can be

code:

f.e. shell "%comspec% /e:1024 /c deltree /y "+CHR(34)+ExpandEnvironmentVars($ivalue)+"\Temporary Internet Files\."+CHR(34)
shell "%comspec% /e:1024 /c deltree /y c:\windows\Temporary Internet Files\."

the code CHR(34) (= "%" sign) is be used for expanding environment variable.
second example is using a fixed path specification.


Greetings.

btw: the deltree command looks like deltree /y pathname

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

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 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.05 seconds in which 0.023 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