Scripts Thread, What does this do? in Coding and Web Development; Not sure if posting in the right spot for this but ant help would be welcomed.
Came across this as ...
-
13th June 2007, 10:06 AM #1 What does this do?
Not sure if posting in the right spot for this but ant help would be welcomed.
Came across this as a batch file but don't know what it does, anybody have any ideas?
@ECHO OFF
BREAK OFF
Title My Own cmd
color 0a %CMD%
cls echo
goto cmd
:cmd
set /P cmd=command:
-
-
IDG Tech News
-
13th June 2007, 10:13 AM #2 Re: What does this do?
i would guess it creates a command (dos) prompt with your own title (my own cmd) and sets a colour for it.
but then its been years since i looked at batch files properly
-
-
13th June 2007, 10:14 AM #3
- Rep Power
- 0
-
-
13th June 2007, 10:32 AM #4 Re: What does this do?
Running it twice in a row, it appears to be a little batch file for "setting the default console foreground and background colours"
-
-
13th June 2007, 10:32 AM #5 Re: What does this do?
Someone's trying to be clever, but failed.
It sets the window title to 'My Own cmd'
It sets the text foreground colour to a horrid green.
Clears the screen
prompts the user with 'command:' and waits for them to enter something, then sets the %cmd% variable to the input value.
Then exits, achieving nothing.
Here's a fixed script:
Code:
@ECHO OFF
BREAK OFF
Title My Own cmd
color 0a
cls
:cmd
set /P cmd=command:
if %cmd%==Q exit
if %cmd%==q exit
start %cmd%
goto cmd
I've tidied up the coding errors and added a loop so you can invoke multiple programs or quit (input Q).
-
-
13th June 2007, 10:48 AM #6 Re: What does this do?

Originally Posted by
Geoff Someone's trying to be clever, but failed.
-
-
13th June 2007, 10:52 AM #7 Re: What does this do?
Are you going to charge £8 for that script Geoff ?
[ See - http://www.edugeek.net/index.php?nam...ighlight=netsh ]
-
-
13th June 2007, 11:39 AM #8 Re: What does this do?
Thanks. Got to work out how to stop the kids from doing this now!
-
-
13th June 2007, 12:18 PM #9 Re: What does this do?
Use a file restriction policy.
-
SHARE:
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules