Editing Registry via CMD - Syntax Error
I've been fumbling with this off and on for a couple of days but I'm trying to automate a reg value change via CMD or PS. I've been attempting in CMD using reg add but I'm getting an Invalid Syntax error. This is all in Win11.
What I'm trying to do is change the Value in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run
The defaults are Value: TeamsMachineInstaller, Data type is currently: REG_EXPAND_SZ, and Data is: %ProgramFiles%\Teams Installer\Teams.exe --checkInstall --source=PROPLUS
I need to change the Data to: %ProgramFiles (x86)%\Teams Installer\Teams.exe --checkInstall --source=PROPLUS
I've tried adding the ^ as ^%ProgramFiles (x86)^%\Teams Installer\Teams.exe --checkInstall --source=PROPLUS which doesn't work. I've also tried changing the Type ot REG_SZ and using /d "C:\Program Files (x86)\Teams Installer\Teams.exe" --checkInstall --source=PROPLUS.
Each time I'm getting the syntax error and it's been so long since I've messed around trying to manually do this through CMD I've forgotten what to do.