Sign in to follow this  
Followers 0
DoctorX

International Compatibility

15 posts in this topic

I released a program that installs a flight sim and various patches for it. Much to my dismay, most of the people who downloaded it were using non-english operating systems and were running into problems because of it. I would like to adapt the program to be internationally compatible, if possible.

Alot of the problems were caused due to the keyboard differences, for example: A Dutch user had my program fault because it should have sent the "y" key which apparently didn't jive on the Dutch keyboard layout. These problems I can fix by changing the Send()'s to ControlClick()'s (Right? Correct me if I'm wrong) but this is the part of the code that I am having trouble figuring out a way to fix:

If FileExists ($InstDir & "\F4DP\F4Patch.reg") Then
            Run ("regedit " & $InstDir & "\F4DP\F4Patch.reg")
                If @error = 1 Then
                    WinShieldOff ()
                    ErrorFunc ("Regedit.exe failed to run.", "VerThaw-Run")
                EndIf
            $waitforwin = ActWin ("Registry Editor", "Are you sure you want to add the information", 150)
                If $waitforwin = "0" Then
                    WinShieldOff ()
                    ErrorFunc ("Regedit.exe experienced an error while running.", "VerThaw-ActWin: ""Registry Editor"", ""Are you sure you want to add the information"" timed out")
                EndIf
            Send ("y")
            $waitforwin = WinWaitClose ("Registry Editor", "Are you sure you want to add the information", 150)
                If $waitforwin = "0" Then
                    WinShieldOff ()
                    ErrorFunc ("Regedit.exe experienced an error while running.", "VerThaw-WinWaitClose: ""Registry Editor"", ""Are you sure you want to add the information"" timed out")
                EndIf
            $waitforwin = ActWin ("Registry Editor", "has been successfully entered into the registry", 150)
                If $waitforwin = "0" Then
                    WinShieldOff ()
                    ErrorFunc ("Regedit.exe experienced an error while running.", "VerThaw-ActWin: ""Registry Editor"", ""has been successfully entered into the registry"" timed out")
                EndIf
            Send ("{ENTER}")
            $waitforwin = WinWaitClose ("Registry Editor", "has been successfully entered into the registry", 150)
                If $waitforwin = "0" Then
                    WinShieldOff ()
                    ErrorFunc ("Regedit.exe experienced an error while running.", "VerThaw-WinWaitClose: ""Registry Editor"", ""has been successfully entered into the registry"" timed out")
                EndIf
        EndIf

What this is doing is placing a registry value into the registry that was previously exported.

Why I'm concerned is since this is using regedit, the message boxes may appear in a different language. Is there any other way to do this, preferably without having the "would you like to add this value" message box appear?


-DRX

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

regedit isnt named "Registry Editor" on my (dutch) system.

and ppl that use dutch keyboard settings are nubs ;)

instead of using regedit, parse the files and use RegWrite from autoit.

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hmm does it work for you?

I don't see where the script gets $InstDir from? Is this just a part of the installation script? Because that would explain it!

Edit:

I found something interesting for you!

MSDN Regedit page

If you add the switch -s or /s to your regedit call, it does not show dialog boxes and you wouldn't have to deal with clicking boxes and buttons (avoids needing the different names for regestry editor, in german it's "registrierung-editor" ^^)

Hope that helps you

Felix N (tdlrali)

Edited by Felix N.

Share this post


Link to post
Share on other sites

Alright, thanks for the help!

BTW, that was only a small piece ot the code. The entire script is over 12,000 lines long.


-DRX

Share this post


Link to post
Share on other sites

Why I'm concerned is since this is using regedit, the message boxes may appear in a different language. Is there any other way to do this, preferably without having the "would you like to add this value" message box appear?

why are you using regedit? You could use RegWrite() and you won't have any language related problems.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

im guessing becouse he downloads standard .reg files.

He can easily convert the .reg files into RegWrite() calls...

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

B)

Ups, did not see that one ..... :o

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Yes, why I was trying to do it that way is because early on while the program is running it exports a few registry values which later need to be put back in.

I think parsing the values like wOuter suggested is the best way to go. Thanks again for all the help.


-DRX

Share this post


Link to post
Share on other sites

why are you using regedit? You could use RegWrite() and you won't have any language related problems.

Cheers

Kurt

I switched from using regedit to RegWrite and man what a difference, much better way to go.

Later

Share this post


Link to post
Share on other sites

Yes, why I was trying to do it that way is because early on while the program is running it exports a few registry values which later need to be put back in.

I think parsing the values like wOuter suggested is the best way to go. Thanks again for all the help.

In my opinion running RegEdit in silent mode would be a far easier alternative to parsing a .reg file:

RunWait('RegEdit /S "Path to Settings.reg"')
; Although it might be:
RunWait('RegEdit "Path to Settings.reg" /S')

Share this post


Link to post
Share on other sites

Is regedit always "regedit.exe" on all systems? wOuter mentioned that it is not called "Registry Editor" on his system, but is it still "regedit.exe"?

I just got back into this project, and using regedit in silent mode seems like it would be alot easier than parsing the values as long as the registry editor executable has the same name on all language systems.


-DRX

Share this post


Link to post
Share on other sites

Reg import is another alternative to Regedit. Is Reg.exe are international standard?

My CMenu app has a Reg2Au3 converter. Only Regedit4 files are usable as they are ANSI format. Do double check it's results. It should do well but never take anything for granted.

A couple of Reg2Au3 UDFs in Scripts'n'Scraps if you want to search for a converter.

Share this post


Link to post
Share on other sites

Is regedit always "regedit.exe" on all systems? wOuter mentioned that it is not called "Registry Editor" on his system, but is it still "regedit.exe"?

I would be very surprised if it did have a different filename. Just imagine all the extra work that would be involved in preparing Windows distributions if filenames of integral parts of the OS had to be changed for every language.

The ramifications of this would extend to development of any software to run on Windows. For an English piece of software to run on (e.g.) a German system it would need to be recompiled to call DLLs of German names...

Reg import is another alternative to Regedit. Is Reg.exe are international standard?

Reg isn't available by default on Windows 9x.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0