Archive: .nsi Key?????


.nsi Key?????
.nsi files will open with NotePad where can I find that key in the register

In wich of these map and where

-HKEY_CLASSES_ROOT
-HKEY_CURRENT_USER
-HKEY_LOCAL_MACHINE
-HKEY_USER
-HKEY_CURRENT_CONFIG

??? I allready looked but I cant find it

But I did found HKEY_CLASSES_ROOT\.nsi

But there is nothing in there. I have opend it with NotePad and it was not usefull????


.nsi is linked to NSIS.Script


I found it :) ..... But still a question :(

I want to have change the key in this map

HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer \FileExts\.ogm\OpenWithList

The Key Old Key :

Windows Registry Editor Version 5.00

[HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ogm]
"Progid"="mplayerXP.OGMFile"

[HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ogm\OpenWithList]
"a"="wmplayer.exe"
"MRUList"="acdeb"
"b"="iexplorer.exe"
"c"="wmplayer.exe"
"d"="VirtualDubMod.exe"
"e"="VirtualDubMod.exe"
"f"="wmplayer.exe"

[HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ogm\OpenWithProgids]
"ogm_auto_file"=hex(0):
"Ogg File (*.ogg)"=hex(0):
"OptionsFile"=hex(0):
"mplayerXP.OGMFile"=hex(0):
"mplayercXP.OGMFile"=hex(0):



The Key I want :

Windows Registry Editor Version 5.00

[HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ogm]
"Progid"="mplayerXP.OGMFile"

[HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ogm\OpenWithList]
"a"="mplayercXP.exe"
"MRUList"="cadeb"
"b"="mplayercXP.exe"
"c"="mplayercXP.exe"
"d"="mplayercXP.exe"
"e"="mplayercXP.exe"

[HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ogm\OpenWithProgids]
"ogm_auto_file"=hex(0):
"Ogg File (*.ogg)"=hex(0):
"OptionsFile"=hex(0):
"mplayerXP.OGMFile"=hex(0):
"mplayercXP.OGMFile"=hex(0):


Could somebody tell me how to change the key
THANKS, VegetaSan


this is not where you want to change
what will open with explorer and such

This key
HKEY_USERS\S-1-5-21-1614895754-839522115-682003330-1003

Changes per every machine

You want a differn't registry key

That's not the key your looking to change

or rather should not be looking to change.

You want a differn't registry key :)
"You don't want a small Coke you want a Large Coke."

can you give us a mre detailed example of what your trying to accomplish ?
This would help us better to help you.


Oke, I want the key in this map

HKEY_USER\
S-1-5-21-1614895754-839522115-682003330-1003\a-S mpcXP\ogm.reg

I want to name the key "ogm.reg"

and I want to set a key in that map that contains register information to the .ogm extension to open with "mplayercXP.exe"
insted of "wmplayer.exe"


How Do I do that

Thanks, :)VegetaSan:)


you don't do it that way
you do it in the .exe
extention filed located in Hkey Classes Root
That's where the extentions exsist for the mapping of a type
of extention

so if i had say
.aif Extention and i needed it to open with media player

.aif
--[OpenWithList]
----|wmplayer.exe
--[OpenWithProgIds]
--->AIFFFile REG_NONE
--[PersistentHandler]
-->{098f2470-bae0-11cd-b579-08002b30bfeb}

or like this in the same registry area
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.ai]
"Content Type"="application/postscript"
@="PaintShopPro8.Image"

this makes the extention .ai open with PaintShopPro8

So write the section to the HKEY_CLASSES_ROOT area
and not the current user area

this way one type of extention can be opend by your installed application :)

but to get the current users infro from the registry and jump to the correct key at hand like the first proposed thing you asked about - as far as I know there is no complete way of Auto detecting the current ZONE
the special number of the current logged on user based in NSIS and windows
like $wininstall routine for installing directly to windows

as for the area that you were first writing to that area can also be um lets say Restricted and especially if the user is not administrator. and somtimes even if he or she is not Administrator

so writing to the top key is the safest bet of getting that extention installed and mapped to the program :)

I know how to do it in other programming languages
such as vb6 and C++ and others but the functionality as far as I know is not built into nsis as of yet.

I hope this helps ?
Mabey someone else can shed more light on this...

P.s. as for
"Could somebody tell me how to change the key"
writing back over the key changes it :)

Does this help ?
:igor:


But how do you insert a key with the nsis installer?

to HKEY_CLASSES_ROOT\.ogm

??


WriteRegStr HKCR ".irc\Shell\open\command" "" "mirc.exe"

Sets default key to mirc.exe
WriteRegStr HKCR ".irc\Shell\open\command" "BackupCommand" "Pirch.exe"

Sets the "BackupCommand" key to "Pirch.exe"

There are detailed instructions in the documentation as well as plenty of examples in the Examples directory too :)
There is also a function written which does this work for you.

I have checked the .ogm in HKEY_CLASSES_ROOT

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ogm\ShellEx\open\command]
@="mplayercXP.exe"
"C:\\Program Files\\a-S Media Player ClassicXP\\mplayercXP.exe"="mplayercXP.exe"


What is wrong with this?? :( It should be right!

If you see any errors in this piece of the Key please tell meI have checked the .ogm in HKEY_CLASSES_ROOT

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ogm\ShellEx\open\command]
@="mplayercXP.exe"
"C:\\Program Files\\a-S Media Player ClassicXP\\mplayercXP.exe"="mplayercXP.exe"


What is wrong with this?? :( It should be right!

If you see any errors in this piece of the Key please tell me


sorry I have pasted it two times !


ok I had to do some registry stuff with my installer
and I ran into a regitry portion of my install that I can show you as a Example and it works ;)

WriteRegStr HKLM "SOFTWARE\Apache Group" "" ""
WriteRegStr HKLM "SOFTWARE\Apache Group\Apache" "" ""
WriteRegStr HKLM "SOFTWARE\Apache Group\Apache\2.0.48" "" ""
WriteRegStr HKLM "SOFTWARE\Apache Group\Apache\2.0.48" "ServerRoot" "$INSTDIR\Apache Group\Apache2\"
WriteRegDWORD HKLM "SOFTWARE\Apache Group\Apache\2.0.48" "Shared" "1"

By writing the key it actually creates the key
I think this can be done Automagicly as well :weird:

that's nsis registry coding
not the .reg exported stuff:igor:

From the code your showing me is a Registry export file .reg
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ogm\ShellEx\open\command]
@="mplayercXP.exe"
"C:\\Program Files\\a-S Media Player ClassicXP\\mplayercXP.exe"="mplayercXP.exe"

show us the Nsis code

Let me know if this helps :)

Don't always take the answer as the final solution because there may be more then 1 solution :)
try looking at
AUFile in HKLM
Somtimes more things need to be done to solve the solution
so if we can't show you an example ,we try to lead you in the right direction hopefully.


Could you be more specified .......
A Kinda like this

WriteRegStr HKLM "SOFTWARE\YOUR GROEP NAME" "" ""

Thanks, VegetaSan


Oke I got that part, but now I want to insert a key to this map that contains register information to set .ogm files to open with "mplayercXP.exe"

How do I do that??

THX, VegetaSan