DVDK
18th March 2003 23:00 UTC
How to get a new line in description and...
Is it possible to get a new line in my components description?
For instance:
This is a file.
It can be used for...
Instead of:
This is a file. It can be used for...
- Also have another question that I hope can be solved. My installer is only for Windows XP, so I want the installer to tell this to the user, but only if another Windows verson is detected. Can this be done?
Joel
18th March 2003 23:07 UTC
1) Try:
Line 1.$\r$\nLine 2
2) I'm trying that: :D
Function "GetWIN"
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" ProductName
StrCmp $R0 "" +1 +2
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" ProductName
'$R0 contains the string of windows version
FunctionEnd
DVDK
18th March 2003 23:14 UTC
thx alot. Great!
DVDK
19th March 2003 06:54 UTC
Damn, cant get the "GetWin" to work. It comes with an error all the time. Dont know if I'm missing something?
I'v put the code within the installer functions. Is that the right way? Have also tried the "GetWindowsVersion" script, but cant get that to work either. Have also seen some questions about it here in the forum, but cant seem to solve my problem. Think its my english understanding which fails on some of the unfamiliar words.
I want to make a installer, where it checks which Windows version there is installed on the users system. The installer is only made for WinXP, so if it detect Windows NT, Win98/ME, then I want to show a textbox and then exit the installer afterwards.
deguix
19th March 2003 08:02 UTC
Have also tried the "GetWindowsVersion" script, but cant get that to work either.
Call GetWindowsVersion
Pop$0 ;or any var
For me it works (return 98 for me).
Joost Verburg
19th March 2003 13:46 UTC
GetWindowsVersion is the best way to detect it.
You can get the latest version at http://nsis.sourceforge.net/archive/...instances=0,11
Joel
19th March 2003 19:21 UTC
Test of GetWin
Here I atach an example for the Function.
Based in example1.nsi
kichik
19th March 2003 19:27 UTC
The code that will do the job for you, DVDK, is:
onInit
Call GetWindowsVersion
Pop$0
StrCmp$0 "XP" workingOnXP
MessageBox MB_OK
|MB_ICONSTOP "This installer is for Windows XP only!"
Abort
workingOnXP:
>FunctionEnd
>
This code will check if the user is using Windows XP and if not will pop up a message box saying "This installer is for Windows XP only!" and abort the installation.
You'll have to include the GetWindowsVersion in your script too for this to work.
DVDK
19th March 2003 20:34 UTC
Great, thx alot. Just what I needed.