Ack! Stupid Outlook.  Here's what I meant to say:

- Create a new .bat file that does all the cleanup you need (I call mine
"cleaup.bat").  

- Create a second .bat file that copies the cleanup.bat file to the
"Startup" program group so it gets run on the next login (I call mine
"config.bat"). Add a reference to this .bat file to the "bottom" setting
in the [_meta] section of your unattend.txt.

This way, the last thing unattended will do is run config.bat, which
will copy over the cleanup script, which will then run on the next
reboot when the unattended installation is finished.  Since unattended
will be finished, you can safely remove perl in cleanup.bat.

I'm not sure if this makes any sense, but I've included the relevant
portions of the files as I use them.

Hope this helps,

-matt

--- z:\site\unattend.txt ---
[_meta]
bottom="config.bat"

--- z:\scripts\config.bat (runs just before unattended finishes) ---
copy "%z%\packages\activeperl-5.8.3.809-mswin32-x86.msi"
"c:\netinst\perl.msi"
copy %z%\scripts\cleanup.bat "%userprofile%\start
menu\programs\startup\"

--- z:\scripts\cleanup.bat (runs when admin logs on after unattend
finishes) ---

echo Removing Perl...
start /wait msiexec /x c:\netinst\perl.msi /qb
rmdir /S /Q "%ALLUSERSPROFILE%\Start Menu\Programs\ActiveState
ActivePerl 5.8"
rmdir /S /Q "C:\perl"

echo Preserving unattend.txt...
copy /Y C:\NETINST\unattend.txt
"%USERPROFILE%\Desktop\%computername%-unattend.txt"

echo Removing leftover files and directories...
rmdir /S /Q C:\DRIVERS
rmdir /S /Q C:\netinst




-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Peter
Huber
Sent: Tuesday, September 14, 2004 5:18 AM
To: [EMAIL PROTECTED]
Subject: [Unattended] cleanup

How / where do I do my final cleanup after installing the os and all
applications ? I want to remove some dirs and the active-perl. I can not
do this in base.bat because develop / sales include base and there would
not be any perl interpreter for the additional tasks to do from e.g. 
sales.bat
Thanx for your help.



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to