English 中文(简体)
NSIS scripts-Changing header text. Also using same variable in both installer and uninstaller section
原标题:

I am writing an installer using NSIS. I wanna know how to change or write a description(text on white header)on custom pages? For eg: I am inserting a customized page after the directory page and the description remains the same i.e Choose Install Location... But I wanna change it according to my page requirement. How should I change this text? Also I wanna access a variable in uninstaller section which is set with some string in installer section. Please help me on this...

最佳回答

Okay, you seem to have two questions there.. probably best to post them separately :)

For setting the title of the customized page, simply use the following macro (I ve got mine placed just prior to calling nsDialogs::Create)

!insertmacro MUI_HEADER_TEXT $(MY_CUSTOM_TITLE) $(MY_CUSTOM_SUBTITLE)

Where MY_CUSTOM_TITLE and MY_CUSTOM_SUBTITLE are variables set elsewhere.

问题回答

You will need to save the string value of the variable during installation by writing it out to a file or registry setting, and then later during uninstallation reading that value from the same location.

I think you need to do this:

!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "My alternate Choose Install Location text"

You could also edit the language files. This is assuming you are using MUI for your custom pages: http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html





相关问题
Correct place to install demostration projects?

With the new Windows 7 restrictions (well, new to Windows Vista anyways), we can no longer install demo projects to %ProgramFilesFolder%OurApplicationdemo since restricted users will not be able to ...

.deb package conffiles problem

I am distributing one of my applications using a .deb package, but have a problem relating to one of the files. The distribution includes a database file which is constantly updated by the app, on a ...

Closing an application using WiX

In creating my WiX installer I have run into an issue when trying to close an application before installing the upgrade. Below is an example of how I am attempting to do this. <util:...

VS 2005 Setup - HKCU

I am trying to fix an existing application that uses a Visual Studio 2005 setup project. We are requiring it to work on limited user accounts for XP, our app is written in C# for .Net 2.0. It writes ...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I ve released the code as a Google Code project. It s easy for a developer to get the source but I d ...

configsource and installer

I have an project csproj, with app.config file, and logging Ent.Library section using configsource attribute. The logging section is in ahother file Configloggingconfiguration.config. I have a ...

热门标签