|
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
|
|
|
|
|
I agree with Tom Trottier - don't hack registry if it is not MUST.
In w2k the send-to shortcut works:
1. Target: c:\winnt\system32\cmd.exe /k doshere.bat
2. Contents of doshere.bat:
@echo off
%~d1
cd %1
Parameter %1 contains the full path of selected directory.
The new features of batch parameters in w2k make a trick.
Regards,
Gennady
|
|
|
|
|
Thanks for the excellent tip. It is one I have always wanted! Typing in "cd c:\documents & settings\paulw\local settings\digireedoo $35834597843\" is never fun!
regards,
Paul Watson
Cape Town, South Africa
e: paulmwatson@email.com
w: vergen.org
|
|
|
|
|
I use several machines from other programmers and having to edit registry entries is boring...
Open a command prompt.
Type cd and space ("cd ", without quotes)
Drag a folder from explorer to command prompt
press enter
PS: It works with files too...
Tested on NT & W2k
|
|
|
|
|
That's smart.
Except when you are on C:\ (the default), and try to go at F:\Foo\Bar...
And it costs a lot of manipulations, compared to a simple right-click.
And as indicated in another thread, MS gives an small .inf file that allows quick install/uninstall, so why don't use it? Except if you don't have it at hand, of course!
But this trick is still good to mention again, it works with other commands as well, like dir, del, nmake, etc.
And it works fine with Win98 too.
Regards.
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
|
|
|
|
|
Or just add a shortcut to COMMAND or CMD to your send-to folder.
Blank out the starting directory.
Real Programmers dont edit registries.
Modeller. APL. Terse.
|
|
|
|
|
That doesn't work! It goes off to some fixed folder everytime
|
|
|
|
|
You do have to add "/K CD" to the Target in the properties of the shortcut (or program) Mine reads
C:\WIN2K\system32\CMD.EXE /k CD
The Send-to appends the directory name.
Works in Windows 2000.
tOM
Modeller. APL. Terse.
|
|
|
|
|