1

I want to change the registry key HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\S-1-5-21-192855608-1092268202-2311440418-1001\FeatureStates in Batch. However,

S-1-5-21-192855608-1092268202-2311440418-1001

Appears to be unique for everyone, but i want the script to be usable without any major technical knowledge and having to go into regedit. I have found some ways to replicate some wildcard functionality, but they appear to not fit what i need.

3
  • Are you trying to do this on a workgroup computer with fixed number of people or on domain joined computer where users frequently change their system?
    – clhy
    Jul 31, 2015 at 7:12
  • @The_IT_Guy_You_Don't_Like This is not a corporate enviroment, it's for online distribution. Jul 31, 2015 at 7:16
  • Can you show what yuo've tried please
    – Dave
    Jul 31, 2015 at 7:33

1 Answer 1

1

I don't have this key in my system, so below is for demonstration purpose only, you might need to modify the "reg add" line accordingly.

@echo off &setlocal
set cmd="wmic useraccount where name='%username%' get sid"
for /f "skip=1" %%i IN ( ' %cmd% ' ) DO if not defined SID set "SID=%%i"
echo %SID%

reg add HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\%SID% /v FeatureStates  /t REG_DWORD /d 1

endlocal & @echo on
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .