How to run a batch file upon logging off

Archived from groups: microsoft.public.windowsxp.basics (More info?)

Rick \Nutcase\ Rogers Wrote:
> Pro only: Create a logoff script, add it to the group policy editor
> (start/run gpedit.msc). Add to User Config/Windows Settings/scripts.
Thank you for your reply.

To answer Sparda, I am using Windows XP Pro, 2002.

Rick, can you please suggest an appropriate script-tutorial for the
type of script necessary? I will look around, but I am not sure I'll
easily find what you have in mind.


domvex Wrote:
> Hello. I have a batch file which backs up about 500kb of data to floppy
> disk.
>
> What I want is to make this batch file run automatically whenever I log
> off my user account. I did not see a Task Scheduler option for what I
> want to do (did I miss it?). Your help is appreciated!
>
>
> upon searching this forum for \"task run log off\", i was informed that
> \"the following words are either very common, too long, or too short and
> were not included in your search: run, log, off\". so, i figured i could
> not go wrong listing this question among \"the basics.\"


--
domvex
2 answers Last reply
More about batch file logging
  1. Archived from groups: microsoft.public.windowsxp.basics (More info?)

    Hi,

    Not my strongest suit either, but here:
    http://www.microsoft.com/technet/scriptcenter/guide/sas_vbs_overview.mspx

    --
    Best of Luck,

    Rick Rogers, aka "Nutcase" - Microsoft MVP
    http://mvp.support.microsoft.com/
    Associate Expert - WindowsXP Expert Zone
    www.microsoft.com/windowsxp/expertzone
    Windows help - www.rickrogers.org

    "domvex" <domvex.1ujudn@pcbanter.net> wrote in message
    news:domvex.1ujudn@pcbanter.net...
    >
    > Rick \Nutcase\ Rogers Wrote:
    >> Pro only: Create a logoff script, add it to the group policy editor
    >> (start/run gpedit.msc). Add to User Config/Windows Settings/scripts.
    > Thank you for your reply.
    >
    > To answer Sparda, I am using Windows XP Pro, 2002.
    >
    > Rick, can you please suggest an appropriate script-tutorial for the
    > type of script necessary? I will look around, but I am not sure I'll
    > easily find what you have in mind.
    >
    >
    > domvex Wrote:
    >> Hello. I have a batch file which backs up about 500kb of data to floppy
    >> disk.
    >>
    >> What I want is to make this batch file run automatically whenever I log
    >> off my user account. I did not see a Task Scheduler option for what I
    >> want to do (did I miss it?). Your help is appreciated!
    >>
    >>
    >> upon searching this forum for \"task run log off\", i was informed that
    >> \"the following words are either very common, too long, or too short and
    >> were not included in your search: run, log, off\". so, i figured i could
    >> not go wrong listing this question among \"the basics.\"
    >
    >
    > --
    > domvex
  2. Archived from groups: microsoft.public.windowsxp.basics (More info?)

    Batch files are OK.

    If XP Pro, use Group Policy.

    Local Computer Policy\Computer Configuration\Windows Settings\Scripts
    (Startup/Shutdown)

    Local Computer Policy\User Configuration\Windows Settings\Scripts
    (Logon/Logoff)

    %windir%\system32\GroupPolicy\Machine\Scripts\Shutdown
    C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Shutdown

    %windir%\system32\GroupPolicy\Machine\Scripts\Startup
    C:\WINDOWS\system32\GroupPolicy\Machine\Scripts\Startup

    To assign computer shutdown scripts
    http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/gptext_assigncomputershutdownscripts.mspx

    More info
    http://search.microsoft.com/search/results.aspx?st=b&View=en-us&s=6&c=0&qu=Scripts%20(Startup/Shutdown


    --
    Hope this helps. Let us know.

    Wes
    MS-MVP Windows Shell/User

    In news:domvex.1ujudn@pcbanter.net,
    domvex <domvex.1ujudn@pcbanter.net> hunted and pecked:
    > Rick \Nutcase\ Rogers Wrote:
    >> Pro only: Create a logoff script, add it to the group policy editor
    >> (start/run gpedit.msc). Add to User Config/Windows Settings/scripts.
    >> Thank you for your reply.
    >
    > To answer Sparda, I am using Windows XP Pro, 2002.
    >
    > Rick, can you please suggest an appropriate script-tutorial for the
    > type of script necessary? I will look around, but I am not sure I'll
    > easily find what you have in mind.
    >
    >
    > domvex Wrote:
    >> Hello. I have a batch file which backs up about 500kb of data to floppy
    >> disk.
    >>
    >> What I want is to make this batch file run automatically whenever I log
    >> off my user account. I did not see a Task Scheduler option for what I
    >> want to do (did I miss it?). Your help is appreciated!
    >>
    >>
    >> upon searching this forum for \"task run log off\", i was informed that
    >> \"the following words are either very common, too long, or too short and
    >> were not included in your search: run, log, off\". so, i figured i could
    >> not go wrong listing this question among \"the basics.\"
    >
    >
    > --
    > domvex
Ask a new question

Read More

Windows XP