This website uses cookies. By clicking OK, 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.
ch_eng
Flexera beginner
May 07, 2019
08:48 AM
pgattu, I recently had a support case re: calling 64bit DLL functions from InstallScript and can confirm they are not supported. The alternative is that you must compile your DLL as win32/x86/32bit. My example is using managed code (aka VB.NET DLL) so I don't know the nuanced differences for unmanaged (aka C), but for managed code, your DLL must be configured as COM visible and use the InstallScript function DotNetCoCreateObject: https://helpnet.flexerasoftware.com/installshield22helplib/Subsystems/installshield22langref/helplibrary/DotNetCoCreateObject.htm HTH
... View more
Feb 28, 2018
12:33 PM
agshah, I don't know about the Date property, but this can be used in InstallScript: GetSystemInfo( DATE, nResult, strDate ); GetSystemInfo( TIME, nResult, strTime ); svDateTime = strDate + " " + strTime; reference: http://helpnet.installshield.com/installshield22helplib/Subsystems/installshield22langref/helplibrary/LangrefGetSystemInfo.htm HTH
... View more
Nov 16, 2017
09:57 AM
BossHogg, I'm not sure which kind of project you are using, but this is what we have used in the past: http://helpnet.installshield.com/installshield19helplib/helplibrary/AddingHTMLLinkISDialog.htm That help doc uses the example of a hyperlink, but you don't have to use a hyperlink - you can just change fonts via something similar. ex: [CODE][html] html,body {padding:0; margin:0; color: red;} * {font-size: 18pt; font-family: "MS Sans Serif"; font-weight: bold; } this is bold red 18pt text[/CODE] HTH
... View more
Oct 02, 2017
11:53 AM
kozlov_vital, Apologies. In that case, it would be something like the following: NUMBER nLength; STRING szExePath; nLength = MAX_PATH + 1; MsiGetProperty( ISMSI_HANDLE, "SETUPEXEDIR", szExePath, nLength ); lstDirs = MakeDirList( szExePath ^ sDir ); sources: http://helpnet.installshield.com/installshield21helplib/helplibrary/SETUPEXEDIR.htm https://web.archive.org/web/20070417154102/http://www.installshield.com/news/newsletter/0206-articles/SetupExeDir.asp HTH
... View more
Oct 02, 2017
10:30 AM
kozlvov_vital, If these files are in your "Support Files" for the project, you should be able to access them in InstallScript via something like: lstDirs = MakeDirList( SUPPORTDIR ^ sDir ); HTH
... View more
Sep 19, 2017
09:52 AM
CR, Cary is correct - it cannot be done solely in InstallScript since there is no Random function, but it can be done with InstallScript and a batch file if you don't want to go the external DLL route. Here is an example. You will need to put the attached .bat file in the Support Files for your project: @echo OFF setlocal EnableDelayedExpansion cls :: %1 should be # of loops to do :: %2 should be temp filename to store output :: code based off of: :: https://stackoverflow.com/questions/5777400/how-to-use-random-in-batch-script :: 33 and 126 are hardcoded due to the desired ASCII range; can be changed :: http://www.asciitable.com/ :: delete the output file if it already exists; ignore errors del %2 >NUL 2>&1 :: start off with a "new" random echo !RANDOM! :: loop for the desired number of times for /L %%a in (1 1 %1) do ( call:rand 33 126 echo !RAND_NUM!>>%2 ) ::pause exit /b :: rand() :: %1 is min, %2 is max. :: RAND_NUM is set to a random number from min through max. :rand SET /A RAND_NUM=%RANDOM% * (%2 - %1 + 1) / 32768 + %1 exit /b and include this file (or add these functions to an existing file in your project) [CODE]//=========================================================================== // // File Name: Random.rul // // Description: utility functions for generating random string of characters. // requires external .bat file to actually generate the random numbers. //=========================================================================== // main function prototype STRING GetRandomCharacters( byval NUMBER ); // nNumChars // helper function prototype STRING Chr( byval STRING ); // szASCII //--------------------------------------------------------------------------- //get specified number of random characters from subset of ASCII table function STRING GetRandomCharacters( nNumChars ) STRING szNumChars, szBatFile, szTempFile, szLine, szRandomString, svError; NUMBER nFileHandle, nFileOpen, nResult; begin szBatFile = "random.bat"; // file assumed to be in this project's Support Files szTempFile = "rnd.txt"; NumToStr( szNumChars, nNumChars ); // "/k" is for debugging //LaunchAppAndWait( WINSYSDIR ^ "cmd.exe", "/k \"" + SUPPORTDIR ^ szBatFile + "\" " + szNumChars + " " + FOLDER_TEMP ^ szTempFile, WAIT ); LaunchAppAndWait( WINSYSDIR ^ "cmd.exe", "/c \"" + SUPPORTDIR ^ szBatFile + "\" " + szNumChars + " " + FOLDER_TEMP ^ szTempFile, WAIT | LAAW_OPTION_HIDDEN ); szRandomString = ""; // make sure the file exists before trying file operations if Is( FILE_EXISTS, FOLDER_TEMP ^ szTempFile ) then OpenFileMode( FILE_MODE_NORMAL ); // open file as read-only nFileOpen = OpenFile( nFileHandle, FOLDER_TEMP, szTempFile ); if nFileOpen = 0 then nResult = GetLine( nFileHandle, szLine ); while ( nResult = 0 ) szRandomString = szRandomString + Chr( szLine ); //get ASCII char equivalent of the random # // get next line of the file: nResult = GetLine( nFileHandle, szLine ); endwhile; CloseFile( nFileHandle ); else svError = "Error: unable to open \"" + FOLDER_TEMP ^ szTempFile + "\""; MessageBox( svError, INFORMATION ); // debug endif; else svError = "Error: \"" + FOLDER_TEMP ^ szTempFile + "\" not found!"; MessageBox( svError, INFORMATION ); // debug endif; try DeleteFile( FOLDER_TEMP ^ szTempFile ); // cleanup: delete rnd.txt catch endcatch; return szRandomString; end; //--------------------------------------------------------------------------- //convert a decimal number as string) representing an ASCII character to that character //mimics the "Chr" function in VB (for a limited subset of the ASCII table) function STRING Chr( szASCII ) STRING svASCIIval; begin switch( szASCII ) case "32": svASCIIval = " "; case "33": svASCIIval = "!"; case "34": svASCIIval = "\""; //note": double quote character has to be escaped case "35": svASCIIval = "#"; case "36": svASCIIval = "$"; case "37": svASCIIval = "%"; case "38": svASCIIval = "&"; case "39": svASCIIval = "'"; case "40": svASCIIval = "("; case "41": svASCIIval = ")"; case "42": svASCIIval = "*"; case "43": svASCIIval = "+"; case "44": svASCIIval = ","; case "45": svASCIIval = "-"; case "46": svASCIIval = "."; case "47": svASCIIval = "/"; case "48": svASCIIval = "0"; case "49": svASCIIval = "1"; case "50": svASCIIval = "2"; case "51": svASCIIval = "3"; case "52": svASCIIval = "4"; case "53": svASCIIval = "5"; case "54": svASCIIval = "6"; case "55": svASCIIval = "7"; case "56": svASCIIval = "8"; case "57": svASCIIval = "9"; case "58": svASCIIval = ":"; case "59": svASCIIval = ";"; case "60": svASCIIval = "<"; case "61": svASCIIval = "="; case "62": svASCIIval = ">"; case "63": svASCIIval = "?"; case "64": svASCIIval = "@"; case "65": svASCIIval = "A"; case "66": svASCIIval = "B"; case "67": svASCIIval = "C"; case "68": svASCIIval = "D"; case "69": svASCIIval = "E"; case "70": svASCIIval = "F"; case "71": svASCIIval = "G"; case "72": svASCIIval = "H"; case "73": svASCIIval = "I"; case "74": svASCIIval = "J"; case "75": svASCIIval = "K"; case "76": svASCIIval = "L"; case "77": svASCIIval = "M"; case "78": svASCIIval = "N"; case "79": svASCIIval = "O"; case "80": svASCIIval = "P"; case "81": svASCIIval = "Q"; case "82": svASCIIval = "R"; case "83": svASCIIval = "S"; case "84": svASCIIval = "T"; case "85": svASCIIval = "U"; case "86": svASCIIval = "V"; case "87": svASCIIval = "W"; case "88": svASCIIval = "X"; case "89": svASCIIval = "Y"; case "90": svASCIIval = "Z"; case "91": svASCIIval = "["; case "92": svASCIIval = "\\"; //note": backslash has to be escaped case "93": svASCIIval = "]"; case "94": svASCIIval = "^"; case "95": svASCIIval = "_"; case "96": svASCIIval = "`"; case "97": svASCIIval = "a"; case "98": svASCIIval = "b"; case "99": svASCIIval = "c"; case "100": svASCIIval = "d"; case "101": svASCIIval = "e"; case "102": svASCIIval = "f"; case "103": svASCIIval = "g"; case "104": svASCIIval = "h"; case "105": svASCIIval = "i"; case "106": svASCIIval = "j"; case "107": svASCIIval = "k"; case "108": svASCIIval = "l"; case "109": svASCIIval = "m"; case "110": svASCIIval = "n"; case "111": svASCIIval = "o"; case "112": svASCIIval = "p"; case "113": svASCIIval = "q"; case "114": svASCIIval = "r"; case "115": svASCIIval = "s"; case "116": svASCIIval = "t"; case "117": svASCIIval = "u"; case "118": svASCIIval = "v"; case "119": svASCIIval = "w"; case "120": svASCIIval = "x"; case "121": svASCIIval = "y"; case "122": svASCIIval = "z"; case "123": svASCIIval = "{"; case "124": svASCIIval = "|"; case "125": svASCIIval = "}"; case "126": svASCIIval = "~"; default: //not sure what the default value should be svASCIIval = ""; endswitch; return svASCIIval; end;[/CODE] then call the GetRandomCharacters function like this: szRandomString = GetRandomCharacters( nNumChars ); MessageBox( szRandomString, INFORMATION ); //debug HTH
... View more
Sep 18, 2017
10:46 AM
agshah, We haven't used InstallScript MSI for a while, but I think anytime we needed to save values and use them in OnFirstUIAfter/etc, we had to global variables instead of MSI properties for the very reason you are seeing. MsiGetProperty seemed to only work within the block where it was set (OnFirstUIBefore). HTH
... View more
Sep 18, 2017
09:40 AM
imorrison, We do this in an InstallScript Only project via the following code. If this is for Basic MSI, I don't have an answer. // Register Windows Service ServiceAddService( strServiceName, strServiceDisplayName, strServiceDescription, szPath ^ strFilename, TRUE, "" ); HTH
... View more
Apr 18, 2016
09:01 AM
Superfreak, Do you have the option of writing an InstallScript function instead of requiring an external binary? http://helpnet.flexerasoftware.com/installshield21helplib/Subsystems/installshield21langref/installshield21langref.htm#CSHID=helplibrary%2FLangrefSetFileInfo.htm|StartTopic=helplibrary%2FLangrefSetFileInfo.htm HTH
... View more
Mar 10, 2016
09:31 AM
sureshkottakki, I don't know if there is a correct way to do it using InstallScript MSI, but we have never gotten a web application to upgrade properly using minor upgrades with that project type. We had to convert all of ours to InstallScript Only projects where you can use the Component setting "Overwrite" and set it to "Always". HTH
... View more
Feb 05, 2016
03:52 PM
rguggisberg, We use ADO via InstallScript to execute special SQL scripts. The code is based on the example found here: http://www.installsite.org/pages/en/isp_db.htm SQL Server Database Maintenance DatabaseFunctions.zip HTH
... View more
Jan 12, 2016
09:58 AM
This is probably relevant to your issue: http://stackoverflow.com/questions/1327431/how-do-i-escape-ampersands-in-batch-files HTH
... View more
Sep 21, 2015
08:18 AM
dro1234: https ://community.flexerasoftware.com/showthread.php?218993-Read-me-first-Quick-links-for-info-on-InstallShield-2015 HTH
... View more
Sep 10, 2015
01:04 PM
Rayner, There are a lot of ways you could do it using InstallScript String Functions http:// helpnet.flexerasoftware.com/installshield21helplib/Subsystems/installshield21langref/helplibrary/LangrefString_functions.htm Here is one example using CopyBytes http:// helpnet.flexerasoftware.com/installshield21helplib/Subsystems/installshield21langref/helplibrary/LangrefCopyBytes.htm //------------------------------------------------------------------------- prototype STRING ExFn_CopyBytes( byval STRING, // szMyString byval NUMBER ); // nPos // szMyString = the string you are searching // nPos = the position in the string that you want function STRING ExFn_CopyBytes( szMyString, nPos ) STRING szFoundStr; begin // use 'number - 1' because CopyBytes is 0-based. // passing "4" to find the "t" in "Testing" would actually be position 3 CopyBytes( szFoundStr, 0, szMyString, nPos - 1, 1 ); return szFoundStr; end; HTH
... View more
Aug 21, 2015
07:36 AM
Ash, I think the equivalent is OnMaintUIAfter. You can get to it by opening Setup.rul in your InstallScript editor; choose "After Move Data" from the first dropdown and "OnMaintUIAfter" for the second. HTH
... View more
Latest posts by ch_eng
Subject | Views | Posted |
---|---|---|
1416 | May 07, 2019 08:48 AM | |
709 | Feb 28, 2018 12:33 PM | |
789 | Nov 16, 2017 09:57 AM | |
841 | Oct 02, 2017 11:53 AM | |
841 | Oct 02, 2017 10:30 AM | |
1034 | Sep 19, 2017 09:52 AM | |
2488 | Sep 18, 2017 10:46 AM | |
546 | Sep 18, 2017 09:40 AM | |
349 | Apr 18, 2016 09:01 AM | |
556 | Mar 10, 2016 09:31 AM |
Activity Feed
- Posted Re: UseDLL to load 64bit dll on InstallShield Forum. May 07, 2019 08:48 AM
- Posted Re: How to use Date Property in InstallScript on InstallShield Forum. Feb 28, 2018 12:33 PM
- Posted Re: Change font color in the install dialogue boxes on InstallShield Forum. Nov 16, 2017 09:57 AM
- Posted Re: How to link to the installation media on InstallShield Forum. Oct 02, 2017 11:53 AM
- Posted Re: How to link to the installation media on InstallShield Forum. Oct 02, 2017 10:30 AM
- Posted Re: How to create a random password using install script on InstallShield Forum. Sep 19, 2017 09:52 AM
- Posted Re: MsiGetProperty and MsiSetProperty help on InstallShield Forum. Sep 18, 2017 10:46 AM
- Posted Re: Install Windows Service with dynamic name (name taken from dialog box during install) on InstallShield Forum. Sep 18, 2017 09:40 AM
- Posted Re: Text File Replace and a Read Only File... on InstallShield Forum. Apr 18, 2016 09:01 AM
- Posted Re: JS files not getting upgraded which are Dynamically linked using IS2015 on InstallShield Forum. Mar 10, 2016 09:31 AM
- Posted Re: How to Execute Stored Procedure on InstallShield Forum. Feb 05, 2016 03:52 PM
- Posted Re: how to handle & symbol in LaunchAppAndWait on InstallShield Forum. Jan 12, 2016 09:58 AM
- Posted Re: Where can I download SP1 for Install Shield 2015? on InstallShield Forum. Sep 21, 2015 08:18 AM
- Posted Re: How to find a string in Specific Position on InstallShield Forum. Sep 10, 2015 01:04 PM
- Posted Re: Uninstall tasks related question for InstallScript MSI project. on InstallShield Forum. Aug 21, 2015 07:36 AM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 17, 2015 12:25 PM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 14, 2015 03:35 PM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 14, 2015 10:24 AM
- Posted Re: SQL Database Connection Test... on InstallShield Forum. Aug 14, 2015 07:45 AM
- Posted Re: Need help in making installe on InstallShield Forum. May 07, 2015 11:19 AM
Contact Me
Online Status |
Offline
|
Date Last Visited |
May 07, 2019
09:22 AM
|