#138123 - 2005-04-19 09:45 AM
a simple if statement.
|
Bjoern_
Lurker
Registered: 2005-04-19
Posts: 2
|
Greetings! I must be stupid, but I can't figure out how to do a certain thing here..
Code:
;if this old version of this file exists If EXIST = ("C:\program files\[a certain program]\[a certain file]") ?"Removing old program" RUN ("C:\WINDOWS\IsUninst.exe -y -a -f"C:\Program Files\[a certain program\a certain uninstall file location]\Uni114.isu" ") ?"Installing new program" RUN (""\\network_path_to_current_file_server\newprogram.msi" /s") EndIf
First, I would gladly accept help with the RIGHT way to type this since I currently lack the knowledge of it, second, a question about run; does run wait until the execution is done, or does the script continue directly?
Before you say, RTFM, I did, but.. Like I said, I am stupid =)
|
|
Top
|
|
|
|
#138124 - 2005-04-19 11:26 AM
Re: a simple if statement.
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Code:
If EXIST("C:\program files\[a certain program]\[a certain file]") "Removing old program"+@CRLF Shell 'C:\WINDOWS\IsUninst.exe -y -a -f"C:\Program Files\[a certain program\a certain uninstall file location]\Uni114.isu"' "Installing new program"+@CRLF Shell '"\\network_path_to_current_file_server\newprogram.msi" /s' EndIf
Quote:
second, a question about run; does run wait until the execution is done, or does the script continue directly?
Nope, RUN always returns immediately. Shell will wait, but only if the process that you run does not detach from the terminal. If it does you will need to use additional trickery to force it to wait.
All this information and more is documented in both the manual and the FAQ forum. If you couldn't find it in the manual, read the articles in the FAQ forum as they are more real world issues.
|
|
Top
|
|
|
|
#138125 - 2005-04-19 12:04 PM
Re: a simple if statement.
|
Bjoern_
Lurker
Registered: 2005-04-19
Posts: 2
|
in the FAQ Forum, gotcha! Thanks a bunch!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 696 anonymous users online.
|
|
|