Results 1 to 6 of 6
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run Processes AFTER shutdown

    I know I saw something on this, can anyone refresh my memory?

    I want to run a batch process After I select 'ShutDown' from win98... after the process runs, the system shuts down... any ideas?
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Northern, California, USA
    Posts
    1,886
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Processes AFTER shutdown

    Found it.. <A target="_blank" HREF=http://www.calweb.com/~webspace/batch/samples/windowfinish.txt>here.</A>
    <IMG SRC=http://www.wopr.com/w3tuserpics/Kel_sig.gif>
    Moderator:<font color=448800> Pix Place, Internet Explorer</font color=448800>
    <small>www.kvisions.com

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Processes AFTER shutdown

    Nah...
    use the /k switch on the command line of your close-down .pif
    Something similar to this was discussed recently in the Win98 Forum under 'Slow Start Up', where I showed the poster how to use a batch-file to clear the litter out of the Temp folder. Try this, removing the bits which aren't necessary for your purposes.


    A. The Batch file.

    1. Open Notepad and type in the following lines :

    @ ECHO OFF
    CD C:WindowsTemp
    del *.tmp
    del *.~mp
    CD

    CLS

    2. Save it in a folder and with a name. Make a note of the two.

    (Note : this will only remove from the Temp folder those files with the extensions specified above. You may add others.You could get it to search your whole drive for *.tmp files, but I feel this would take too long)

    B. Making the Shortcut.

    1. Drag 'Command.com' from the Windows Directory to the desktop and make a shortcut. It should turn into an MSDOS Prompt with the appropriate icon.

    2. Right click and choose Properties.

    3. Under Program, check 'Close on Exit' then Advanced. Check only ' MSDOS Mode' and 'Use Current MSDOS Config.' Click ok.

    4. Back in the Program screen, after the entry already on the Cmd line add a single space then
    /k C:Batchesc3.bat
    (The path after the k switch will be to your batch file made in A.) At the moment it points to mine.
    5. Click ok.

    Rgds

  4. #4
    Star Lounger
    Join Date
    Feb 2001
    Location
    Cascais, Portugal
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Processes AFTER shutdown

    Yes - but though I'm using this batch file it doesn't delete tmp file with H attrib Don't know how to do this - I get several of these daily - don't know why - can you help
    Thanks

  5. #5
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Processes AFTER shutdown

    Hi
    All the H attribute means is that the file is hidden. You should be able to remove it by adding the line to your batch file (just after you've entered the path to the files you want deleting):

    attrib *.* -r -h -s (Note: there is a space between each command)

    -h = take off the hidden atrribute;
    -s = same for the System attrib;
    -r = remove Read Only;

    You don't need these attributes 'on' for files that are about to be deleted.

    If it doesn't like this sequence, try :

    attrib *.tmp -h -s -r

    Again, don't forget the spaces.

    Rgds

  6. #6
    Star Lounger
    Join Date
    Feb 2001
    Location
    Cascais, Portugal
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run Processes AFTER shutdown

    That fixed it - thanks a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •