@set manifestInternalType=internal
@set manifestExternalType=external
@set manifestType=%1

@if not "%manifestType%" == "%manifestExternalType%" (
	@if not "%manifestType%" == "%manifestInternalType%" (
		@goto :error
	)		
)

@cd Driver
@echo Going to unRegister the %manifestType% manifest

@if "%manifestType%" == "%manifestInternalType%" (	
	@call UnRegisterExternalManifest.bat
	@call UnRegisterInternalManifest.bat
)
	
@if "%manifestType%" == "%manifestExternalType%" call UnRegisterExternalManifest.bat

@if "%manifestType%" == "%manifestInternalType%" (
@cd ..\uCode
@call UnRegisterManifest.bat
)
@cd ..\

@exit /b 0

:error
@echo The manifest type was not passed as an argument
@echo write UnRegisterAllManifests.bat [internal/external]