Page 1 of 2 12>
Topic Options
#36902 - 2003-02-25 09:48 PM Kixforms and background process problem
trashbin Offline
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
#36903 - 2003-02-25 10:03 PM Re: Kixforms and background process problem
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Not sure if its a bug or what suffice to say that I don't understand it either. For example, what happens if you replace setup.exe with another "app" like for example notepad.exe - everything seems to work ok ...

Can you or anyone provide me with a simple setup.exe example - something simple I can install that can be installed over-and-over again so we can test and re-test and get to the bottom of this ?

-Shawn

Top
#36904 - 2003-02-25 10:19 PM Re: Kixforms and background process problem
trashbin Offline
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
#36905 - 2003-02-25 10:21 PM Re: Kixforms and background process problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure do I follow...

what is the code that fails?
_________________________
!

download KiXnet

Top
#36906 - 2003-02-25 10:26 PM Re: Kixforms and background process problem
trashbin Offline
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 Offline
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
#36908 - 2003-02-25 10:50 PM Re: Kixforms and background process problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
uhm...
my bet is timing.
add "sleep 1" just before the key press line.

wild quess though...
_________________________
!

download KiXnet

Top
#36909 - 2003-02-25 10:55 PM Re: Kixforms and background process problem
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
trashbin (?)

well, first of all : Welcome to the board [Smile]

Can it be that the code you provided is all that you have yet ?

If this is NOT the case (which I tend to assume), please post the complete code within code tags ... or how about preparing it with PostPrep 1.0.1

greets

Jochen
_________________________



Top
#36910 - 2003-02-26 12:44 AM Re: Kixforms and background process problem
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11624
Loc: CA
Actually I think Acrobat may be a weird one to be trying. I remember having some kind of auto-launch issue with Acrobat Reader even with batch a while back. Don't remember all the details. Some of it would work correctly, but not the entire install.

Maybe try another program like Winzip and see how it goes. Maybe even use the DEBUG mode of KiXtart.

Top
#36911 - 2003-02-26 02:21 AM Re: Kixforms and background process problem
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
I use the Acrobat autoinstall and I have absolutely no problems with it. However, I do use SHELL to run it synchronously and I also utilize the SHELLCMD() - Executes a shell command UDF with the forced wait option.

[ 26. February 2003, 02:22: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#36912 - 2003-02-26 09:22 AM Re: Kixforms and background process problem
trashbin Offline
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 Offline
Fresh Scripter

Registered: 2003-02-25
Posts: 21
I've forget to ask you what is the PostPrep script ?
Top
#36914 - 2003-02-26 09:29 AM Re: Kixforms and background process problem
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Ok,

to answer the second question first :
PostPrep was coded to provide a way to post code here syntax highlighted, Plus enabling the direct copy and paste into any editor without loosing formatting [Smile]

hmmm ... think you have to explain deeper why you do that line :



$frmForm = CreateObject("Kixtart.Form")



whithout using the object ( creating a form and show it to the user that is)

J.

looking forward to hear back
_________________________



Top
#36915 - 2003-02-26 09:33 AM Re: Kixforms and background process problem
trashbin Offline
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

[Wink]

Top
#36916 - 2003-02-26 09:34 AM Re: Kixforms and background process problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, you see a problem with installshield apps...

what about launching the setup via another exe...

why you need to use run?
it's known that some installs won't work if ran with run.
with shell it ofcourse works little differently but would work.

if you need to use run... I think I would try something like:
run "start /wait setup.exe"

or:
run "explorer setup.exe"
_________________________
!

download KiXnet

Top
#36917 - 2003-02-26 09:48 AM Re: Kixforms and background process problem
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Ok ... I tended to assume correctly [Big Grin]

well, this seems to me then rather a problem of the Installshield app that behaves weird than a problem with kixforms (as shown, with notepad it should work ok) so the simpliest solution would be to accept that and create the form object after run command but before creation of Controls [Wink]
_________________________



Top
#36918 - 2003-02-27 12:43 AM Re: Kixforms and background process problem
trashbin Offline
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 !!

[Smile]

Top
#36919 - 2003-02-27 12:54 AM Re: Kixforms and background process problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, I get right back at you.
I think it indeed is problem of installshield which also uses dll's to show screens.

actually it's so wicked that on some systems it does not work when no other programs is running... well, loads about 15mins the starting screen.

if you call any other program (not setup), aren't they started just fine?

mm... you could also try with RunEx() udf
_________________________
!

download KiXnet

Top
#36920 - 2003-02-26 02:15 PM Re: Kixforms and background process problem
trashbin Offline
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
#36921 - 2003-02-26 02:21 PM Re: Kixforms and background process problem
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
did you search on board for that?

I think there might have been some other switch for the start...

does the "wait" wait for childrens too?
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 833 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.073 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org