JORGEMAL Posted February 12, 2013 Posted February 12, 2013 I have a batch file to terminate a Windows Server 2008 session and it works fine. I also created a programmed task so it runs automatically around midnight but, when I go to our server in the morning, the session is still active and Windows is only blocked. As all of you must know, Windows Server 2008 blocks itself after some time has elapsed and no activity has been performed. Well, at the time my programmed task runs, Windows is already blocked and for this reason the session stays alive but, if it is not blocked yet, then the session is termiated when the programmed task runs. How can I solve this issue so the Windows session is terminated wheather it is blocked or not. With respect, Jorge aldonado Quote
ICTCity Posted February 18, 2013 Posted February 18, 2013 In scheduled task you have one option "run this task even if user is disconnected" or something like that. Quote -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
JORGEMAL Posted February 19, 2013 Author Posted February 19, 2013 In scheduled task you have one option "run this task even if user is disconnected" or something like that. I had already tried this option before without result, and I guess it does not apply to my case. The reason I say that it does not apply is because a session is open all the time because I do not logout, all I do is to finish my work in the server and leave, I do not logout. After a period of time has elapsed, Windows Server 2008 blocks itself (but the session remains), and it is this situation which (I think) avoids the session to terminate when the programeed task runs the batch file. Quote
ICTCity Posted February 19, 2013 Posted February 19, 2013 Can u post your batch file content? It looks like the batch misunderstand the computer status. Quote -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
JORGEMAL Posted February 20, 2013 Author Posted February 20, 2013 Can u post your batch file content? It looks like the batch misunderstand the computer status. The batch file has only a "shutdown /l" command, nothing else. Such a batch file runs fine when executed directly. Also, I found that there is a "0x1" error in the programmed tasks for this task. I tried several things like the ones in this site http://social.technet.microsoft.com/Forums/en-US/winserverManagement/thread/57c65328-d8c8-4e13-9b51-e017ae6c298c without success. Quote
ICTCity Posted February 20, 2013 Posted February 20, 2013 Try this: use the SYSTEM account, check run with highest privileges and still with run also if user is not logged on. if this doesn't work, the try to add /f to your batch. also check if the user as the privilege"log in as a script" Quote -------------------------------------------------------- Tu peux aussi crire en franais. Du kannst auch auf Deutsch schreiben. Puoi scrivere anche in italiano. --------------------------------------------------------
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.