Having issues with with a script that won't execute
wlhicks
Can someone look at this script for me and tell me what I'm missing?
@echo off
reg query HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\o365 >nul if %errorlevel% equ 0 (
echo "mykey exists- do nothing" ) else (
echo "mykey does not exist - add the key and give it a value" reg add HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\o365 reg add "HKCU\Software\Microsoft\Office\16.0\Outlook" /v DefaultProfile /t REG_SZ /d "o365" /F
)
PAUSE
0
Comments
I don't think you can start the "if" on the same line as the other code.