1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Batch File

Discussion in 'Legacy Windows' started by RDOC, 2003/01/21.

Thread Status:
Not open for further replies.
  1. 2003/01/21
    RDOC

    RDOC Inactive Thread Starter

    Joined:
    2003/01/21
    Messages:
    3
    Likes Received:
    0
    Windows 2000 Professional
    I have a bat file saved as cleanxp.bat that I have saved in E: and a shortcut to it on my desktop. When I double click on the icon on my desktop it opens the file in notepad. The right click context menu has no edit, open or print in it. The only way I can run this bat file is to go to the command prompt and create it there and it runs from only there. I wantWindows 2000 Professional I have a bat file saved as cleanxp.bat that I have saved in E: and a shortcut to it on my desktop.
    When I double click on the icon on my desktop it opens the file in notepad. The right click context menu has no edit, open or print in it. The only way I can run this bat file is to go to the command prompt and create it there and it runs from only there. I want to be able to click on the desktop icon to run it. Can this be done.

    This is the bat file.
    C:
    cd "C:\Documents and settings\Administrator\Local settings\temp "
    del /q /s /f *.*
    cleanmgr /sagerun:99
    exit

    Your help would be appreciated.

    RDOC
     
    Last edited: 2003/01/21
    RDOC,
    #1
  2. 2003/01/21
    mflynn

    mflynn Inactive

    Joined:
    2002/08/14
    Messages:
    4,141
    Likes Received:
    9
    Rename it Cleanupxp.cmd

    Delete and recreate the shortcut!

    Mike
     
    Last edited: 2003/01/21

  3. to hide this advert.

  4. 2003/01/21
    RDOC

    RDOC Inactive Thread Starter

    Joined:
    2003/01/21
    Messages:
    3
    Likes Received:
    0
    Ok you were 100% correct that fixed it all. Can you tell me why the extension of .cmd is right and works but the extension .bat doesn't?
    RDOC
     
    RDOC,
    #3
  5. 2003/01/21
    mflynn

    mflynn Inactive

    Joined:
    2002/08/14
    Messages:
    4,141
    Likes Received:
    9
    Lol!

    Well first let me apologize for not welcoming you to the BBS. I didn't even notice as I was at office and busy.

    So! Welcome to the best, the Windows BBS!

    They are trying to get a step further from DOS. A dos batch will still run, in this case it was the pif of the shortcut that did not work.

    The CMD extension will give slightly better support and faster execution. So you are better of using this extension on 2k and XP.

    But inside it is plain old @echo off batch file.

    Mike

    EDIT
    PS Be carefull of copying win95 98 me shortcuts to a 2k or XP system. They should be recreated by the new OS.
     
    Last edited: 2003/01/21
  6. 2003/01/21
    RDOC

    RDOC Inactive Thread Starter

    Joined:
    2003/01/21
    Messages:
    3
    Likes Received:
    0
    Thank you. How can I correct the pif file for this batch file? I went crazy in the help file and I saw the extension pif but it didn't say anything else to help me. By the way thanks for the welcome.
    RDOC
     
    RDOC,
    #5
  7. 2003/01/21
    mflynn

    mflynn Inactive

    Joined:
    2002/08/14
    Messages:
    4,141
    Likes Received:
    9
    Ok!

    copy it back to cleanupxp.bat

    rt click desktop-new-shortcut-browse to the file and click ok.

    Mike
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.