This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Property string manipulation
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 20, 2011
04:11 AM
Property string manipulation
Hi,
I am working on basic msi project. I am detecteting a product from registry.
I get current version information of product in form of
Application.CurrentVersion.7.11
I save this information in form a property through System Search
I would like to truncate Application.CurrentVersion and show only 7.11 in one of the dialog.
Is there any function available which can enable me to truncate property value.
Thanks in advance.
Regards,
Amarjeet
I am working on basic msi project. I am detecteting a product from registry.
I get current version information of product in form of
Application.CurrentVersion.7.11
I save this information in form a property through System Search
I would like to truncate Application.CurrentVersion and show only 7.11 in one of the dialog.
Is there any function available which can enable me to truncate property value.
Thanks in advance.
Regards,
Amarjeet
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 25, 2011
10:31 PM
Use StrFindEx /StrSub / StrLength function in installscript, also you can optimize below function, extract the keyword "CurrentVersion." to make it common.
something like
function string trim(text)
string szPath;
int nFindResult;
int nLen;
begin
nFindResult = StrFindEx(text,"CurrentVersion.",1);
if (nFindResult > 0) then
nLen=(StrLength("appication"));
StrSub(szPath,text,nLen + nFindResult + 1,StrLength(text)-nLen-nFindResult - 1);
return szPath;
endif;
end;
something like
function string trim(text)
string szPath;
int nFindResult;
int nLen;
begin
nFindResult = StrFindEx(text,"CurrentVersion.",1);
if (nFindResult > 0) then
nLen=(StrLength("appication"));
StrSub(szPath,text,nLen + nFindResult + 1,StrLength(text)-nLen-nFindResult - 1);
return szPath;
endif;
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 25, 2011
10:51 PM
My project is Basic MSI. Installscript functions are not available in custom action.
Amarjeet
Amarjeet
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 30, 2011
10:50 PM
From IS2008 help...
Basic MSI projects have the ability to run InstallScript code in the form of custom actions. As with InstallScript projects, Basic MSI projects take advantage of other robust features provided by InstallShield such as dialog authoring, the ability to call custom actions in standard Windows .dll files, and the ability to specify support files.
Basic MSI projects have the ability to run InstallScript code in the form of custom actions. As with InstallScript projects, Basic MSI projects take advantage of other robust features provided by InstallShield such as dialog authoring, the ability to call custom actions in standard Windows .dll files, and the ability to specify support files.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 30, 2011
10:52 PM
From IS2010 help...
Determining Which Installation Project Is Right for You
Basic MSI Projects
Basic MSI projects use the Windows Installer service to drive the entire installation, including calls to any custom actions (InstallScript, VBScript, JScript, .exe files, .dll files, managed code).
Determining Which Installation Project Is Right for You
Basic MSI Projects
Basic MSI projects use the Windows Installer service to drive the entire installation, including calls to any custom actions (InstallScript, VBScript, JScript, .exe files, .dll files, managed code).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 30, 2011
11:19 PM
When i select new custom action - installscript - In dropdown list of function name i can't see any function name. Its blank.
So how i can use installscript functions in custom action ?
Amarjeet
So how i can use installscript functions in custom action ?
Amarjeet
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 31, 2011
03:09 AM
• Behavior and Logic ->Installscript. Right Click Files under installscript.
• Select “new script files”. This gives setup.rul, which comes with base skeleton function” MyFunction(hMSI) “.
• Add your code under “MyFunction(hMSI)”
• Go to “Custom Action and Sequence”. Right click “New Installscript”. In the function name field select “MyFunction”
• Select “new script files”. This gives setup.rul, which comes with base skeleton function” MyFunction(hMSI) “.
• Add your code under “MyFunction(hMSI)”
• Go to “Custom Action and Sequence”. Right click “New Installscript”. In the function name field select “MyFunction”
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 01, 2011
02:24 AM
For including Installscript functions as CAs, you need to export the prototype.
That is at the beginning of the script use
"export prototype";
and then implement your function.
This will expose your Installscript function in the Custom Action Wizard.
That is at the beginning of the script use
"export prototype
and then implement your function.
This will expose your Installscript function in the Custom Action Wizard.