Skip to content
⌘ NSIS Forum Archive

How to get a new line in description and...

9 posts

DVDK#

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#
1) Try:
Line 1.$\r$\nLine 2
2) I'm trying that: 😁


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#
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#
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#
GetWindowsVersion is the best way to detect it.

You can get the latest version at http://nsis.sourceforge.net/archive/...instances=0,11
Joel#
Test of GetWin

Here I atach an example for the Function.

Based in example1.nsi
kichik#
The code that will do the job for you, DVDK, is:

Function .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.