Welcome to TSG!
A shutdown script runs under the System Account, so won't have a visible window, plus when the script is run, the system has already switched to the logon/logoff desktop which would hide it anyway.
A logoff script runs under the Current User's account, but also doesn't have a visible window. I'm guessing it is actually running in a System session (so it won't be visible) but with User permissions.
The pause statement makes it wait for the user to press a key, but since the window isn't visible, it will wait forever.
What you need to do is to call notepad to display a text file with the message.
Give this a try. It creates the text file, displays it for 5 seconds, then deletes it. The ping controls how long the message displays, the time is in milliseconds, so 5000=5 seconds.
If running Vista/Win7 you can use
timeout 5 in place of the ping statement
You may want to run this as a logoff script rather than a shutdown script, so it will display if they just logoff instead of shutdown.
Code:
@Echo Off
>"%~dp0\Message.txt" Echo REMOVE PEN DRIVE IF ANY!!
Start Notepad.exe "%~dp0\Message.txt"
ping 1.0.0.0 -n 1 -w 5000
Del "%~dp0\Message.txt"