W4RH4WK / Debloat-Windows-10

A Collection of Scripts Which Disable / Remove Windows 10 Features and Apps
Other
6.05k stars 846 forks source link

fix-privacy-settings.ps1 - How to enable mobile hotspot again? #190

Closed s4dmach1ne closed 5 years ago

s4dmach1ne commented 5 years ago

fix-privacy-settings.ps1

Write-Output "Do not share wifi networks"
$user = New-Object System.Security.Principal.NTAccount($env:UserName)
$sid = $user.Translate([System.Security.Principal.SecurityIdentifier]).value
force-mkdir ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid)
Set-ItemProperty ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid) "FeatureStates" 0x33c
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseCredShared" 0
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseOpen" 0

Thanks

W4RH4WK commented 5 years ago

Your problem is that after running the scripts, mobile hotspot does no longer work?

Is this right? Which scripts did you run? Have you made any modifications to them?

s4dmach1ne commented 5 years ago

I need the windows 10 mobile hotspot feature but I executed the "fix-privacy-settings.ps1" without even read what's in it, my bad. Can you help me?

I'm pretty sure these lines of code did it :

> Write-Output "Do not share wifi networks"
> $user = New-Object System.Security.Principal.NTAccount($env:UserName)
> $sid = $user.Translate([System.Security.Principal.SecurityIdentifier]).value
> force-mkdir ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid)
> Set-ItemProperty ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid) "FeatureStates" 0x33c
> Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseCredShared" 0
> Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseOpen" 0

I tried to enable it back by modifying the zeros to the opposite as 'enable' like this :

> Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseCredShared" 1
> Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" "WiFiSenseOpen" 1

Now the mobile hotspot can be turned on, but devices won't connect. I think there's something to do with this line of code :

> Set-ItemProperty ("HKLM:\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features\" + $sid) "FeatureStates" 0x33c

What can i do with this one? Sorry for bothering, thanks. And also thanks for the great work, my windows experience now much smoother than before.

W4RH4WK commented 5 years ago

Okay, try setting FeatureStates to 0x13c, which is the default.

If this does not help, try removing WiFiSenseCredShared and WiFiSenseOpen as they are not present by default.

s4dmach1ne commented 5 years ago

I tried to do as what you said, it's still the same. Hotspot turned on but devices won't connect. Thank you for your respond, i know this is my fault. I read your thread disclaimer that there is no undo, but i'm reckless anyway.

W4RH4WK commented 5 years ago

Looking at the script, there is only one other section I'd associate with your problem. The one about disabling information sharing between unpaired devices.

Looking at my local installation where I didn't use the scripts: Backup everything inside HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess and remove the DeviceAccess folder. Reboot and try again.

Otherwise I am out of ideas.

W4RH4WK commented 5 years ago

Is this resolved? Or should I leave it open?

s4dmach1ne commented 5 years ago

Reinstalled windows 10, fixed. I think there is no undo in that script, just warn ppl to read what the script do. So reckless ppl like me won't "accidentally" disable hotspot tethering permanently.

Thanks for your support!