Discussion Locked
0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
While running winnt, is there a way to run a batch file when a program is executed? The batch file needs to scan the floppy drive, and if it detects files of a certain name, log the user off.
3 replies
by stillatit
If this is for a specific program, you can create a batch file that does your thing, then cd's to the program directory, starts the "real" program and exits when that program exits. Make the desktop and menu shortcuts point at the batch file. If you need this to happen when ANY program runs, I have no idea.
Example using Word
%echo off
if exist a:gotcha.bat exit
cd \windows
winword
exit
The problem is that I do not know how to log the user off from a DOS window. I am not sure it canbe done. (What if other programs were running? What happens to the desktop? etc.)
Good luck
by scottfleming
Poster rated this answer
by scottfleming
This question was closed by the author
This discussion is closed to new replies.
Trending IT Employment posts
Sort by Trending
0 helpful
9 replies
0 helpful
0 replies
0 helpful
1 reply
0 helpful
6 replies
0 helpful
11 replies