Click here to Skip to main content
15,886,872 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi,

i have a wxs file and i am calling one custom action written in c#..
and i am calling that custom action from installuisequence with the before launchconditions tag but i am getting error while installing that setup with error number 2762 etc..


If you need any other info let me know ../


Regards,
Amit Gaba
Posted
Comments
Achha Insan 3-Oct-12 5:32am    
nothing is impossible. you can do it.
Member 7217874 3-Oct-12 5:35am    
but it is giving me error and i got stopped on this ... can you give me some direction ??
Member 7217874 3-Oct-12 5:40am    
if i give execute as deferred then it shows me the error 2762 and if i give execute as immediate then installation comes to a prematured finish dialog box and got finished unsucessfully..

1 solution

From http://msdn.microsoft.com/en-us/library/windows/desktop/aa372835%28v=vs.85%29.aspx[^]

2762

	

Cannot write script record. Transaction not started.
	

The InstallExecuteSequence may have been authored incorrectly. Actions that change the system must be sequenced between the InstallInitialize and InstallFinalize actions. Perform package validation and check for ICE77. 


You shouldn't do anything before launch conditions.
A typical installation process is:

  1. Test launch conditions (can the software be installed at all)?
  2. Gather information from the user, if relevant.
  3. Do things to the machine (copy files, modify the registry, add environment variables, create shortcuts...). These actions may be executed in a separate ('server') MSIEXEC.EXE process, that runs with elevated authority.
  4. Commit.


Depending on what your custom action does, you should sequence it in the right position.

Hope this helps,
Pablo.
 
Share this answer
 
Comments
Member 7217874 3-Oct-12 5:52am    
i have UI dialog in my installation and on the first step i am calling my custom action from InstallUISequence before my WelcomeDialog appears. But now it is just coming directly to the finish dialog.
Am i going in right direction?
Pablo Aliskevicius 3-Oct-12 15:00pm    
It all depends on what your custom action does. If it does not modify the system in any way (e.g., if it checks whether a given .ini file is present, and then updates MSI properties based on its contents) you can schedule it to run whenever you want.
Personally, I steer clear from any custom actions that have side effects: I use custom actions to update properties only, and regular actions based on those properties for everything else.

You can use ORCA to see the actual sequences in your MSI file. See http://blogs.msdn.com/b/astebner/archive/2004/07/12/180792.aspx

Hope this helps,
Pablo.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900