How to check command line parameter in “.bat” file?

You need to check for the parameter being blank: if “%~1″==”” goto blank Once you’ve done that, then do an if/else switch on -b: if “%~1″==”-b” (goto specific) else goto unknown Surrounding the parameters with quotes makes checking for things like blank/empty/missing parameters easier. “~” ensures double quotes are stripped if they were on the … Read more

VMware Workstation and Device/Credential Guard are not compatible

There is a much better way to handle this issue. Rather than removing Hyper-V altogether, you just make alternate boot to temporarily disable it when you need to use VMWare. As shown here… http://www.hanselman.com/blog/SwitchEasilyBetweenVirtualBoxAndHyperVWithABCDEditBootEntryInWindows81.aspx C:\>bcdedit /copy {current} /d “No Hyper-V” The entry was successfully copied to {ff-23-113-824e-5c5144ea}. C:\>bcdedit /set {ff-23-113-824e-5c5144ea} hypervisorlaunchtype off The operation completed … Read more

How to update PATH variable permanently from Windows command line?

You can use: setx PATH “%PATH%;C:\\Something\\bin” However, setx will truncate the stored string to 1024 bytes, potentially corrupting the PATH. /M will change the PATH in HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER. In other words, a system variable, instead of the user’s. For example: SETX /M PATH “%PATH%;C:\your path with spaces” You have to keep in mind, … Read more