Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Ok, so I have been reading and googling this for a while now and I can't understand what is going wrong. I am trying to create a .int file extension in my registry so that I can add the ShellNew key to it and thus it should allow me to do the simple right click > new > file method of file creation. So I went to HKEY_CLASSES_ROOT and I created a key called .int.
I then created a key called intfile with a default icon and set its (Default) string to "Localization File". Then in my .int key I set the (Default) intfile and created Content Type which i set to plain/text. Then I created a new key called ShellNew and in that key I set FileName to the path in WINDOWS/ShellNew where my default .int file was. However, when I right click and go to new it does not show New Localization File. Am I missing a registry entry somewhere? Any help will be greatly appreciated, I can't figure out why this isn't working as I have added ShellNew to many keys before and had it always worked flawlessly. This is my first time creating a completely new file extension but I have read other file extensions that exist and can't see why it isn't working. Ty again in advance.

Edit: Clarification of what I have set up exactly.

intfile:
     (Default) REG_SZ "Localization File"
intfile>shell>open>command:
     (Default) REG_SZ "C:\Program Files\Notepad++\notepad++.exe"
.int: 
     (Default) REG_SZ "intfile"
     ContentType REG_SZ "plain/text"
     Percieved Type REG_SZ "text"
.int>ShellNew:
     (Default) REG_SZ "null"
     FileName REG_SZ "C:\WINDOWS\ShellNew\New Int.int"
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

That's cause you didn't register your file type correctly. Well, technically, you didn't register your "application" correct.

http://msdn.microsoft.com/en-us/library/cc144148(v=vs.85).aspx#fa_register_type\

You registered .int correctly. .int says to call intfile. intfile however is where you put in the application that handles the file! So Shellex goes looking into intfile and all it finds is a string in the default field. So the operation fails.

Since you want string there, you have to supply the Shell with a default verb to execute. Under the intfile create shell\open\command. Enter the full path to your application, for example, "%ProgramFiles%\Notepad++\Notepad++.exe" "%1".

FileName is the Full path to the file you want to make a copy, so you need "%windir% and not WINDOWS.

Edit I can't believe I'm condoning this method. . .

But I don't know of any way to add this without writing a program. . .

Hacktastic

edit2:

Ok here we go.

Key .int has Default(SZ) = intfile and Context Type(SZ) = plain.text. Under Key .int, you'll have subkey Shellnew. The default should be empty. Make a new empty string (Reg_SZ) and for the value put in the filename: `C:\windows\ShellNew\NewLocalization File'.

Under intfile make the default New Localization File.

Note the lack of double quotes. Now intfile needs the following subkeys: shell, make it's Default = open. Next, make subkey open under shell.

Now make subkey command under open.

Put the full path of the program under the string with quotes. ie "c:\Program Files (x86)\Notepad++\notepad++.exe" "%1". Note there are double quotes.

Edit:3

So it looks like the OP ran into an unknown issue and solved it this way.

Hrm ok figured it out! You were right mostly, and I was right a little. The problem was I had opened the file once and set the default program to notepad++ in the pop up dialogue. This created a key called int_auto_file. I went through the registry, very time consuming, and deleted all references to the .int extension. After that I rebuilt them and now it works perfectly.

share|improve this answer
    
I made the changes and yet it still isn't showing up in the right click menu. It could be because the Default Regedit makes is a REG_SZ and to do the %ProgramFiles% needs a REG_EXPAND_SZ type, but I don't know how to edit the type and it won't let me delete the (Default), or even rename it. Thanks for the reply :) –  Barrett Jul 11 '11 at 5:02
    
You can use Reg_SZ. You'll need to just put it in quotes. Just like I typed it. –  surfasb Jul 11 '11 at 6:33
    
Ok cool thank you again. I'll do that now. –  Barrett Jul 11 '11 at 6:43
    
Humm, you are right. You can't change that to an expandable string type. Gotta hack it and put it in as a string. –  surfasb Jul 11 '11 at 7:05
    
I tried it both ways in open and neither worked. I'm pretty confused now lol –  Barrett Jul 11 '11 at 9:40
show 11 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.