Command Prompt

  • Thread starter Thread starter Dennis Allen
  • Start date Start date
D

Dennis Allen

Hi. Couple of questions. I'd like to create a couple of desktop
shortcut icons of start->accessories->command prompt. One icon I'd like
to start up in the command prompt, but invoke a batch file first. The
other icon I'd like to drag folders to it to start up the command prompt
in that folder. Is either possible? If so, how? Any advice would be
greatly appreciated...Dennis
 
Hi. Couple of questions. I'd like to create a couple of
desktop
shortcut icons of start->accessories->command prompt. One
icon I'd like
to start up in the command prompt, but invoke a batch file
first. The
other icon I'd like to drag folders to it to start up the
command prompt
in that folder. Is either possible? If so, how? Any advice
would be
greatly appreciated...Dennis

I am answering the question "The other icon I’d like to drag folders
to it to start up the command prompt in that folder. Is either
possible? If so, how?" as I am unsure with what you wish to achive
with the other question. The answer is showen in a step by step
sequence. It seems quite imposible to achive what you wanted with
short cuts, it is how ever posible with a contextual menu, this took
me 30 mins to work out. Step by step sequance to setting up contectual
menu:

1. Open Explorer
2. Open Folder Options (Tools > Folder Options)
3. Select the "File types" tab
4. Find and selecte the file type "Folder" (This is NOT the same as
"File Folder")
5. Click Advanced
6. Click "New..."
7. In the "Action:" field enter what ever you want. I found "Open
Command Prompt Here" works well.
8. In that "Application used to perform action:" field put Exacly this
(altering the path to cmd.exe if nessasery)
""C:WINDOWSsystem32cmd.exe" /K CD "%1"" (With out the "" obviusly,
so it would become "C:WINDOWSsystem32cmd.exe" /K CD "%1")
9. Click ok
10. Click ok again
11. Click OK once more
12. Right Click any folder and click "Open Command Prompt Here" (or
what ever you may have typed).
13. Hay presto, cmd opens at the location of your choice!
 
Dennis said:
Hi. Couple of questions. I'd like to create a couple of
desktop shortcut icons of start->accessories->command
prompt. One icon I'd like to start up in the command
prompt, but invoke a batch file first. The other icon I'd
like to drag folders to it to start up the command prompt in
that folder. Is either possible? If so, how? Any advice
would be greatly appreciated...Dennis

Like Sparda, I have no idea what you mean by "I'd like to start
up in the command prompt, but invoke a batch file first".
You're going to have to provide some more details is you want
help with that one.

For your second scenario, you might want to try the following.
It's an easier way of achieving the same results that Spard's
solution provides.

Open Command Window Here
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

Sixth item down in the right hand column.

Nepatsfan
 
Like Sparda, I have no idea what you mean by "I'd like to
start
up in the command prompt, but invoke a batch file first".
You're going to have to provide some more details is you want
help with that one.

For your second scenario, you might want to try the following.

It's an easier way of achieving the same results that Spard's
solution provides.

Open Command Window Here
http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

Sixth item down in the right hand column.

Nepatsfan

But my way is better, becasue it dosnt involve downloading untrused
applications that are potntialy dangers. Plus Microsofts "easy way"
probably dose some thing else that it dosnt tell you about, like run
on start up with out telling you.
 
Sparda said:
But my way is better, becasue it dosnt involve downloading
untrused applications that are potntialy dangers. Plus
Microsofts "easy way" probably dose some thing else that it
dosnt tell you about, like run on start up with out telling
you.

--

I'll pass on getting into a debate about downloading
applications from Microsoft. You're free to believe what you
want. I consider them to be a very trustworthy source. I've
been using their PowerToys since Windows 95. None of them have
behaved in a way I didn't expect.

As for your way being better, well, that depends. If the OP
tries to follow your procedure he's going to get an error
message that says "The specified program could not be found.
Make sure the file name and path are correct." That's because
the web interface you're posting from somehow stripped out all
the backslashes from C:\WINDOWS\system32\cmd.exe" /K CD "%1.
Anyone viewing your post with a newsreader such as Mozilla
Thunderbird or Outlook Express sees the following:

C:WINDOWSsystem32cmd.exe" /K CD "%1

Take a look at these two sites to see what I'm talking about:

Google Groups
http://tinyurl.com/drofv

Discussions in Windows XP Configuration Mgmt
http://support.microsoft.com/newsgr...lic.windowsxp.configuration_manage&sloc=en-us

