This is what I tried so far with status:
dos reg.exe delete HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook /f
dos reg.exe add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook
Status: Completed but no change was made to registry.
waithidden reg.exe delete HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook /f
waithidden reg.exe add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook
Status: Complete with no change.
//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=F5A4A8E27B428C2D9A1C1BA7D72BA08B77406A9C sha1=f5a4a8e27b428c2d9a1c1ba7d72ba08b77406a9c size=380208 url=SWDProtocol://127.0.0.1:52311/Uploads/F5A4A8E27B428C2D9A1C1BA7D72BA08B77406A9C/LGPO.exe.bfswd sha256=a8e0b52dea3836071f3f46235c126cb7fe986abdcc3d1b819d7c2cd101999cb3
end prefetch block
// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter "baseFolder" = "__Download/"
// Move files into subfolders and unescape file names
move "__Download/F5A4A8E27B428C2D9A1C1BA7D72BA08B77406A9C" "{parameter "baseFolder"}LGPO.exe"
// Log setup
parameter "mainSWDLogFolder" = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter "mainSWDLogFolder"}"
parameter "logFile" = "SWD_DeploymentResults.log"
//**End Preparation Marker
// Create LGPO file to be applied to the system
delete __createfile
delete __Download\LGPOtoApply.txt
createfile until EOF
User
Software\Microsoft\Office\16.0\Outlook\Profiles
Outlook
DELETEKEYS
EOF
move __createfile "{pathname of client folder of current site}\__Download\LGPOtoApply.txt"
waithidden "{pathname of client folder of current site}\__Download\LGPO.exe" /t __Download\LGPOtoApply.txt
override wait
hidden=true
runas=currentuser
wait CMD /C echo n | gpupdate /target:user /wait:60
// Task will now exit.
exit {parameter "returnCode"}
//**End Closing Marker
Status: Failed
delete __createfile
delete __Download\LGPOtoApply.bat
createfile until EOF
reg.exe delete HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook /f
reg.exe add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook
EOF
move __createfile "{pathname of client folder of current site}\__Download\LGPOtoApply.bat"
override wait
hidden=true
runas=currentuser
wait CMD /C LGPOtoApply.bat
Status: Completed with no change.
dos reg delete "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook" /f
Status: Completed with no change
regdelete64 "[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook]"
Status: Failed
regdelete64 "[HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook]"
Status: Failed
regdelete "[HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook]"
regdelete64 "[HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook]"
Status: Failed
regdelete "[HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\outlook]" "outlook"
regdelete64 "[HKCU\Software\Microsoft\Office\16.0\Outlook\Profiles\outlook]" "outlook"
Status: Failed
action uses wow64 redirection false
waithidden reg.exe delete "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\outlook" /f
Status: Failed
action uses wow64 redirection false
waithidden reg.exe delete "HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles" /v "Outlook" /f
Status: Failed
regkeydelete64 "[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles\Outlook]"
Status: Failed
regdelete "[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles" "Outlook"
Status: Completed with no change.