Archive: just want to add to registry not install a program


just want to add to registry not install a program
i have been struggling with trying to create a simple interface that will just add / delete registry keys to personalise a program but i am not very computery and although i have managed to use the HM NIS edit wizard to make myself a ini file that using the C:\Program Files\NSIS\Examples\InstallOptions testlink.exe ends up looking similar to what i want to do i am not sure how to actually make it up properly so it works.

i do not need the install button at the bottom of the page but i dont know how to get rid of it.

i would also like to use the modern ui but i am not sure how to combine them together, and anyway that can wait until i understand how to make it work properly how it is at the moment.

this is the ini file (testlink.ini)

; Ini file generated by the HM NIS Edit IO designer.
[Settings]
NumFields=5

[Field 1]
Type=Button
Text=exit
State=quit
Left=214
Right=264
Top=108
Bottom=123

[Field 2]
Type=Button
Text=website
State=http://www.awebsite.com
Left=24
Right=74
Top=105
Bottom=121

[Field 3]
Type=Link
Text=add something to the registry
State=WriteRegStr HKCU ""Software\My Company\My Software" "String Value" "dead beef"..WriteRegStr HKCU "Software\My Company\My Software" "String Value" "dead beef"
TxtColor=0xFF00FF
Left=98
Right=211
Top=12
Bottom=30

[Field 4]
Type=Link
Text=add something to the registry and something else
State=WriteRegStr HKCU ""Software\My Company\My Software" "String Value" "dead beef"..WriteRegStr HKCU "Software\My Company\My Software" "String Value" "dead beef"
TxtColor=0xFF00FF
Left=78
Right=240
Top=44
Bottom=62

[Field 5]
Type=Link
Text=remove something from the registry
State=DeleteRegKey HKCU "Software\My Company\My Software"
TxtColor=0x0000FF
Left=94
Right=211
Top=71
Bottom=89



am i doing it all completely wrong or what? please dont get too complicated on me my head is already about to explode as it is.


As NSIS was not made for simple applications, it's bound to be complicated. It would be much easier to use Visual Basic to create a program to do this.

In NSIS though, you need to firstly use Resource Hacker to remove the Next button (IDD 105). You can't delete the button though, only hide it (otherwise makensis won't let you compile).

To make links actually do something, you need the Flags=NOTIFY setting. You then in the page's Leave function need to read from Settings->State in the INI file with ReadINIStr to determine which link field number was clicked on.

Don't bother with MUI here. You can simply use XPStyle on instead.

-Stu