hmmm, this line here:

$answer = MessageBox("Deleteing Files press OK...", "", 0)

Displays a messagebox with specified text, and an OK button, and asks the user to press OK, when they do - control is returned back to your script, where you delete the files, at the end this:

$answer = MessageBox("files deleted. press OK...", "", 0)

displays another messagebox saying files deleted, the user has to press OK again, and the login script carrys on ...

The second parameter to Messagebox ("") is the title, i just used a null string for that, and the third param (0), specifies all the various flavors and options for Messagebox (buttons, icons, etc). I just used zero which means take all the defaults.

While your reading the manual, might want to look at the option to have timeouts on the MessageBox ... important stuff for login scripts maybe.