Page 1 of 1 1
Topic Options
#23578 - 2002-06-20 01:09 PM problems with running an app (setup.exe don't start from script)
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
Can anyone tell me what is wrong with this simple script. The idea is if a certain file is not present, then it will map a network drive and then run an app [Mad] lication within that network drive.

If @userid = 'wrights'
If Not Exist ("c:\essbase_1\bin\essexcln.xll")
use k: "\\essbase_1\essclnt\essbase502\502p13"
run k"\\essbase_1\essclnt\essbase502\502p13\setup.exe"
Endif

(MCA: complete subject)

[ 20 June 2002, 19:15: Message edited by: MCA ]
_________________________
Any problem encountered is a challenge to overcome.

Top
#23579 - 2002-06-20 01:16 PM Re: problems with running an app (setup.exe don't start from script)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
uttleast the run is wrong:
if you map it like this (deep map):
use k: "\\essbase_1\essclnt\essbase502\502p13"
you then run it like this:
run "k:\setup.exe"

but, older windows machines does not support deep mapping.
so you should do a share to that directory or just map it like:
use k: "\\essbase_1\essclnt"
and run like:
run "k:\essbase502\502p13\setup.exe"

cheers,
_________________________
!

download KiXnet

Top
#23580 - 2002-06-20 01:28 PM Re: problems with running an app (setup.exe don't start from script)
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
Still no Luck. It mapps the drive but it doesn't run setup.exe [Confused]
_________________________
Any problem encountered is a challenge to overcome.

Top
#23581 - 2002-06-20 01:34 PM Re: problems with running an app (setup.exe don't start from script)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Try following code:
code:
IF (@userid = 'wrights')
IF NOT Exist("c:\essbase_1\bin\essexcln.xll")
USE k: "\\essbase_1\essclnt"
IF (@error <> 0)
? "Error KIX-USE: error @error (@serror)"
ENDIF
SHELL '%comspec% /c start /w "k:\essbase502\502p13\setup.exe" '
IF (@error <> 0)
? "Error KIX-SHELL: error @error (@serror)"
ENDIF
ENDIF
ENDIF

