- NSIS Discussion
- Program files directory differs with the different windows languages.
Archive: Program files directory differs with the different windows languages.
insolit
21st July 2003 20:17 UTC
Program files directory differs with the different windows languages.
I'd like to know if i can make the installer to detect automatically the program files directory, depending on the operative system language.
For example for portuguese versions of windows the program files directory is "programas".
I have the installer set to have the default installation folder, into "program files", but i'd like that the installer could automatically detect the operative system and the correspondent program files folder.
Hope i've made myself clear.
Hope somebody can help me out.
Gunny2k2
21st July 2003 20:26 UTC
InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
$PROGRAMFILES = means it whould autodect windows program files
${MUI_PRODUCT} = means it would make a dir the name of the installer
insolit
21st July 2003 21:06 UTC
that's exactly what i have but there's having a problem with portuguese operative systems.
Afrow UK
21st July 2003 21:26 UTC
If the directory paths have strange characters in them, then you will get problems straight off.
This is probably another issue which needs to be fixed.
Can you please tell us what the default Program Files path is for Portuguese systems?
-Stu
insolit
21st July 2003 22:15 UTC
I believe there are no strange caracters, anyway the default path is "programas".
By the way here is the installer code i'm using:
[edited by kichik]attach large scripts. attached below :down:[/edit]
Could you tell me if you can notice any problems with these lines?
One of the problems that occurs is that the ac3filter is not correctly installed at the first time installation, i've to run the program twice to get ac3filter instalation program running.
Another problem is that when people run this installer with windows portuguese operative system, besides it is not correctly detecting the program files instalation folder default, if they don't change manually the name of the folder "program files" to "programas", the files won't even get to be registered or installed.
I could really use some help here.
Thanks in advance!
Joel
21st July 2003 22:38 UTC
Hi dude:
attach large scripts, please :) ...
$PROGRAMFILES is a runtime variable...
depending of the end-user OS language I'll be the
path for "Program files"
For example:
in spanish is :"C:\Archivos de programa\"
You can see it yours in this Registry root:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
[ProgramFilesDir]
[ProgramFilesPath]
kichik
22nd July 2003 08:36 UTC
Open regedit, go to the key Lobo Lunar posted, take a screen shot and attach it here. Also try the latest CVS version, it has an additional check for weird cases.
insolit
22nd July 2003 13:17 UTC
First of all thanks to all by the great support.
Kichik i just installed the lateste CVS and nothing strange is detected in the script.
I have no problems in the installation of my installer, because i have windows english version, besides the fact the ac3filter is not installed in the first installation. In a first installation, the file ac3filter_0_69b.exe, is copied to the specified folder but not ran.
But I got a printscreen from someone who had problems, because he has portuguese windows version:
kichik
22nd July 2003 13:22 UTC
His registry seems OK, nothing funky. Are you sure what he sees is not an old value that NSIS got using InstallDirRegKey? Trying sending him an installer that just prints $PROGRAMFILES and doesn't use InstallDir or InstallDirRegKey. If that doesn't get the right value for him, I'd like to talk to him in person.
BTW, I have removed the screen shot from your post because it contains the product id. I should have mentioned that there might be sensitive information in there, I'm sorry.
insolit
22nd July 2003 13:51 UTC
Ok, thnks a lot for removing it, i did not pay attention to that.
This problem occurred to everyone that have run my installer and have windows xp pro portuguese.
Here's a printscreen of what happens:
http://pwp.netcabo.pt/matroska/problem2.jpg
http://pwp.netcabo.pt/matroska/problem1.jpg
kichik
22nd July 2003 14:20 UTC
Does it work if you specify a full path for RegDLL ($INSTDIR\dllname.dll)? Does it work if you add "Sleep 1000" between File and RegDLL? Are the files even extracted to the right place? Does the installer using latet CVS version solve any of these for them?
insolit
23rd July 2003 00:13 UTC
Kichik thnks a lot.
Everything works just great now.
To complete the installer i'd like to add an uninstallation to the ac3filter.
But the problem is how can i put the uninstaller of my installer to find the directory where the ac3filter independent installer, installed the program.
Afrow UK
23rd July 2003 00:25 UTC
You could use the Search for file function on the NSIS Archive to search for the specific ac3filter file?
-Stu
kichik
23rd July 2003 13:03 UTC
insolit, which one solved it?
insolit
23rd July 2003 22:21 UTC
All problems were solved.
I have got no further complaints in windows xp portuguese or english installations.
Now everything's just fine, thanks to you. :)
Now I'll try to use the search option Afrow UK mentioned, so that I can also uninstall ac3 filter. (Thanks Afrow UK)
By the way, is there a way to have an uninstall process, so that we could choose the components to uninstall, instead of uninstalling everything?
kichik
23rd July 2003 22:28 UTC
I want to know which solution of the three suggested solved it, not what it solved. I already understand it has solved everything, and am happy that it did, but I would still like to know what solved it.
For now, to show a "components page" in the uninstaller, you can use InstallOptions. Hopefully, tomorrow or the day after you'll be able to show a real components page too.
insolit
24th July 2003 07:59 UTC
Sorry I misunderstood your questions.
Well both two first options, can individually put the installer doing things correctly.
About the third choice, as I previously mentioned had no effect.
And by the way, all files are installed to the correct directory.