sodevrom Posted May 28, 2007 Report Share Posted May 28, 2007 Hello, I want to know if it's possible to FORCE a logoff for the user that is using the PC . So all he has to do is click on a shortcut and he will be logedoff fast and without having to save or close runing applications . How can this be done ? Maybe using a batch file, command line, script, anything . Please try to help me with this . Thank you in advance . Have a good day all Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted May 28, 2007 Report Share Posted May 28, 2007 Batch command:shutdown -s -t 30-s means shutdown ( you can also use -r for restart, -l for logoff) and the -t 30 means 30 seconds. This will terminate anything that has not closed, and initiate the shutdown in 30 seconds, regardless of what is running.You can also abort ANY shutdown command using; shutdown -aThis site may help:http://www.robvanderwoude.com/index.html Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted May 29, 2007 Report Share Posted May 29, 2007 There is also a logoff command that you can put in a batch script:logoff Quote Link to comment Share on other sites More sharing options...
sodevrom Posted June 2, 2007 Author Report Share Posted June 2, 2007 Hello, sorry fot the late reply . I had some problems at home. Thank you for the help... but it does not help. I already tryed all commands, but it's not what I want . Open for example notepad, type in something, don't close it and write in the command shell this : shutdown -s -f (this will force shutdown) . It will close all apps, but it will stop on NOTEPAD and ask you if you want to save ... If you press cancel , the shutdown is canceled I need something that will not stop on this, and logoff no matter what . What do you say ? How can it be done ? Quote Link to comment Share on other sites More sharing options...
sodevrom Posted June 6, 2007 Author Report Share Posted June 6, 2007 Hello, can no one help ? Please, I know it can be done :( Bye Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted June 7, 2007 Report Share Posted June 7, 2007 I don't know how to achieve this, and I also don't know why anybody would want a forced logoff, without gracefully closing application and save unsaved data. Quote Link to comment Share on other sites More sharing options...
Eight-Oh-Eighty-Eight Posted June 7, 2007 Report Share Posted June 7, 2007 According to the online help for the shutdown command if you use the /f option it will "Force running applications to close. This will not prompt for File-Save in any open applications. so will result in a loss of all unsaved data!!!" Sounds just like what you're looking for. So the whole command should look like thisshutdown /s /fif you want you can just make a shortcut point to C:\Windows\System32\shutdown.exe /s /fthat way you don't need to make a batch file and then make a shortcut to the batch file. Make sure to use Windows or WinNT depending on which version of Windows you're using. If you're unsure just open up your C drive and see which folder is there. Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted June 7, 2007 Report Share Posted June 7, 2007 The poster only wants to logoff, not shut down. However, there is no 'force' option in the 'logoff' command. Even the standard Logoff button has no 'force' option. Quote Link to comment Share on other sites More sharing options...
sodevrom Posted June 7, 2007 Author Report Share Posted June 7, 2007 Hello, thank you all . I already knew about the force shutdown .. but as Pat Willener sayed, I only want to logoff ... Any new ideeas ? Thanx Quote Link to comment Share on other sites More sharing options...
sodevrom Posted June 7, 2007 Author Report Share Posted June 7, 2007 Hello , I fialy solved the problem . I used this command : shutdown -l -t 00 . It works exactly as I want it to do . Thank you all for your help ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.