Or enter the following in the Run box and look for this thread:
news://msnews.microsoft.com/microsoft.public.windowsxp.configuration_manage

Overlooking that issue, I think it's a much safer approach to
provide a user whose skill level is unknown to me with a
packaged application from a well known and well respected
source. Giving them a complex set of instructions increases the
chances that they will make a mistake which could have
unintended and possibly disastrous consequences.

Next, if someone installs the Microsoft application and is
unhappy with it they can uninstall it quite easily from within
Add/Remove programs. If they do as you suggest and they want to
remove that feature they've got to search the registry, find
the right key and delete it. What happens if they delete the
wrong key?

Finally, it was never my intention to question your solution. I
know it works (as long as you get the backslashes in the right
place). All I wanted to point out was that there's a simpler
approach.

Nepatsfan
 
Any time I try to use the cmd.exe window, it says:

"the command prompt has been disabled by your administrator. Press any key
to continue.... "

and it closes.

I am the the system admin., so how do I enable the cmd.exe function?
 
BgFOOT323 said:
Any time I try to use the cmd.exe window, it says:

"the command prompt has been disabled by your administrator.
Press any key to continue.... "

and it closes.

I am the the system admin., so how do I enable the cmd.exe
function?

Either someone changed the registry or enabled a group policy.
If no action was taken by you or another admin, you might want
to start looking at some sort of virus/trojan as the cause.

You might want to look here:

Message: "The command prompt has been disabled by your
administrator"
http://windowsxp.mvps.org/disablecmd.htm

Good luck

Nepatsfan
 
Thanks for the reply. Appreciate it...Dennis

Sparda said:
I am answering the question "The other icon Iâ?Td like to drag folders
to it to start up the command prompt in that folder. Is either
possible? If so, how?" as I am unsure with what you wish to achive
with the other question. The answer is showen in a step by step
sequence. It seems quite imposible to achive what you wanted with
short cuts, it is how ever posible with a contextual menu, this took
me 30 mins to work out. Step by step sequance to setting up contectual
menu:

1. Open Explorer
2. Open Folder Options (Tools > Folder Options)
3. Select the "File types" tab
4. Find and selecte the file type "Folder" (This is NOT the same as
"File Folder")
5. Click Advanced
6. Click "New..."
7. In the "Action:" field enter what ever you want. I found "Open
Command Prompt Here" works well.
8. In that "Application used to perform action:" field put Exacly this
(altering the path to cmd.exe if nessasery)
""C:WINDOWSsystem32cmd.exe" /K CD "%1"" (With out the "" obviusly,
so it would become "C:WINDOWSsystem32cmd.exe" /K CD "%1")
9. Click ok
10. Click ok again
11. Click OK once more
12. Right Click any folder and click "Open Command Prompt Here" (or
what ever you may have typed).
13. Hay presto, cmd opens at the location of your choice!

--
Posted using the http://www.windowsforumz.com interface, at author's
request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.windowsforumz.com/Configuration-Manage-Command-Prompt-ftopict429450.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.windowsforumz.com/eform.php?p=1440201
 
Thanks for the response. Got powertoys, works great!

As for my first question, if you create a shortcut of the command
prompt, with a start:

%SystemRoot%\system32\cmd.exe ls.bat

I'm at the command prompt, but ls.bat didn't executed. I want to run
ls.bat, but then remain at the command prompt.
 
Try using the /k switch in your shortcut like this:

%SystemRoot%\system32\cmd.exe /k ls.bat

Keep in mind that in this example ls.bat would need to be
located in the C:\Windows or C:\Windows\System32 folders. If
it's in a different location you'd have to indicate the correct
path to the file:

%SystemRoot%\system32\cmd.exe /k (Path to)\ls.bat

Nepatsfan
 
Ah. Thanks...Dennis

Nepatsfan said:
Try using the /k switch in your shortcut like this:

%SystemRoot%\system32\cmd.exe /k ls.bat

Keep in mind that in this example ls.bat would need to be located in
the C:\Windows or C:\Windows\System32 folders. If it's in a different
location you'd have to indicate the correct path to the file:

%SystemRoot%\system32\cmd.exe /k (Path to)\ls.bat

Nepatsfan
 
Thanks for the response. Got powertoys, works great!

As for my first question, if you create a shortcut of the
command
prompt, with a start:

%SystemRoot%system32cmd.exe ls.bat

I'm at the command prompt, but ls.bat didn't executed. I want
to run
ls.bat, but then remain at the command prompt.

i tink the eastist way to to put "cmd" at the end of your batch file.
 
Back
Top