Skip to content
⌘ NSIS Forum Archive

Reg2Nsis and Cyrillic

3 posts

marcins#edited

Reg2Nsis and Cyrillic

I'm trying to write installer with NSIS 2. This installer needs to write values and keys for all users in HKEY_USERS.

So far with older installers I never had any problems.

I was doing it like this:
- exporting registry from working system to reg file
- converting reg file with Reg2Nsis to nsh file
- creating function registry_add with registry entries converted by Reg2Nsis
- execute this function with command ${EnumUsersReg} registry_add temp.key

This was working great. My registry_add looked like this:

WriteRegStr HKU "$0\Software\blabla\blabla\bla\bla\bla\prefs\blabla\/Connection" "" ""


but since I want to use Cyrillic, my registry keys converted by Reg2Nsis lookslike this:

WriteRegStr HKU "$0\Software\blabla\bla\bla\bla\bl\;;\/!!$@!<w@f$\"$!%>@@1$\"$s%^!!g$\"$o%<w[<$\"%c%;@@y$\"%s%[@!g$\"$8%>g@6$\"$!%;w@w$\"%)%;@@7$\"$`%<@!7!$!!<w!7\/!!$!!<w@f$\"%!%>g['$\"$`%>@[#!#!%>w@7$\"$!%>@@w!$s!:!!7!$s=" "0" "separator;"
WriteRegStr HKU "$0\Software\blabla\bla\bla\bla\bl\;;\/!!$@!<w@f$\"$!%>@@1$\"$s%^!!g$\"$o%<w[<$\"%c%;@@y$\"%s%[@!g$\"$0%>g@6$\"$!%;w@w$\"%)%;@@7$\"$`%<@!7!$!!<w!7\/!!$!!<w@f$\"%!%>g['$\"$`%>@[#!#!%>w@7$\"$!%>@@w!$s!:!!7!$s=" "0" "separator;"


As you can see I have $0 and $8 inside string. NSIS is using those as variables and for example $0 is being replaced with key from HKEY_USERS. I was trying to replace $0 with $$0 but it doesn't work either.

I'm trying to fix it from three days but with no luck... :-(

Is there any other way to do this? For example create reg file and somehow add it to all HKEY_USERS?