Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return %ERRORLEVEL% from Run command?
Message
From
07/12/2005 18:15:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
07/12/2005 16:27:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01075905
Message ID:
01075935
Views:
31
>I am attempting to launch a silent Tarma installer from VFP 9.
>I use the RUN command as such:
>
>lcRun = SYS(5)+curdir() + "sdt.exe /b0 /q2"
>run /n &lcRun
>
>This runs my EXE fine, but I need to know if the installation encountered any problems.
>Tarma will return an %ERRORLEVEL% if running from a batch file or command line. I would like to check this via VFP. I tried something simple like
>
>lnresult = run /n &lcRun
>
>Of course, this does not work. Any ideas?
>
>TIA
>Amanda

Just an idea:
lcRun = SYS(5)+curdir() + 'sdt.exe /b0 /q2 > "'+sys(2023)+'result.txt"'
...
messagebox(FileToStr(sys(2023)+'result.txt'))

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform