|
The purpose of this script to remove some temp files caused by Altiris. Our last Altiris Admin didnt have his head screwed on to tight, Altiris would download the same 11meg files hundreds of times.
My problem is I dont have a login script with local admin rights (read retarded parent company IT dept). So my script cannot get access to C:\windows\installer to remove these temp files that are literally filling up the drive.
Seeing as how I have 100+ pc's to this on I dont want to do them individually. So my solution since I have local admin rights is to run a script from my PC to each PC to remove these hidden system files from the Admin Share C$.
I also have the problem some PC's have the sysroot as "windows" and some as "winnt". I cant use the %sysroot% because the script is executing on my PC and will always pull my sysroot.
I have composed a list of all the PC's by computer name. That is the "allpc.txt" file.
$X stores the PC name $Y is for trouble shooting
IF Open(3, "\\server\kix2010.460\Allpc.txt") = 0 $x = ReadLine(3) WHILE @ERROR = 0 ? "Deleting Temp Files From " + $x ? $Y = "\\" + $x + "\C$\WINDOWS\Installer\*.msp" $Y del "\\" + $x + "\C$\WINDOWS\Installer\*.msp" /c /h /s $Y = "\\" + $x + "\C$\WINNT\Installer\*.msp" $Y del "\\" + $x + "\C$\WINNT\Installer\*.msp" /c /h /s $x = ReadLine(3) LOOP Close (3) ENDIF
I'm not getting any errors, but the files remain. Is Del not unc friendly?
Edited by SoCi0pAtH (2008-04-25 06:25 PM)
|