batch file help to call current login profile ssid and reg add value in

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
junqi89
Posts: 3
Joined: 29 Sep 2014 08:17

batch file help to call current login profile ssid and reg add value in

#1 Post by junqi89 » 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.

Post Reply