Hi all
Version: InstallShield Developer 8.0
Type: InstallScript MSI Project
INSTALLDIR = "D:\MIB"
Step 1.
I made 3 Features as below:
FeatureA with Destination Folder: "D:\MIB\A" (Directory Identity = MIBA)
FeatureB with Destination Folder: "D:\MIB\B" (Directory Identity = MIBB)
FeatureC with Destination Folder: "D:\MIB\C" (Directory Identity = MIBC)
Step 2.
I apply FeatureDialog in the setup.uri
the code: as below
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.
FeatureDialog with Destination Folder property
Started by
MIB426
, Nov 17 2003 11:12
2 replies to this topic
Posted 17 November 2003 - 11:12
CODE |
// Include header files #include "ifx.h" function OnFirstUIBefore() number nResult,nSetupType; string szTitle, szMsg; string szFeatures, szTargetdir; string svDir; number nLevel; LIST listStartCopy; begin SHELL_OBJECT_FOLDER = @PRODUCT_NAME; Dlg_Start: // beginning of dialogs label Dlg_SdWelcome: szTitle = ""; szMsg = ""; nResult = SdWelcome( szTitle, szMsg ); if (nResult = BACK) goto Dlg_Start; Dlg_FeatureDialog: szTitle = ""; szMsg = ""; svDir = INSTALLDIR; szTitle = "Select Features"; szMsg = "Select the features you want to install on your computer."; nResult = FeatureDialog(szTitle, szMsg, svDir, ""); if(nResult = BACK) goto Dlg_SdWelcome; Dlg_SdStartCopy: szTitle = ""; szMsg = ""; listStartCopy = ListCreate( STRINGLIST ); //The following is an example of how to add a string(szName) to a list(listStartCopy). //eg. ListAddString(listStartCopy,szName,AFTER); nResult = SdStartCopy( szTitle, szMsg, listStartCopy ); ListDestroy(listStartCopy); if (nResult = BACK) goto Dlg_FeatureDialog; Enable(STATUSEX); return 0; end; function OnMaintUIBefore() NUMBER nResult, nType; STRING szTitle, szMsg, svDir, svResult, szCaption; begin Dlg_Start: Disable(BACKBUTTON); nType = SdWelcomeMaint(szTitle, szMsg, MODIFY); Enable(BACKBUTTON); if (nType = REMOVEALL) then svResult = SdLoadString(IFX_MAINTUI_MSG); szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION); nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult); if (nResult = IDCANCEL) goto Dlg_Start; endif; nResult = NEXT; Dlg_SdFeatureTree: if (nType = MODIFY) then szTitle = ""; szMsg = ""; nResult = SdFeatureTree(szTitle, szMsg, INSTALLDIR, "", 2); if (nResult = BACK) goto Dlg_Start; endif; switch(nType) case REMOVEALL: FeatureRemoveAll(); case REPAIR: FeatureReinstall(); endswitch; Enable(STATUSEX); end; |
Problem:
When I am in the end user mode. All the feature has Destination Folder to "D:\MIB". Is there anyway I can use destination property in the feature itself?
Such as FeatureA will show Destination Folder to D:\MIB\A, FeatureB will show Destination Folder to D:\MIB\B. Or I have to ceate my own customer dialog?
Thank you if u can help me on this.
MIB
Posted 17 November 2003 - 18:23
I don't think the standard dialogs in InstalLScript MSI can do this. You would have to create a custom dialog.
The standard featrue tree dialog in Basic MSI can do it though.
The standard featrue tree dialog in Basic MSI can do it though.
Stefan Krüger
InstallSite.org twitter facebook
Posted 18 November 2003 - 02:47
Thank you for reply me.
I guess I have to make custom Dialog then.
Do u know is there sample code relates to my problem?
thanks
I guess I have to make custom Dialog then.
Do u know is there sample code relates to my problem?
thanks