Re: %errorlevel% and run/exec command
- From: "news" <news@xxxxxxxx>
- Date: Mon, 11 Jun 2007 04:05:06 -0400
Having to code around error levels is like shooting paint balls against a moving target..
It is the 'modern' computer 'pulling' methodology, called "asking for comment"..
The target will swipe them away and know you better next time, posts to the net.
--------------------------------------------------------------------------------------
Before you then are offered to buy 'stripped' hard candies or nuclear missles covered in chocolate.
================================================
A decent exe is meant to accept and return anything from 0-9 and A-Z.
That is original switches aka "/reinstall" for the literate.
================================================
BAhhhh, wsh, monad, year,century - > last millenium
Be realistic
---------------------------------------------------------------------------------------
The G8 pledged 80 Billion to Africa. Of course 30 Billion new money form the US.
Yeah, Mr, Gates, what when the totally aged see this once romantic relationship with the world
to end in an inconclusive terminator seed attitude.
You were doing a really great job, Mr. Windows.
In 1992
"Al Dunbar" <AlanDrub@xxxxxxxxxxxxxxxxxxx> wrote in message news:eTz6MgqqHHA.3380@xxxxxxxxxxxxxxxxxxxxxxx
"Michael Harris (MVP)" <mikhar.at.mvps.dot.org> wrote in message news:uSiMjIiqHHA.1296@xxxxxxxxxxxxxxxxxxxxxxxfbesson wrote:Hi,
I have a simple DOS batch which install some patches and process
additional function based on %errorlevel%.
....
echo Here is the command ".\%patch_exe% %Patch_option%"
.\%patch_exe% %Patch_option%
set Install_RC= %errorlevel%
...
Now, I'd like to simply write the same thing in wsh and I have tried
different approach using the reference:
http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_pkoy.mspx?mfr=true,
reading STDOUT and so on... but I'm not retrieving %errorlevel% value.
my perception is that when use RUN method, you can control the process
execution really have dependencies but you can get the output of the
execution and we use EXEC you can get the output but where
syncronization the child process.
Thanks for any example as I'm sure that my previous is not accurate.
The WshScriptExec object returned by the WshShell.Exec method has an...
ExitCode Property
<http://msdn2.microsoft.com/en-us/library/za76z6hh.aspx>
Download details: Windows Script Documentation
http://www.microsoft.com/downloads/details.aspx?FamilyID=01592c48-207d-4be1-8a76-1c4099d7bbb9&DisplayLang=en
By way of further explanation to the OP, it should be recognized that ERRORLEVEL is one of seven "dynamic environment variables" that are "computed dynamically each time the value of the variable is expanded" (see the "set /?" command for info). This is a function of CMD.EXE command extensions, which are likely not involved when a WSH script launches an executable.
/Al
.
- References:
- %errorlevel% and run/exec command
- From: fbesson
- Re: %errorlevel% and run/exec command
- From: Michael Harris \(MVP\)
- Re: %errorlevel% and run/exec command
- From: Al Dunbar
- %errorlevel% and run/exec command
- Prev by Date: Re: %errorlevel% and run/exec command
- Next by Date: Re: %errorlevel% and run/exec command
- Previous by thread: Re: %errorlevel% and run/exec command
- Next by thread: Re: %errorlevel% and run/exec command
- Index(es):
Relevant Pages
|