Project Type: Basic MSI. InstallShield 11.0 Professional Edition.
Requirerments: I want the user of my setup kit to be able to change the drive of installation but not folder. After selecting the drive The folder should be as per my fixed folder name.
Process followed:
Created an Custom Action CAChangeInstallDir
Following attributes for CA.
1.VBScript Fie name: Not enabled as it is written in the Scrpt TAB of the property.
2.ReturnProcessing:Asynchronous (Waits for exist code)
3.In-script execution:Deffered Execution tried also with deffered,Immediate, Commit options.
4.Execution Scheduling:Always Execute (This is also Not Enabled by default)
5. Included VBScript Runtime Engine from merge module.
6.All Sequence: Absent from sequence as it is called from DOAction of a push button.
The CA is called from the dialog box InstalledChangeFolder ControlName: OK - Type - Push Button
Event Name - Argument - Condition
DoAction - CAChangeInstallDir - 1
SetTargetPath - [_BrowseProperty] - 1
EndDialog - Return - 1
Coding in for script
<script language="vbscript">
<HTML>
<BODY>
<%
Option Explicit
Dim MyFixFolderName,InstallDefaultPath
MyFixFolderName="THRTE_4.7.5\"
InstallDefaultPath = Session.Property("INSTALLDIR")
InstallDefaultPath = Trim(InstallDefaultPath)
if len(InstallDefaultPath)<3 then
InstallDefaultpath="C:\"
end if
Set Session.Property("INSTALLDIR") = Left(InstallDefaultPath,3) & MyFixFolderName
%>
</Script>
</HTML>
</BODY>
While application is installed on selecting the change folder option it goes to installchangedestinationfolder dialog. On clicking the OK button (in this OK Button even DOAction the Custom Action is called) it gives an Internal error 2762
Please let me know here is the fault or what I am missing .
Thanks
Sanjoygr@yahoo.co.in
Edited by sanjoygr, 22 March 2006 - 11:58.