|
|
#1 |
|
Junior Member
|
I need help...
code: ------------------------------ (1) Installation success. (2) but, Registry has Win98 and Win2000 both Reg entries. (3) I'm using system.ini's '386enh-ebios' element for detecting Windows Version. If exist 'ebios', it's Win9x. else Win2000. (4) I want install a part of reg keys, Win98 or Win2000. How do that? Need help.... [Edited by dTomoyo on 04-30-2001 at 09:33 AM] |
|
|
|
|
|
#2 |
|
Member
|
hi,
as the string in variable $x is empty when the inistring you try to read doesn't exist you should better (IMHO) use IfErrors. and .. the way you did it in your script on win98 systems there would be always written both registry entries, after writing to the registry you should use GoTo to jump out. try it like that: Section "Driver 0.1" SectionIn 12 IfFileExists $SYSDIR\drive.ax CheckFile InstFile CheckFile: CompareDLLVersions files\file.ax $SYSDIR\drive.ax InstFile\ SkipFile InstFile: SetOverwrite try SetOutPath $SYSDIR File files\drive.ax RegDLL $SYSDIR\drive.ax ReadINIStr $0 $WINDIR\system.ini 386enh ebios IfErrors Win2000Reg Win98Reg Win98Reg: WriteRegStr HKLM "1..." "a..." "x..." WriteRegStr HKLM "2..." "b..." "y..." WriteRegStr HKLM "3..." "c..." "z..." GoTo SkipFile Win2000Reg: WriteRegStr HKLM "4..." "d..." "v..." WriteRegStr HKLM "5..." "e..." "w..." SkipFile: SectionEnd i hope it works btw: justin, wouldn't it be fine to implement a constant in NSIS which holds the windows version ? cu yzo |
|
|
|
|
|
#3 |
|
Junior Member
|
Thanks.
|
|
|
|
|
|
#4 | |
|
Junior Member
|
Quote:
![]() Didn't work... Registry has both settings. I guess 'ReadIniStr' & 'IfErrors' command has some bug. ![]() |
|
|
|
|
|
|
#5 |
|
Moderator Alumni
Join Date: Apr 2000
Location: USA
Posts: 315
|
You have to do a ClearErrors before the ReadINIStr, then do IfErrors after...
-Justin |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|