1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Windows Log off & on with scheduled task on Windows XP?

Discussion in 'Tech Support' started by Gurdeep14, 19 Mar 2012.

  1. Gurdeep14

    Gurdeep14 Minimodder

    Joined:
    25 Apr 2009
    Posts:
    650
    Likes Received:
    26
    I recently built a NAS using Windows XP and all has been great. I use remote desktop to access the NAS for maintenance etc.

    I just set up a scheduled task to reboot itself once a week (just for stability, if it wants to install certain windows updates, clear the RAM, page-file etc etc.

    However, I want to run a scheduled task which logs out of the current user (in this case "NAS") and logs back in again. This is because, as i'm sure we are all aware, when Windows boots up, it does not fully load all programs sometimes (seems to forget about some of them), this is usually fixed by logging off and on again. Also, it does not show all running programs correctly in Task Manager until I have logged off and on again.

    How would I go about this? Is it even possible? Could I get away with just logging of NAS and still have access to the files on the NAS, even though no user is logged in?

    Thanks guys
     
  2. noizdaemon666

    noizdaemon666 I'm Od, Therefore I Pwn

    Joined:
    15 Jun 2010
    Posts:
    6,099
    Likes Received:
    805
    Logging off is relatively simple, make a scheduled task and add the /l switch to shutdown.exe, that logs you off. Logging back on is more difficult, there would be no tasks running as such so not sure how you'd log back on.

    However, all your files should still be accessible even when logged off.
     
    Gurdeep14 likes this.
  3. Gurdeep14

    Gurdeep14 Minimodder

    Joined:
    25 Apr 2009
    Posts:
    650
    Likes Received:
    26
    Thanks for the quick reply.
    I think I should have also mentioned that the NAS runs Serviio and PS3 Media Server as well as uTorrent, will all theses still function whilst logged off?
     
  4. Margo Baggins

    Margo Baggins I'm good at Soldering Super Moderator

    Joined:
    28 May 2010
    Posts:
    5,649
    Likes Received:
    268
    no they will no longer run as they are running processes that are normally dependant on a user - thus being logged in is essential.
     
  5. saspro

    saspro IT monkey

    Joined:
    23 Apr 2009
    Posts:
    9,613
    Likes Received:
    404
    What you could do is set the user account as the default logon account (start - run - control userpasswords2) this would cause that user to logon when the machine is rebooted.
    Then add the programs you want to load as logon items for that user.

    Not exactly secure (as the password is stored in the reg) but it'll work
     
    Gurdeep14 likes this.

Share This Page