Created a GPO to run a batch file on shutdown for domain XP computers - with the purpose of deleting old user profiles.
For this I am using an application called DeleteProfiles from OptimumX.
cd C:\
if exist "Program Files (x86)" GOTO Exit (Checks if XP or not)
if exist DeleteProfiles GOTO COMMAND
:CopyDeleteProfiles
md DeleteProfiles
copy /Y \\SomeShare\SomeFolder\DeleteProfiles\DeleteProfiles.exe
C:\DeleteProfiles\
:COMMAND
pushd C:\DeleteProfiles\
start /Wait DeleteProfiles.exe /MIN:14 /Y
(/Min: # = Delete profiles older than # and /y removes yes or no prompts)
:Exit
End
It works alright, but, a CMD screen appears appears at shutdown, with the output of the program. How do I make it go away?
The real problem here is that users can close the program which causes the script to stop. If I can't make that go away, I would like at least to make the screen not close-able.
start /b
option? "/B Start application without creating a new window. "