how to set an app to be opened by default trough a reg key

Questions or comments on the switchless installers? Want to create a new one? Talk about it here.
Post Reply
User avatar
neuropass
Posts: 123
Joined: Thu Oct 02, 2008 5:05 pm

how to set an app to be opened by default trough a reg key

Post by neuropass » Sat Oct 25, 2008 2:02 pm

hey guys... please does anybody know how to set trough a reg key how to open a .NFO with jane by default?

i found this but it doesn't work

Any ideas guys?



Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.diz]
"Application"="JANE.EXE"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.diz\OpenWithList]
"a"="JANE.EXE"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.diz\OpenWithProgids]
"diz_auto_file"=hex(0):
"ft000002"=hex(0):

;NFO
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo]
"Application"="JANE.EXE"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\OpenWithList]
"a"="JANE.EXE"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\OpenWithProgids]
"nfo_auto_file"=hex(0):
"ft000002"=hex(0):

User avatar
crashfly
Posts: 789
Joined: Thu Mar 13, 2008 11:39 pm
Location: Arkansas, USA

Post by crashfly » Sun Oct 26, 2008 3:17 am

Unless your program is *actually* in the windows search path, the above will probably not work. A workaround to the problem is either specify the full path of the program, or verify that the program is in the windows path.

Note: Easy test is to open up a command prompt and try to run the said program from an arbitrary directory.
A mind is like a parachute, it only functions when it is open.
--Anonymous

How to Ask Questions the Smart Way

User avatar
neuropass
Posts: 123
Joined: Thu Oct 02, 2008 5:05 pm

Post by neuropass » Sun Oct 26, 2008 10:37 am

cool..thanks i didn't realize it... :( that's why...

but anyway, i tried with command prompt as you suggested, but i had to results... first, if i put the real path of the program, which is:

Code: Select all

C:\Program Files\jane\jane.exe
, it doesn't work.. it says " C: program" is not recognize as an internal or external command operable or batch file"

then if i put a folder in C called for example inst and inside it the exe... it works. so this is the path

Code: Select all

C:\inst\jane.exe

but it's useless because the app jane is in the program files directory...

So how is possible that i can't open that folder... how can i fix it to work as a default nfo opener..? thanks, guys...

User avatar
crashfly
Posts: 789
Joined: Thu Mar 13, 2008 11:39 pm
Location: Arkansas, USA

Post by crashfly » Sun Oct 26, 2008 1:09 pm

The problem in that instance would be long file names. You must account for that by putting quotes around your path (that will end up in the registry).

I am pretty sure that using "forced" quotes will work or you might even use single quotes inside of double quotes. It will look like this:
"Application"="\"C:\Program Files\JANE.EXE\""
or
"Application"="'C:\Program Files\JANE.EXE'"

I am sure there are a few other ways of accomplishing that too, but that should get you started.
A mind is like a parachute, it only functions when it is open.
--Anonymous

How to Ask Questions the Smart Way

User avatar
neuropass
Posts: 123
Joined: Thu Oct 02, 2008 5:05 pm

Post by neuropass » Sun Oct 26, 2008 1:45 pm

nothing happened... :( :(
i the 2 keys... but nothing...

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.diz]
"Application"="C:\Program Files\JANE.EXE\"" 

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.diz\OpenWithList]
"a"="JANE.EXE"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.diz\OpenWithProgids]
"diz_auto_file"=hex(0):
"ft000002"=hex(0):

;NFO
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo]
"Application"="C:\Program Files\JANE.EXE\"" 

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\OpenWithList]
"a"="JANE.EXE"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.nfo\OpenWithProgids]
"nfo_auto_file"=hex(0):
"ft000002"=hex(0):
is it possible that all the reg entry i found is wrong?


because in jane there an option to set it as default by one click, and it apply it right away... you can see the nfo with the jane image... and you can disassociate it too right away... how can i find out how that option works? like with resource tuner or something..?

what do you think?

User avatar
Kelsenellenelvian
Moderator
Posts: 4383
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Post by Kelsenellenelvian » Sun Oct 26, 2008 2:11 pm

Here is the reg I get and tested to work fine.

Please Note I put the JANE prog in a JANE dir of its own in Program Files...

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nfo.diz.file]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.diz] 
@=".nfo.diz.file" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nfo.diz.file] 
@=".nfo.diz.file" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nfo.diz.file\DefaultIcon] 
@="C:\\Program Files\\JANE\\jane.exe,0" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nfo.diz.file\Shell\Open] 
@="&Open" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nfo.diz.file\Shell\Open\Command] 
@="\"C:\\Program Files\\JANE\\jane.exe\" \"%1\"" 

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.nfo] 
@="MSInfoFile" 
@=".nfo.diz.file" 

User avatar
neuropass
Posts: 123
Joined: Thu Oct 02, 2008 5:05 pm

Post by neuropass » Sun Oct 26, 2008 2:16 pm

ohhhhh man!!!!!!!!!!!!!!!!!!! thanks a million!!!!!!!!!!!!!!!!!!!!!!! it's working!!!!!!!!! yahoo!!!!!!!!!!
thanks again ,cool!!!!! :lol: :lol: 8) 8) 8)

User avatar
Kelsenellenelvian
Moderator
Posts: 4383
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Post by Kelsenellenelvian » Sun Oct 26, 2008 2:20 pm

:D Very good.

Glad to help.

User avatar
crashfly
Posts: 789
Joined: Thu Mar 13, 2008 11:39 pm
Location: Arkansas, USA

Post by crashfly » Sun Oct 26, 2008 11:41 pm

My bad. I forgot about the backslashes in registry files. Meh ... you live and you learn (or remember). lol
A mind is like a parachute, it only functions when it is open.
--Anonymous

How to Ask Questions the Smart Way

Post Reply