From your thread title, it appeared as though need a script that would run on NT systems.
I'm confused, is the command asking for confirmation of deletion? There should not be a confirmation request to delete one file, even if it is an executable. A simple del c:\windows\winpopup.exe should be all that is required.
In any case, the syntax used in your example (|Y) is incorrect. To provide an automatic response as you are trying to do, the syntax would be:
echo y | del c:\windows\winpopup.exe
If in fact, Win9x is asking for confirmation to delete the file, then using the switch /q will suppress such confirmation. So your line would then be:
del c:\windows\winpopup.exe /q
One other possibility comes to mind. Is the program starting up when people login? If this is the case, then the program is more than likely in the startup folder(s) on these machines. Therefore, attempting to delete the program will be unsuccessful until the program is shutdown. This is because while the program is active, the file is in use and therefore locked. So in that case, the program would have to be removed from the startup folder as well.
Someone could say that it is being called from the registry, but while that is certainly possible, it highly unlikely.
Provide a little more info if none of this works for you.
to remove Winpopup program
@echo off
goto begin
******************************************************
delpop.bat
written 9.20.00
by spiff
This batch deletes the winpopup program from
the system
******************************************************
:begin
del c:\windows\winpopup.exe /q
:end