|
Answer» 1. How to return the processing result from a called batch program to the caller? 2. How to return the processing result from a called function in the same batch file to the caller? 3. How to go back to the next line of call statement from the called function in the same batch file?For some time MS has recommended for t all users learn to use PowerShell instead of DOS for all but the most trivia things. Quote Getting started with PowerShell PowerShell is Microsoft’s next generation command-line shell that helps IT guys all over the world to automate administrative tasks. If you have been around the IT business as long as I have you have properly made a lot for BAT files and batch programming to simplify and automate IT tasks. You properly also know that in the year 2011 it is quiet limited what you can do with batch programming in Windows operating systems. It is a very limited set of tools we have. You can’t even access the registry. With PowerShell Microsoft has made a brand new shell that gives us all the possibility we could wish for (Registry access, WMI, Windows processes, Services ETC.). In this little intro to PowerShell I will show you what kind of THINKS you EASILY can do with PowerShell even if you have not worked with it before. ... http://www.techwork.dk/tools/windows-powershell-for-newbies
Quote from: Geek-9pm on May 28, 2013, 09:39:35 PMFor some time MS has recommended for t all users learn to use PowerShell instead of DOS for all but the most trivia things. QuoteYou can’t even access the registry. Batch has been able to access the registry since reg.exe was created. 1. How to return the processing result from a called batch program to the caller?
set a variable or use a file
2. How to return the processing result from a called function in the same batch file to the caller?
set a variable or use a file
3. How to go back to the next line of call statement from the called function in the same batch file?
end the called subroutine with Code: [Select]GOTO :EOF
|