1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

batch file: log off after quitting a game

Discussion in 'General Software' started by onehp1, Nov 4, 2008.

  1. onehp1 New Member

    Joined:
    May 11, 2008
    Messages:
    62 (0.03/day)
    Thanks Received:
    1
    I want the computer to logoff immediately after a user quits a game. The problem is that it would keep going and won't stop.

    Code:
    cd (game directory)
    game.exe
    logoff
    
    I want the batch to wait at game.exe until user quits, then move to logoff. Is there another way? I don't want the user to be given options to logoff or not.
     
  2. Mussels

    Mussels Moderprator Staff Member

    Joined:
    Oct 6, 2004
    Messages:
    42,488 (11.47/day)
    Thanks Received:
    9,768
    i cant think of any way to do it. the game would probably need to be coded to run a batch file upon exit, and thats not going to happen.
     
  3. DanTheBanjoman SeƱor Moderator

    Joined:
    May 20, 2004
    Messages:
    10,553 (2.75/day)
    Thanks Received:
    1,383
    Use the shutdown -l command.
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page