I'm writing a batch file that imports a certificate then sets proxy settings. I would like it to proceed in setting the proxy only if the certificates are successfully installed.
certutil.exe -addstore -f "CA" "C:\Users\%Username%\AppData\Local\Temp\IXP000.TMP\cert.cer"
certutil.exe -addstore -f "TrustedPublisher" "C:\Users\%Username%\AppData\Local\Temp\IXP000.TMP\cert.cer"
certutil.exe -addstore -f "root" "C:\Users\%Username%\AppData\Local\Temp\IXP000.TMP\cert.cer"
What do I put here to check if the last three commands were successful before proceeding with the next two?
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d myproxyaddress
Any help would be greatly appreciated!