Apr 09, 2014
03:20 PM
I just tested this on 2008R2, Win7x86 and Win7x64 and XPSP3 and 2003SE It works perfectly with all but XP--cuts off 20 kb of data in the log file that gets copied. Maintenance and remove events work properly though on XP I really don't care about XP. We don't support it anymore for any of our products. End of Life means something to us.
... View more
Apr 09, 2014
12:45 PM
Thanks so much for the response. I am off to try your suggestions.
... View more
Apr 09, 2014
11:38 AM
I found a good way to do just this thing. What we do is copy the MSI log file after the user presses the Finish button at the end. It is modeled after the ShowMsiLog CA. It's an EXE Custom Action (Path Referenced in a Directory). New Custom Action EXE type Custom Action Name: CopyLogFile Working Directory: SystemFolder File Name & Command Line: xcopy.exe "[MsiLogFileLocation]" "[CommonAppDataFolder]\COMPANY_NAME\Installation Log" Return Processing: Asynchronous (No Wait for Completion) In-Script Execution: Immediate Execution Execution Scheduling: Always Execute **NOTE** Do not put it in any sequences or use conditions. This gets tied to the "Finish" Button of SetupCompleteSuccess and SetupCompeteError dialog buttons. 1) In Dialog view, expand SetupCompleteSuccess and click on "Behavior". 2) Click the Finish Pushbutton, found in the "SetupCompleteSuccess Dialog Behavior" view (we need to add our action to the list of things to do when Finish is pressed). 3) To the right, find the Finish Pushbutton Event window. Add a "DoAction" Event, Type: CopyLogFile, Condtion: 1 (now, when the button is pressed, the setup finishes and this file copies to your custom location In your case you would do the following in CopyLogFile: xcopy.exe "[MsiLogFileLocation]" "[INSTALLDIR]" And, this is SO COOL. You can just get rid of renaming your log file. Let the system auto name it for you so you will get a new log file each time (each one can be analysed individually, GREAT FOR SUPPORT PURPOSES, which is why I save em to a custom location. A customer can just email me all the MSI*.log files and I have a history every time the installer was run, what it was doing, etc...) EDIT: So, this approach works great with a GUI. I am currently trying to find a way to do this when Silent Install mode is run. Does anyone have any answer for that? Thanks SO MUCH in advance.
... View more
Dec 31, 2013
08:37 AM
I wanted to ask if it is possible, that if I have an older version of a product I authored in InstallShield's InstallScript type project that is installed on a customer machine, then I release an updated version of that product using InstallShield Basic MSI, can I make the new version detect it and do an upgrade? I was thinking that, from the MSI package, I could detect itand use a custom action to copy any required registry settings and files needed before calling the uninstaller for the older product, then install the new product. Is this even possible? I am pretty new to MSI, and have made much progress recently, but we need a way to move our customers off of the old installers and get them into the new ones. Any help is GREATLY appreciated. Thanks.
... View more
Labels
- Labels:
-
InstallShield 2013
Dec 10, 2013
08:52 AM
I used InstallScript code in a Custom Action. Sequence it before files are installed. Also, I define my LICENSE_DIR as he described above export function SetLicenseDirectory(HWD); function SetLicenseDirectory () STRING szBase; begin szBase = UpdateBaseDirectory(INSTALLDIR); MsiSetProperty(ISMSI_HANDLE, "LICENSE_DIR", szBase^"License"); end; /*---------------------------------------------------------------------------*\ * function UpdateBaseDirectory(STRING) * \*---------------------------------------------------------------------------*/ function STRING UpdateBaseDirectory (tgtDir) STRING baseDir; NUMBER pos; NUMBER lastPos; begin // first, find out if the last characther in the string // is a backslash baseDir = tgtDir; StrRemoveLastSlash ( baseDir ); pos = StrFindEx(baseDir, "\\", 0); if (pos < 0) then return (baseDir); endif; lastPos = pos; while (pos >= 0) pos = StrFindEx(baseDir, "\\", pos + 1); if pos > 0 then lastPos = pos; endif; endwhile; StrSub(baseDir, baseDir, 0, lastPos); return(baseDir); end;
... View more
Aug 06, 2013
02:23 PM
how about using the built in windows command, SC after the data has been moved, launch a command prompt using SC SC.EXE can create, and remove services, not just look at permissions.
... View more
Aug 06, 2013
09:03 AM
Remember to set the ID you got from the properties view for the combo box. Set it to some defined constant, I used DRIVECOMBO set to 1302 because that was my control ID for the combo box control. this way the install drive is captured, then I add the standard path before setting TARGETDIR. works GREAT. I only wish they would make this a standard dialog. Giving a user the ability to install to any folder is not a good thing at all. I only allow users to install to PROGRAMFILES or PROGRAMFILES64 only using the drive specified by the user. Hence, if they choose 😧 drive, the TARGETDIR would be D:\Program Files (x86)\COMPANY for 32 bit and D:\Program Files\COMPANY for 64 bit apps.
... View more
Aug 06, 2013
08:57 AM
I needed a custom dialog that only would allow the user to choose the hard drives with which to install our products to. Currently, there is no such animal. I copied the SdAskDestPath code, and created a new function in my main script, called SdAskDestDrive. Here is the code to make it work. You need to go edit the standard SdAskDestPath. Just delete the text box where the path shows up and put in a combobox. make sure to note it's ID in the properties pane. //--------------------------------------------------------------------------- // function NUMBER SdAskDestDrive(szTitle, szMsg, svDir, nStyle) // Returns: NUMBER // Desc: Custom Dialog to ask for only a drive to install product to. //--------------------------------------------------------------------------- function NUMBER SdAskDestDrive(szTitle, szMsg, svDir, nStyle) string szDlg, svDirLoc, szTemp, svDrive; number nId, nTemp, nSdDialog; HWND hwndDlg; BOOL bDone; LIST listDrives; begin szDlg = "SdAskDestDrive"; nSdDialog = SD_NDLG_ASKDESTPATH; svDirLoc = svDir; // record data produced by this dialog if(MODE=SILENTMODE) then SdMakeName( szAppKey, szDlg, szTitle, nSdAskDestPath ); SilentReadData( szAppKey, "Result", DATA_NUMBER, szTemp, nId ); if((nId != BACK) && (nId != CANCEL)) then SilentReadData( szAppKey, "szDir", DATA_STRING, svDir, nTemp ); endif; return nId; endif; // ensure general initialization is complete if(!bSdInit) then SdInit(); endif; if(EzDefineDialog( szDlg, "", "", SD_NDLG_ASKDESTPATH ) = DLG_ERR) then return -1; endif; // Loop in dialog until the user selects a standard button bDone = FALSE; while (!bDone) nId = WaitOnDialog( szDlg ); switch (nId) case DLG_INIT: listDrives = ListCreate(STRINGLIST); GetValidDrivesList(listDrives, FIXED_DRIVE, -1); CtrlSetList(szDlg, DRIVECOMBO, listDrives); ListGetFirstString (listDrives, svDrive); CtrlSetCurSel(szDlg,DRIVECOMBO, svDrive); // CtrlSetText( szDlg, 0x80000000 | SD_STA_DESTDIR, svDrive); if(szMsg != "") then SdSetStatic( szDlg, SD_STA_CHANGEDIRMSG, szMsg ); endif; hwndDlg = CmdGetHwndDlg( szDlg ); SdGeneralInit( szDlg, hwndDlg, nStyle, szSdProduct ); SdSetDlgTitle(szDlg, hwndDlg, szTitle); case SD_PBUT_CHANGEDIR: // // Only "create" the folder if this is not ISMSI embedded. // SelectDirNoLog( "", "", svDirLoc, !INSTALLSCRIPTMSIEEUI ); case SD_PBUT_CONTINUE: svDir = sDrive; nId = NEXT; bDone = TRUE; case BACK: nId = BACK; bDone = TRUE; case DLG_ERR: SdError( -1, "SdAskDestDrive" ); nId = -1; bDone = TRUE; case DLG_CLOSE: SdCloseDlg( hwndDlg, nId, bDone ); default: CtrlGetCurSel(szDlg,DRIVECOMBO, svDrive); // CtrlSetText( szDlg, 0x80000000 | SD_STA_DESTDIR, svDrive ); // check standard handling if(SdIsStdButton( nId ) && SdDoStdButton( nId )) then bDone = TRUE; endif; endswitch; endwhile; // Cleanup Dialog EndDialog( szDlg ); ReleaseDialog( szDlg ); SdUnInit(); // record data produced by this dialog if(MODE=RECORDMODE) then SdMakeName( szAppKey, szDlg, szTitle, nSdAskDestPath ); SilentWriteData( szAppKey, "szDir", DATA_STRING, svDir, 0 ); SilentWriteData( szAppKey, "Result", DATA_NUMBER, "", nId ); endif; return nId; end;
... View more
Labels
- Labels:
-
InstallShield 2013
Nov 28, 2011
03:23 PM
our applications have a Path variable in the registry that points to the location they are installed to. Anyway, during an update, doesn't InstallShield already know where to put the updated files?
... View more
Nov 07, 2011
10:15 AM
You cannot set BATCH_INSTALL in the UIAfter events for setup.rul make sure to do the following: [PHP] if ( BATCH_INSTALL ) then SdFinishReboot ( szTitle , szMsg1 , SYS_BOOTMACHINE , szMsg2 , 0 ); else SdFinish ( szTitle , szMsg1 , szMsg2 , szOpt1 , szOpt2 , bvOpt1 , bvOpt2 ); endif; RecordInLogFile(SD_NAME, "OnFirstUIAfter()"); [/PHP] do that at the bottom of each UIAfter event and you should be good. this will do what you want, i am pretty sure. i just set the finish dialog to not set the option to reboot now. notice the parameters for SdFinishReboot and you will be all set.
... View more
May 18, 2011
03:00 PM
why on earth your you ever let anyone install a 64 bit application under the 32 bit stuff? this should never be done. for any reason.
... View more
May 18, 2011
02:43 PM
//--------------------------------------------------------------------------- // OnEnd // // The OnEnd event is called at the end of the setup. This event is not // called if the setup is aborted. //--------------------------------------------------------------------------- function OnEnd() begin DeleteDir(SUPPORTDIR,ALLCONTENTS); end;
... View more
May 18, 2011
02:39 PM
you need two \\ to make one \ in real life from the documentation: /*--------------------------------------------------------------*\ * * InstallShield Example Script * * Demonstrates the FindFile function. * * FindFile is called to search for the file Config.sys in the * root of drive C. * \*--------------------------------------------------------------*/ #define FILE_SPEC "Config.sys" #define SEARCH_DIR "C:\\" #define TITLE_TEXT "FindFile Example" // Include Ifx.h for built-in InstallScript function prototypes. #include "Ifx.h" export prototype ExFn_FindFile(HWND); function ExFn_FindFile(hMSI) STRING svResult; begin if (FindFile (SEARCH_DIR, FILE_SPEC, svResult) < 0) then MessageBox ("FindFile failed.", SEVERE); else SprintfBox (INFORMATION, TITLE_TEXT, "Found: %s in %s.", svResult, SEARCH_DIR); endif; end;
... View more
May 18, 2011
02:34 PM
this is why i don't use pre-reqs from InstallShield. We use the real thing from MS, and I CAN do a quiet installation, even in my NON SILENT installation. SdShowMsg("Installing SQL Server Express 2005. This may take several minutes. Please be patient.", TRUE); if (SYSINFO.bIsWow64) then szProgram = SRCDIR ^ SD_PREREQS ^ "en_sql_server_2005_express_edition_sp2_x64.exe"; else szProgram = SRCDIR ^ SD_PREREQS ^ "en_sql_server_2005_express_edition_sp2_x32.exe"; endif; szCmd = "/qn ADDLOCAL=all REBOOT=ReallySuppress DISABLENETWORKPROTOCOLS=2 SQLAUTOSTART=1 SECURITYMODE=SQL SAPWD=123"; nResult = LaunchAppAndWait(szProgram, szCmd, LAAW_OPTION_WAIT); if (nResult < 0) then SdShowMsg("Installing SQL Server Express 2005. This can take several minutes. Please be patient.", FALSE); MessageBox ( SQLSERVEREPRESS_INSTALL_FAILED, SEVERE ); return 0; endif;
... View more
May 18, 2011
02:24 PM
szCmdLine = "/im YourEXENameHere.exe /f"; LaunchAppAndWait("taskkill", szCmdLine, LAAW_OPTION_WAIT);
... View more
Latest posts by Earthshine
Subject | Views | Posted |
---|---|---|
1289 | Apr 09, 2014 03:20 PM | |
724 | Apr 09, 2014 12:45 PM | |
1289 | Apr 09, 2014 11:38 AM | |
1450 | Dec 31, 2013 08:37 AM | |
2628 | Dec 10, 2013 08:52 AM | |
885 | Aug 06, 2013 02:23 PM | |
749 | Aug 06, 2013 09:03 AM | |
2470 | Aug 06, 2013 08:57 AM | |
1647 | Nov 28, 2011 03:23 PM | |
451 | Nov 07, 2011 10:15 AM |
Activity Feed
- Posted Re: MsiLogFileLocation-How to copy the log file to target folder? on InstallShield Forum. Apr 09, 2014 03:20 PM
- Posted Re: Switching from Installscript installs to Installshield Basic MSI package installs on InstallShield Forum. Apr 09, 2014 12:45 PM
- Posted Re: MsiLogFileLocation-How to copy the log file to target folder? on InstallShield Forum. Apr 09, 2014 11:38 AM
- Posted Switching from Installscript installs to Installshield Basic MSI package installs on InstallShield Forum. Dec 31, 2013 08:37 AM
- Posted Re: Dynamic installation path on InstallShield Forum. Dec 10, 2013 08:52 AM
- Posted Re: Service starting on InstallShield Forum. Aug 06, 2013 02:23 PM
- Posted Re: A Custom Dialog that only allows the user to choose which hard drive to install to. on InstallShield Forum. Aug 06, 2013 09:03 AM
- Posted A Custom Dialog that only allows the user to choose which hard drive to install to. on InstallShield Forum. Aug 06, 2013 08:57 AM
- Posted Re: Currently Installed Directory - Upgrade on InstallShield Forum. Nov 28, 2011 03:23 PM
- Posted Re: Suppress "reboot" request in pure InstallScript projects on InstallShield Forum. Nov 07, 2011 10:15 AM
- Posted Re: files installed under Program Files (x86) are not uninstalled during Remove on InstallShield Forum. May 18, 2011 03:00 PM
- Posted Re: Files being left behind in the supportdir on InstallShield Forum. May 18, 2011 02:43 PM
- Posted Re: FindFile Command on InstallShield Forum. May 18, 2011 02:39 PM
- Posted Re: Partial Silent Install on InstallShield Forum. May 18, 2011 02:34 PM
- Posted Re: stop the procces when uninstalling it on InstallShield Forum. May 18, 2011 02:24 PM
- Posted Re: Run Silent on InstallShield Forum. May 16, 2011 02:55 PM
- Posted Re: Single Prerequisite Folder for Multiple Setups on InstallShield Forum. Apr 27, 2011 09:46 AM
- Posted Re: Availability of SQL Server 2005 Express SP2 Redistributable on InstallShield Forum. Nov 13, 2007 10:25 AM