|
Here's another way. Create a new text file, type cmd, save it as cmd.bat. Whenever you need the dos prompt just copy and paste this into the directory and click it.
|
|
|
|
|
such a stupid comment, what r u ? first grader or something ?
your solution requires us to copy cmd.bat to every folder in the harddrive ... seriously, go back to elementary school please!!!
|
|
|
|
|
so for xp it is
"c:\windows\system32\cmd.exe"
this is mention in other emails
but tried for better subject
|
|
|
|
|
... in mapped network drives
Start regedit and add the folowing key ..
User Key: [HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
Value Name: DisableUNCCheck
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = default, 1 = allow UNC)
|
|
|
|
|
Hello,
I just want to point out that there is a difference between C:\[windrive]\system32\cmd.exe and C:\[windrive]\system32\command.exe (or wherever they reside).
"command.exe" is a DOS (Disk Operating System). It has all the drawbacks of DOS (short names, low memory..).
"cmd.exe" is Command Prompt and that is something else. It is not an OS, just a console for the windows. It has long names, support for a few more commands, etc...
They are very much alike, but not quite.
Best regards,
navi
Why waste time learning when ignorance is instantaneous?
- Hobbes-
|
|
|
|
|
In the File Types dialog (Tools -> Folder Options)
Select File Folder
Click Advanced
Click New
Enter "Command Prompt" or something you like
In the "Application ..." text box enter cmd.exe /k cd /d %1
Click OK
DO NOT CLICK "Set Default" -- This will make a command prompt open when you double click a folder in Explorer ... I did this and it took hours to find all the references to it in the registry to fix!!!
The only issue with this method is that it makes the folders display in the command prompt in 8.3 format. As in c:\DOCUME~1\ALLUSE~1\Desktop. If anyone knows how to get around this please reply.
|
|
|
|
|
change %1 to "%L". Oh and you can't delete it once you set it so be careful to follow what he said
|
|
|
|
|
Hi,
Unfortunately, I set it wrong. How can I delete it or fix it?
Thanks
Daniel
|
|
|
|
|
Hi,
As did I, how do I change it?
Jeff
|
|
|
|
|
After some detective work, I found out how to delete/edit changes you make to the Folder/File Folder file type associations.
What I think is happening:
After a user edits the file type association ( "Easier Way for XP"), windows goes behind the scenes and edits the registry, essentially performing the operations that the original article "Starting a DOS prompt from Windows Explorer" describes. ADDITIONALLY, windows echoes the changes to another part of the registry.
How to fix it:
Unfortunately my fix requires editting of the registry, the gui would not cooperate.
You must make sure the settings you want in the registry (as described by the original article) are the same in both:
My Computer\HKEY_CLASSES_ROOT\Folder\shell\
AND
My Computer\HKEY_CLASSES_ROOT\Directory\shell\
A few tips to make things easier:
1) Take advantage of the Registry Editors Favorites Menu/Add to Favorites. I would bookmark both of the above locations as the first step of the repair process.
2) Windows does not like you to edit the registry settings at the same time as you are using the Explorer/Tools Menu/Folder Options/File Types dialog. Make sure you close one before opening the other.
3) If you need it, remember that the Registry Editor can "Export" a subtree of the registry, and "Import" it back in. The format of the Export file is human readable. I made use of this in order to copy a part of my "Folder" subtree into my "Directory" subtree. Take special care when doing this. You must edit the exported file and change the word "Folder" to the word "Directory" __only__ where it occurs within pathname (i.e. My Computer\HKEY_blah\Folder\shell\blah).
Good Luck!
Kandarp
|
|
|
|
|
How did you get rid of "Set Default" settings? I did NOT click Set Default but for some reason it got set. Any assistance would be great.
|
|
|
|
|
Check out my above reply "How to delete/edit erroneous file folder type associations". It may help with your problem.
Kandarp
|
|
|
|
|
This happened to me as well. Go to HLCR\Directory\Shell and set the (Default) value of the shell key to 0 and then "Open" will be the default.
|
|
|
|
|
OK, nice, but if you have .NET try this Program Files\Microsoft.NET\FrameworkSDK\Samples\Technologies\Interop\Applications\ShellCmd
|
|
|
|
|
My XP installed to C:\windows not C:\winnt.
As the system32 directory is always in the path why not just use
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\CmdPrompt\command]
@="cmd.exe"
|
|
|
|
|
Hi Daniel,
First off let me say GREAT name!!
I wish I would have seen this before I made a program that did this using COM (which can be used to go a bit further than your implementation). What I did is create a console program called "CmdExec", then went to "OLE View" and copied the interface of "ShellUtils" to a text file called "ShelUtil.idl". I then ran "C:\> MIDL ShelUtil.idl /h ShelUtil.h" which created the .h and .c files (which I added to my project). Then I did exactly what you said in the registry, but I put the path to the "CmdExec.exe". I then wrote a quick main() (shown below).
I can send you the project if you like..
It works the same as yours does , but I think this way let's you take it a bit further if you want (using COM).
There are other commands for the IExec interface you can also use (not to mention another interface).
Run(BSTR bstrFile,BSTR bstrVerb);
NewFolderHere(BSTR curFolderName,BSTR newFolderName);
ExecCommand(BSTR curFolderName,BSTR bstrCmd);
Here is the main() function...
int main()
{
//
// Intilize COM
HRESULT hr = CoInitialize(0);
//
// Use the SUCCEEDED macro and see if we can get a pointer
// to the interface
if(SUCCEEDED(hr))
{
//
// A pointer to the IExec interface
IExec *pIExec;
//
// Create the Instance.
hr = CoCreateInstance(CLSID_Exec,NULL,CLSCTX_INPROC_SERVER,IID_IExec,(void**) &pIExec);
if(SUCCEEDED(hr))
{
char szBuf[256];
//
// Get the curent directory...if it fails, put "C:\" in it.
if (GetCurrentDirectory(256, szBuf) == 0)
sprintf(szBuf,"C:\\");
//
// Put it into a BSTR
BSTR bstrDir = _bstr_t(szBuf);
//
// Now create the DOS window with the current directory
pIExec->DosFromHere(bstrDir);
//
// Release the poiter to the interface
pIExec->Release();
}
}
//
// Uninitialize COM
CoUninitialize();
//
// bye...
return 0;
}
Regards,
Dan
|
|
|
|
|
|
I want to do this same thing to a file. How to do that? I do not know the registry point for this.
Thanks in advance!
Niklas
|
|
|
|
|
Niklas79 wrote:
I want to do this same thing to a file. How to do that? I do not know the registry point for this.
Copy & Paste the below info in a file called doshere.inf then right click on it and pick Install... This was taken from Microsofts site and works, I use it myself.
;
; "Command Prompt Here" PowerToy
;
; Copyright 1996 Microsoft Corporation
;
[version]
signature="$CHICAGO$"
[DosHereInstall]
CopyFiles = DosHere.Files.Inf
AddReg = DosHere.Reg
[DefaultInstall]
CopyFiles = DosHere.Files.Inf
AddReg = DosHere.Reg
[DefaultInstall.ntx86]
CopyFiles = DosHere.Files.Inf
AddReg = DosHere.Reg.NT
[DefaultUnInstall]
DelFiles = DosHere.Files.Inf
DelReg = DosHere.Reg
[DefaultUnInstall.ntx86]
DelFiles = DosHere.Files.Inf
DelReg = DosHere.Reg.NT
[SourceDisksNames]
55="DOS Prompt Here","",1
[SourceDisksFiles]
DOSHERE.INF=55
[DestinationDirs]
DosHere.Files.Inf = 17
[DosHere.Files.Inf]
DOSHERE.INF
[DosHere.Reg]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%DosHereName%"
HKLM,%UDHERE%,UninstallString,,"%10%\rundll.exe setupx.dll,InstallHinfSection DefaultUninstall 132 %17%\DosHere.inf"
HKCR,Directory\Shell\DosHere,,,"%DosHereAccel%"
HKCR,Directory\Shell\DosHere\command,,,"%10%\command.com /k cd ""%1"""
HKCR,Drive\Shell\DosHere,,,"%DosHereAccel%"
HKCR,Drive\Shell\DosHere\command,,,"%10%\command.com /k cd ""%1"""
[DosHere.Reg.NT]
HKLM,%UDHERE%
HKLM,%UDHERE%,DisplayName,,"%DosHereName%"
HKLM,%UDHERE%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\DosHere.inf"
HKCR,Directory\Shell\DosHere,,,"%DosHereAccel%"
HKCR,Directory\Shell\DosHere\command,,,"%11%\cmd.exe /k cd ""%1"""
HKCR,Drive\Shell\DosHere,,,"%DosHereAccel%"
HKCR,Drive\Shell\DosHere\command,,,"%11%\cmd.exe /k cd ""%1"""
[Strings]
DosHereName="Command Prompt Here PowerToy"
DosHereAccel="Command &Prompt Here"
UDHERE="Software\Microsoft\Windows\CurrentVersion\Uninstall\DosHere"
|
|
|
|
|
Go to your explorer menu "tools->folder options->file type" and link "cmd.exe" in NT/2000 or "command.exe" 95/98/me to "file folder" or "folder" file type. You can actually add as many context menu commands as you want
|
|
|
|
|
Everyone, this is the way to do it. DO NOT BOTHER THE REGISTRY!!! Following the above suggestion regarding the 'FILE TYPE' option is very easy and very effective. My thanks to the author.
|
|
|
|
|
But you can not modify or delete them, right? At least I couldn't.
|
|
|
|
|
Ok. can someone tell me how to remove this seeting from folder options?
please.
|
|
|
|
|
Remove HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell
|
|
|
|
|
..or if you have the window open already displaying the folder you can just drag the folder to a dos window..path will be written for you but registry way is always better
|
|
|
|
|