Click here to Skip to main content
15,883,809 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello, I have the following problem VBScript , I want you to execute a command in cmd Eg "WScript.CreateObject("WScript.Shell").Run "DISM.exe /Online /Cleanup_Image /RestorHealth",1,true" and it will tell me if it was completed or not, that is, if for some reason it stops at 80% to tell me it was not completed
one knows how this check can be done


What I have tried:

I did not find any command or condition in net
Posted
Updated 20-Oct-21 22:03pm

Cmd.exe is able to write a result of "job" into output. For example:
BAT
dir /b > dir.txt

produces dir.txt file with the list of files and directories in current directory (where the script has been executed).

More at: Redirect Output from the Windows Command Line to a Text File[^]

Got an idea?
 
Share this answer
 
Thank you so much for the reply,is in bat in VBScript is there a command?
 
Share this answer
 
Comments
Maciej Los 21-Oct-21 4:33am    
This is not an answer. Please, delete ito to avoid down-voting.
To post comment, use "Have a question or comment" widget under the solution (answer).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900