Jump to content


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.
Photo

Internal Error 2762 from CA


3 replies to this topic

sanjoygr

sanjoygr
  • Full Members
  • 76 posts

Posted 22 March 2006 - 08:30

I am having following problem in Changing the values of INSTALLDIR at run time.

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.


Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 22 March 2006 - 21:09

You can look up error 2762 in your help files, I assume that you already did so. The log usually gives you more information.

Apart from that:
- Including Vbscript in your setup is usually not necessary, unless you must support Windows 95 and Windows NT 4, without Internet Explorer 4 or higher.
- If you must support that, the scripts may not run correctly if they require a reboot.
- In a deferred custom action you cannot access properties, except "CustomActionData" and "ProductCode".
- A deferred custom action is executed AFTER all regular installation actions. So, when you do get rid of the errors, your setup will copy the files to the original location, after that it changes the destination.
- The last script line uses the "Set" keyword, which can only be used for objects.

Hope this helps you get started.

sanjoygr

sanjoygr
  • Full Members
  • 76 posts

Posted 23 March 2006 - 14:09

Dear Zweitze,

Error 2762 - Means Cannot write script record. Transaction not started.
But why I dont know.

You said "The log usually gives you more information", – Which log file, please ellaborate.

- I am no more including VBScript Runtime for it will be present in the installation machine by default and people will be using IE6.0

- No forced Reboot required.

-Return Processing: Synchronous (Check exist code)
-InScript Execution: Immediate Execution.
-Execute Scheduling-Execute Only Once.
-Use64BitsScripting: No
-Sequences - Absent from sequence.
-No Set keyword is used in the script

Event Name - Argument - Condition
DoAction - CAChangeInstallDir - 1
SetTargetPath - [INSTALLDIR] - 1
EndDialog - Return - 1

Result:

On clicking the OK button of InstallChangeFolder the setup exists before installing the application goes to the finish dialog- "Message given The wizard was interuppted before the application could be installed".


CODE

'The script from the script TAB of Custom action.

<script language="vbscript">
<HTML>
<BODY>  
<%
Option Explicit
Dim MyFixFolderName,InstallDefaultPath
Dim InstallDefaultFolder

MyFixFolderName="THRTE_4.7.5\"

InstallDefaultPath = Session.Property("INSTALLDIR")
InstallDefaultPath = Trim(InstallDefaultPath)
Session.Property("INSTALLDIR") = Left(InstallDefaultPath,3) & MyFixFolderName
Session.Property("_BrowseProperty")=Session.Property("INSTALLDIR")
 
 %>    
  </Script>
 </HTML>
 </BODY>


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 23 March 2006 - 17:57

QUOTE
Error 2762 - Means Cannot write script record. Transaction not started.
This ususally means you have a deferred custom action but didn't insert it between InstallInitialize and InstallFinalize. See also: Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer at http://www.installsi...00108/index.htm

QUOTE
Which log file, please ellaborate.
How do I create a log file of my installation? http://www.msifaq.com/a/1022.htm