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

DoAction problem


4 replies to this topic

damird

damird
  • Members
  • 6 posts

Posted 08 July 2003 - 14:46

Hi.

I'm makeing an Basic MSI installation project. During the installation I have to ask the user for the hostname of the server part of my application. For this task I designed a new dialog box and insert it between SetupType and ReadyToInstall. I added the following actions to the Next button:
CODE

DoAction      ResolveHost       1
NewDialog   ReadyToInstall   (HOST_RESOLVED='TRUE')


The ResolveHost CA contains the following code:
CODE

function ResolveHost(hMSI)
begin
   SprintfMsiLog('Log: testing');
   rv = MsiSetProperty(hMSI, 'HOST_RESOLVED', 'TRUE');
   return ERROR_SUCCESS;
end;


When I press the 'Next' button the installation hangs. I can move the window all around, however all buttons stop responding, nor I can 'normaly' close the installation (I have to use task manager).

Can please anyone give me a hint how to resolve my problem?

BTW: Is it better to code InstallScript scripts in combination with functions from .dll files or is it better to just use VB?

10x and regards,
Dezo

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 July 2003 - 21:29

You didn't specify an action for the case if HOST_RESOLVED is not TRUE

damird

damird
  • Members
  • 6 posts

Posted 09 July 2003 - 10:13

How can I specify an action for HOST_RESOLVED<>"TRUE"? Can I just do:
NewDialog MyDialog HOST_RESOLVED<>"TRUE"

I want to achive that the user has to enter a valid hostname.


Regarding your sugestion ... I think that this isn't a solution (I will tray it), because I'm shure that HOST_RESOLVED is TRUE (I set it explicitly to true).

I think that my hang ocoure when a function try to access any of *Msi* functions (or Installer handler)?

Regards,
Dezo

damird

damird
  • Members
  • 6 posts

Posted 10 July 2003 - 16:09

After trying and retrying, I decided to try to code an vbScript action to use with DoAction event. Whan I did this, my installation start working. I also modify properties in the vbScript (Session.Property() ), however there it doesn't hang.

Can please someone explain me why the CA coded in InstallScript hangs my installation?

I want to know this, because I want to use InstallScript for the entire installation (Basic MSI project). I'm using Developer 7.0sp4 .

Regards,
Dezo

jetgeek

jetgeek
  • Members
  • 8 posts

Posted 24 March 2004 - 04:11

rolleyes.gif
Hey,

Stephan was correct. You do not have an action to do if the property is ANYTHING else than TRUE? So, your dialog will just SIT there UNLESS you define something else in this event such as:

DoAction ResolveHost 1
NewDialog ReadyToInstall HOST_RESOLVED
SpawnWaitDialog ShowDialogError Not HOST_RESOLVED

NOTE: ShowDialogError == user defined error dialog.

The why-it-works-in-vb-script is prolly cause u are IGNORING the return value and the SCRIPTS will not allow u to run them AYSNC--ie they MUST wait until they evaluate the return OR they return, period.

Hope this answers your question.
jetgeek