We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

cmd.exe - typing exit

For all you command prompt guru's, who types exit? Who just closes the window? I see exit typed in CBT Nuggets and wondered what the point was. To cleanly close and flush buffers I guess?
«1

Comments

  • RobTang
    RobTang Posts: 1,064 Forumite
    its for regular batch or powershell scripting, if you want to terminate the current execution of the script file.
  • david78
    david78 Posts: 1,654 Forumite
    I type exit.
  • kwikbreaks
    kwikbreaks Posts: 9,187 Forumite
    and I don't. It's completely irrelevant.

    Oh no!! Hold on!! My other machine just caught fire when I only closed the command box instead of typing exit!!! Oh woe thrice woe.
  • mr_fishbulb
    mr_fishbulb Posts: 5,224 Forumite
    Part of the Furniture Combo Breaker
    I'm polite and say bye to my ftp prompt.

    For my nslookup I have to exit.

    My telnet session on the other hand, I just tell to feck off.
  • RobTang wrote: »
    its for regular batch or powershell scripting, if you want to terminate the current execution of the script file.
    But what about the times when people use it to close a simple cmd.exe window? Any point there? As a side note powershell looks to be the way Mircosoft are going. Something to learn sharpish.
    kwikbreaks wrote: »
    and I don't. It's completely irrelevant.

    Oh no!! Hold on!! My other machine just caught fire when I only closed the command box instead of typing exit!!! Oh woe thrice woe.
    I hope it wasn't a production DC!
    I'm polite and say bye to my ftp prompt.

    For my nslookup I have to exit.

    My telnet session on the other hand, I just tell to feck off.
    Like the manners.
  • I'm out of here, exit.
  • RobTang
    RobTang Posts: 1,064 Forumite
    But what about the times when people use it to close a simple cmd.exe window?.

    Id be dead surprised if both exit and the close button didn't share a common codebase.

    IE I reckon the close button just kills the current process and calls exit itself OR both call a shared routine to close the current shell.



    ...Exit
  • John_Gray
    John_Gray Posts: 5,845 Forumite
    Part of the Furniture 1,000 Posts Name Dropper Photogenic
    If you're that keen on finding out what happens when you close a Command Prompt window by different methods, you can spend many happy hours looking at the results from Mike Russinovich's ProcMon (Process Monitor)...
  • esuhl
    esuhl Posts: 9,409 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    I just hit CTRL+D and wonder why the window hasn't closed... ;-)
  • johnsm
    johnsm Posts: 27 Forumite
    Part of the Furniture 10 Posts Combo Breaker
    If you're already with your hands over the keyboard it might be slightly quicker to type exit or you might just prefer to do that.

    The command is primarily for terminating a script.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 352.3K Banking & Borrowing
  • 253.6K Reduce Debt & Boost Income
  • 454.3K Spending & Discounts
  • 245.3K Work, Benefits & Business
  • 601.1K Mortgages, Homes & Bills
  • 177.5K Life & Family
  • 259.2K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.