If you are using the PowerShell Community Extensions, it has a Invoke-BatchFile
that does this. I use with the Visual Studio vcvarsall.bat file to configure my PowerShell session to use the Visual Studio tools.
More Related Contents:
- Variables are not behaving as expected
- Example of delayed expansion in batch file
- Setting a system environment variable from a Windows batch file?
- FORFILES date -after- (date calc in cmd file)
- Set a persistent environment variable from cmd.exe
- How to run a PowerShell script within a Windows batch file
- Convert a small PS script into a long line in a .BATch file
- Batch file to delete files older than N days
- How to have multiple colors in a Windows batch file?
- How do I measure execution time of a command on the Windows command line?
- File / folder chooser dialog from a Windows batch script
- Is there a command to refresh environment variables from the command prompt in Windows?
- Windows Batch Variables Won’t Set
- ‘Pretty print’ windows %PATH% variable – how to split on ‘;’ in CMD shell
- How to verify if a file exists in a batch file?
- Windows command to convert Unix line endings?
- Stop and Start a service via batch or cmd file?
- IF… OR IF… in a windows batch file
- Windows batch script to read an .ini file
- Counting in a FOR loop using Windows Batch script
- Special Characters in Batch File
- How to count no of lines in text file and store the value into a variable using batch script?
- How to test if a path is a file or directory in Windows batch file?
- Split string with string as delimiter
- How to change Screen buffer size in Windows Command Prompt from batch script
- Delete all files and folders in a directory
- windows cmd: problems with for /f with a quoted command with quoted parameters
- Powershell Add System Variable
- ERRORLEVEL vs %ERRORLEVEL% vs exclamation mark ERRORLEVEL exclamation mark
- Adding path permanently to windows using powershell doesn’t appear to work