The problem with the system not removing the folder can be solved in other ways. Most uninstall software will not remove files that have customized settings, and thus will not remove the folder.

Doing this in a login script is bad, whether local users are admins or not. It's an admin task, and should be done by an administrator.

Here's how to clone yourself to do this -
1. Modify your script to check the folder -
If Exist('C:\Progra~1\Trend...')
; delete the folder and all contents
EndIf
2. Create a folder on an accessible share somewhere and put Kix32.exe and your uninstall script and EXE there.
3. Test the script on a PC by running
\\server\share\folder\kix32 \\server\share\folder\remove-it.kix
from a command prompt.
Make sure the SHELL command is "\\server\share\folder\remove.exe"
(Change the script and EXE names as appropriate!)

When step 3 works, you can now step behind the curtain and perform your magic - push the command to all computers to run at a scheduled time, using Admin credentials! It's quite simple..
  • Download the Task Scheduler Admin tool from my web site. It's a Kix based script and a tool from the MS resource kit called JT.EXE. JT is a powerful (but cumbersome to use) task scheduling tool, but tsAdm makes it easy to use. Install it on your PC using the Setup command in the package.
  • Create a text file with a list of all computers you want to update, one name per line.
  • Launch the task scheduler tool "tsAdm".
    In the "Computer Name" field, type "BLAST".
    Define a date and time, and the trigger type is "Once"
    Specify "\\server\share\folder\kix32.exe" as the command, and "\\server\share\folder\remove-it.kix" as the argument.
    Specify credentials with admin rights - should be admin rights on the PC and at least User rights to the network share!
    Select the Delete When Done option.
    Click Save - when prompted for a task name, enter "Remove Trend 8"
    The system will prompt for a list of computers - browse to your computer list file.
The task will be pushed to each computer and execute at the defined time, using the defined account credentials. You might want to try a few first, and may even want to deploy this in small batches of 15-25 computers to minimize network overhead.

Using the task scheduler is one of the best, safest, and most reliable methods of performing admin tasks on many computers. tsAdm has been around for a long time, and I use it regularly to perform tasks such as this. It is built on the tcLib UDF library, which is also available on my site.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D