batch file help to call current login profile ssid and reg add value in
Posted: 13 Mar 2020 12:34
hi i need help on this i am trying to call an user ssid and then add a registry value into the ssid registry... The problem i facing if i run the batch file as administrator from other user profile it will call the administrator ssid instead of the userprofile ssid.. how can i overcome this problem to call userprofile ssid when i run as administrator?
For /F "Skip=1 Delims=" %%A In (
'"WMIC UserAccount Where (Name='%UserName%') Get SID"') Do For %%B In (%%A
) Do Reg Add "HKU\%%B\Software\Microsoft\Office\16.0\Common\Identity" /V DisableADALatopWAMOverride /T Reg_DWord /D 1 /F>Nul
Thanks for the help.
For /F "Skip=1 Delims=" %%A In (
'"WMIC UserAccount Where (Name='%UserName%') Get SID"') Do For %%B In (%%A
) Do Reg Add "HKU\%%B\Software\Microsoft\Office\16.0\Common\Identity" /V DisableADALatopWAMOverride /T Reg_DWord /D 1 /F>Nul
Thanks for the help.