#36902 - 2003-02-25 09:48 PM
Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
hi all I'm trying to make a script to install silently softwares. usually, "setup.exe" files made with Installshield, create a new process and then quit (the installation process continue to work on background). This behaviour is different when I use the Kixforms instruction "createobject". here is a sample code: Run "d:\setup -s" ? "press a key" get $x $frmForm = CreateObject("Kixtart.Form")
this works well, the setup is launched and executed in background before I press a key. If I put this instruction after the "CreateObject" line, it doesn't work. The setup process is blocked until I press a key, it can't create a background process.
is it a bug , or is there something I don't understand ????
thanks for any help
|
Top
|
|
|
|
#36904 - 2003-02-25 10:19 PM
Re: Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
I don't have this behaviour with notepad I'm testing it with the installation of Acrobat Reader 5. (I've extracted the Acrobat distribution file with Winrar, to have the setup.exe file). so, if launches setup and then I can press a key if I put the code before "createobject". and it waits for the key press if I put it after "createobject": $frmForm = CreateObject("Kixtart.Form") run "d:\setup.exe" ? "press a key" get $x
thanks for any help
|
Top
|
|
|
|
#36906 - 2003-02-25 10:26 PM
Re: Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
sorry, here it is again this works and behave like expected: run "d:\setup.exe" ? "press a key" get $x $frmForm = CreateObject("Kixtart.Form") ... it does: - launch setup of Acrobat Reader - wait a key press - create a form and so on ...
but this don't behave like expected: $frmForm = CreateObject("Kixtart.Form") run "d:\setup.exe" ? "press a key" get $x
it does: - create form - do NOT launch the setup of Acrobat reader BUT wait for a keypress - after key is pressed, it launches the setup of Acrobat !!!!!
I'm using kixtart 4.1.12 and kixforms 2.20 + Windows 2000
|
Top
|
|
|
|
#36907 - 2003-02-25 10:39 PM
Re: Kixforms and background process problem
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Just as a quick test (no idea where I'm going with this) but what happens if you SetFocus back to the DOS window just after the form is created, for example:
code:
break on $frmForm = CreateObject("Kixtart.Form") $frmForm.Show $= SetFocus ("Command Prompt") run "%comspec% /c dir" ? "press a key" get $x
|
Top
|
|
|
|
#36912 - 2003-02-26 09:22 AM
Re: Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
first of all, thanks to all of you for your quick replies. the code I've provided is the only code in my script !!
and with those simple 4 lines, it doesn't work
I've tried to add a "sleep 5" before the key press: no success I've tried the SetFocus command: no success.
and about the program I'm trying to install: Acrobat Reader, I think it's the same problem with all Installshield setups (Office 97 I think it's like that).
I'm going to test with the UDF script of Shell Command and I'll tell you if it works.
thanks
|
Top
|
|
|
|
#36913 - 2003-02-26 09:24 AM
Re: Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
I've forget to ask you what is the PostPrep script ?
|
Top
|
|
|
|
#36915 - 2003-02-26 09:33 AM
Re: Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
sure I'll use the form later but just for testing, my script contains only those 4 lines and that doesn't work when I'll make it work, I'll play with the form !
you can try it like I've posted it and reproduce the problem
|
Top
|
|
|
|
#36917 - 2003-02-26 09:48 AM
Re: Kixforms and background process problem
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
Top
|
|
|
|
#36918 - 2003-02-27 12:43 AM
Re: Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
I've also test to replace the run command by this line: shell "%COMSPEC% /c start /wait d:\setup.exe"
and no success
so, after all these tests, It seems that the CreateObject instruction do not permit to create a background process (the setup.exe is launched but when it try to create a new process, it can't do it).
I won't say it's a problem of Installshield as it works fine when I use it before the createobject instruction.
I'm really out of idea. I wanted to make a graphical interface to launch silent installs. maybe I should post a bug report to Kixforms forum ?
help !!
|
Top
|
|
|
|
#36920 - 2003-02-26 02:15 PM
Re: Kixforms and background process problem
|
trashbin
Fresh Scripter
Registered: 2003-02-25
Posts: 21
|
no success with RunEx too
I can also say it's not a problem with sharing the same graphical DLL because I've also tested that using "setup.exe -s" to run in silent mode (no graphical interface) same problem
I can't test it with another program as I don't know any other program that create a new process and exit (notepad or any common windows application don't fork). I know only installshields application which do that.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 373 anonymous users online.
|
|
|