ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Script to edit registry setting all network profiles to private

(1/3) > >>

questorfla:
I know in a general way what I need to do but not exactly how to get there and do it


--- Code: Text ---HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profilesif possible locate the wireless profile currently in useif not check each profile for a key called categoryif there is one set the value 1 for Privateif one does not exist create it and set it to 1If it was possible to find and set only the active WiFi profile then exit nowif that was not possible continue to the next profile until all are set to Private
Unless their is a reason that this could be problematic, it will definitely fix something instantly untili canget to the User to do a better job.

This is a situation that has begun to appear often in Windows 10, usually on older systems that were upgraded but sometimes on new Windows 10 laptops.  When it happens, I need to be able to tell the user to click a .bat or .reg file that would set everything to PRIVATE until I can get to their station to do it right and find out what caused the problem in the first place.  When they are shown using a PUBLIC connection they are blocked from most office networked items like Printers etc.

I won't know the exact profile name to use for their system and if a way can be added to make this change occur only on the WiFi profile currently in use, that would be best.
The wired profiles automatically say Private but on these same systems, connecting their Wired connection does not release the WiFi as it should.  Worse, many new laptops no longer provide for a wired network at all.

Stoic Joker:
Restarting the Network Location Awareness service (and/or setting its startup type to delayed start) can help with that sort of thing.

...As would that 'D' word thing you're tired of us mentioning. ;)

questorfla:
Like "duh"? :)

This is for those times when I get tired of people who cant at least wait 5 minutes for me to get from the 2nd floor to the 5th floor to see what the heck they did to cause it. They just want to Print and don't care that I am not psychic, cannot levitate nor teleport.   They are also the ones who complained the most when I suggested we shift to a Domain network because they are 'afraid' that IT will be 'spying' on them.  :'(

When they have a problem it is "spying' they want though.

x16wda:
...As would that 'D' word thing you're tired of us mentioning.
-Stoic Joker (April 29, 2016, 03:34 PM)
--- End quote ---
Delete user account?  :huh:

4wd:
For the current active connection, in an elevated PowerShell console:


--- Code: PowerShell ---$net = get-netconnectionprofile;Set-NetConnectionProfile -Name $net.Name -NetworkCategory Private

Navigation

[0] Message Index

[#] Next page

Go to full version