We replace RUn by SHELL command.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#23582 - 2002-06-20 01:36 PM Re: problems with running an app (setup.exe don't start from script)
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Use an "If exist()" to make sure you can see the Setup.exe on K:. You also may want to use SHELL instead of RUN if you want the script to wait for the setup.exe to execute.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23583 - 2002-06-20 01:46 PM Re: problems with running an app (setup.exe don't start from script)
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
I used the code MCA Provided and when i login a command prompt appears, but it doesn't kick off the application. Can someone explain the notion of using shell instead of run please. It would be much appreciated. [Cool]
_________________________
Any problem encountered is a challenge to overcome.

Top
#23584 - 2002-06-20 01:50 PM Re: problems with running an app (setup.exe don't start from script)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
run and shell (difference also explained in docs)

run runs application but does not wait for it to finish before returning to script execution.

shell runs application and waits until it's finished (the process) and returns.

pretty simple.

if setup has (like normal little bit more complex setups have) childprocesses, like it first starts with setup.exe and it starts an installer or other program, shell does not wait for the other programs to finish.

this why on those cases you should use start /w which waits also childprocesses to finish.

cheers,
_________________________
!

download KiXnet

Top
#23585 - 2002-06-20 01:58 PM Re: problems with running an app (setup.exe don't start from script)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

For the differences between read

(almost) everything you wanted to know about RUN and SHELL on FAQ forum

Normally when the setup.exe is there it should start.
When you are trying it from a DOS box try

k:\essbase502\502p13\setup.exe

How it is going?

We have also extend our script
code:
IF (@userid = 'wrights')
IF NOT Exist("c:\essbase_1\bin\essexcln.xll")
USE k: "\\essbase_1\essclnt"
IF (@error <> 0)
? "Error KIX-USE: error @error (@serror)"
ENDIF
IF (Exist("k:\essbase502\502p13\setup.exe") = 1)
? "Informative KIX: start setup."
SHELL '%comspec% /c start /w "k:\essbase502\502p13\setup.exe" '
IF (@error <> 0)
? "Error KIX-SHELL: error @error (@serror)"
ENDIF
? "completed."
ELSE
? "Informative KIX: file 'k:setup' not found."
ENDIF
ENDIF
ENDIF

What is now the result?
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#23586 - 2002-06-20 02:38 PM Re: problems with running an app (setup.exe don't start from script)
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
i'm stuck and it doesn't help if i can't extract your script the way it appears on this page.

(MCA: script inserted)

code:
IF (@userid = 'wrights')
IF NOT Exist("c:\essbase_1\bin\essexcln.xll")
USE k: "\\essbase_1\essclnt"
IF (@error <> 0)
? "Error KIX-USE: error @error (@serror)"
ENDIF
IF (Exist("k:\essbase502\502p13\setup.exe") = 1)
? "Informative KIX: start setup."
SHELL '%comspec% /c start /w "k:\essbase502\502p13\setup.exe" '
IF (@error <> 0)
? "Error KIX-SHELL: error @error (@serror)"
ENDIF
? "completed."
ELSE
? "Informative KIX: file 'k:setup' not found."
ENDIF
ENDIF
ENDIF



[ 20 June 2002, 15:09: Message edited by: MCA ]
_________________________
Any problem encountered is a challenge to overcome.

Top
#23587 - 2002-06-20 02:47 PM Re: problems with running an app (setup.exe don't start from script)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Try copy / paste to WordPad then cut / paste to your fav editor.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#23588 - 2002-06-20 02:53 PM Re: problems with running an app (setup.exe don't start from script)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
heh, BBcodeparser could have helped...
_________________________
!

download KiXnet

Top
#23589 - 2002-06-20 02:54 PM Re: problems with running an app (setup.exe don't start from script)
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
2hotty, I think you're talking about the format of the script after cutting and pasting. If so, do it this way...

Highlight the code you want.
Copy the code (ctrl+c)
Paste into an empty Word document.
Do a ctrl+a to reselect the code.
Do ctrl+c again.
Now you can paste into your favorite text editor (I like UltraEdit-32).

Top
#23590 - 2002-06-20 03:08 PM Re: problems with running an app (setup.exe don't start from script)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear 2hotty,

What is your mail address. We will send it to you.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#23591 - 2002-06-20 03:11 PM Re: problems with running an app (setup.exe don't start from script)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear 2hotty,

We doesn't need your mail address anymore. Try to edit your latest reaction. We have copy
our script in it which can easily paste to f.e. Notepad.

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#23592 - 2002-06-20 04:04 PM Re: problems with running an app (setup.exe don't start from script)
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
When i login all i get is a command prompt appears and its waiting for me to enter a command. If this is the case, i want the setup.exe to start automatically when i login.
_________________________
Any problem encountered is a challenge to overcome.

Top
#23593 - 2002-06-20 04:10 PM Re: problems with running an app (setup.exe don't start from script)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

What did you see on your screen? Some output must be show on your screen. We have insert all kind
of print statements.
Some questions:
1. What happens when you enter k:\essbase502\502p13\setup.exe
2. How are you starting your logon script?
3. What is the rest of your script?
Greetings.

[ 20 June 2002, 16:13: Message edited by: MCA ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#23594 - 2002-06-20 04:21 PM Re: problems with running an app (setup.exe don't start from script)
2hotty Offline
Getting the hang of it

Registered: 2002-04-09
Posts: 76
Loc: London
when i enter that command and press enter it starts of the application which is absolutley great, that is what i want. but can't the installation of the application start automatically????????????????????
_________________________
Any problem encountered is a challenge to overcome.

Top
#23595 - 2002-06-20 04:23 PM Re: problems with running an app (setup.exe don't start from script)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
2 hotty, sure.
it offcourse depends of the application.

can't say for sure when don't know what's the application...
usually switches like /q or /s do the job...
_________________________
!

download KiXnet

Top
Page 1 of 1 1


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

Who's Online
0 registered and 2870 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.234 seconds in which 0.165 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