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

Deferred Custom Action


3 replies to this topic

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 25 November 2005 - 07:37

Hi,
I am new to Installshield. So this may be a obvious question.

I am registering an EXE with my MSI. Later, this MSI has to read a dat file and make some registry entry. So I made a deferred custom action which I am executing after RegisterComPlus Event. But it gives error 1721. "There is a problem with this Windows Installer package........" But there is no error path given with this message.


I am using these particulars in CA.

Working Directory : INSTALLDIR

Filename and CommandLine :
bpslgcpn.exe -D -Hl Default -Fi "[ProgramFilesFolder]\BPS\4.2\Install\security.dat"

Is there anything wrong with this statement. Bcoz when i am running it from command prompt its working fine.

Plzzzz help. Its urgent.

Thanks in advance.
Swati.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 25 November 2005 - 16:52

Property values are normally not accessible in deferred context unless you have written them into the execution script using a set property action in the immediate sequence. I was under the assumption that you can still use system properties (which is what you do), but maybe those are not available either.

I would try these two things (in order of preference)

1: Try to replace [ProgramFilesFolder] with the INSTALLDIR property (adjust the trailing path accordingly). I believe Installshield is doing something with the INSTALLDIR property so that it may be available to you in deferred mode. If this does not work, try option two:

2: Read the section in the windows installer SDK titled "Obtaining contect information for deferred execution custom actions". Essentially you need to insert a set property custom action in the immediate sequence that sets a property with the same name as your deferred custom action to the value of the property you want to retrieve in deferred mode. Then you can access the property in deferred mode as CustomActionData. So it would be (with adjusted path):

"[CustomActionData]\BPS\4.2\Install\security.dat"

Hope one of these options will work.

Some may suggest that you use immediate mode custom actions after InstallFinalize. Don't do this! Custom actions after InstallFinalize is generally ignored / not run when the setup is installed in silent mode.
Regards
-Stein Åsmul

SwatiBansal

SwatiBansal
  • Members
  • 24 posts

Posted 28 November 2005 - 13:00

Thanx for the reply.

I could not try the first option as INSTALLDIR and [ProgramFilesFolder] path may differ.

But I tried the second option.

I did all the required steps. But it still didn't work. I made the Property by the name MyAction. Set this property to ProgramFilesFolder. Then made a custom action named MyAction and gave the path as [MyAction]\BPS\......
Is this correct??? coz when i wrote [CustomActionData]\BPS\... it didn't work. So i tried this.

But it again gave the same error. error 1721. I checked the log files. It is recognising the path but still giving the error.

Error 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: REGISTER_LOGIN_APPLICATION, location: C:\Program Files\BPS\v4.2\, command: bpslgcpn.exe -D -Hl Default -Fi C:\Program Files\BPS\4.2\Install\security.dat

Then I made a function in InstallScript and tried calling it but it also didn't work.
On checking the log file I found this error

Action 17:23:56: REGISTER_LOGIN_APPLICATION.
1: Invoke Function fails, Error = 0x8000ffff


Please help. What is the thing which i m doing wrong.
Urgent help required. Its driving me crazy.

Swati


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 30 November 2005 - 10:08

Does your bpslgcpn.exe return 0 as exit code. Anything else will be interpreted as failuer by Windows Installer. To avoid this you could set the custom action to ignore the exit code (if you can't change the exe)