Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

strings for custom actions


12 replies to this topic

in_install

in_install
  • Members
  • 32 posts

Posted 18 April 2006 - 11:20

In a MSI project, inside custom action, I want to use string IDs from string table instead of using hard-coded string literals.


How to do that.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 19 April 2006 - 06:14

Just use a property, and set the property to the text you require.

antyagi

antyagi
  • Full Members
  • 121 posts

Posted 19 April 2006 - 06:43

But how can i make a property localized?

  ankur tyagi

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 19 April 2006 - 06:47

You didnt mention that in your initial post :-)

What is the problem that you need to solve? Do you want to be able to grab a string from a custom action?

in_install

in_install
  • Members
  • 32 posts

Posted 19 April 2006 - 07:34

The reason why I want to use string from string table inside the custom action is in that way I can do localization for different language. Hope this will clear the problem.

luke_s

luke_s
  • Full Members
  • 532 posts

Posted 19 April 2006 - 07:48

The main problem we have here is that Install Shield creates the string table, these values are then converted by install shield and placed in the approriate locations in the msi file.

How many strings are there that you need to grab? You could run a query on that particular table to grab the string?

What does you custom action need to do?

Is it possible to set up the message inside install shield which woudl mean that text would automatically be converted over.









antyagi

antyagi
  • Full Members
  • 121 posts

Posted 19 April 2006 - 08:44

Installshield creates a transform for each language. This transform contains string table for that language.
Installshield allows to create localizable property. Try right clicking on some property in property manager. When a property is made localizable text of this property points to a string table entry. The advantage is you can access string table entry using MsiGetProperty (i don't know what will happen when MsiSetProperty is used on such properties).

Hope this helps Mr. in_install.
However if you are using this in InstallScript CA tyr using @STRING_TABLE_ID.
  ankur tyagi

in_install

in_install
  • Members
  • 32 posts

Posted 19 April 2006 - 09:51

Thanks Got it...


(MsiSetProperty not required for my work)


in_install

in_install
  • Members
  • 32 posts

Posted 19 April 2006 - 09:58

Getting the error during build:

ISDEV : error -6264: A record in the Property table is using string ID 'CA_STRING2' for column 'Value' but this string is blank and the column is not nullable

where it is wrong.

Edited by in_install, 19 April 2006 - 09:59.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 20 April 2006 - 11:20

Do you have set this string for all languages?

in_install

in_install
  • Members
  • 32 posts

Posted 20 April 2006 - 11:37

Got it. Thanks. I needed to save everytime for each language.

muddana

muddana
  • Full Members
  • 1 posts

Posted 24 December 2007 - 18:38

how do we set string table identifiers in script? I am getting a complie error, when I write @ID_STRING23 = "test";



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 December 2007 - 13:22

You can't. They are constants. But you can set a variable or a property (MsiSetProperty).