How to pragram "Let windows keep me connected" for cellular data network?

Shawn Sheng 1 Reputation point
2021-10-18T09:12:31.5+00:00

For cellular network, there is a "Let Windows keep me connected" check box which can be manually checked or unchecked. But we want to check and un-check it by our application.
We find a registry key for this function, Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WwanSvc\DisallowAutoConnectByClient, but can't edit the value even running with administrator.
141344-disallowautoconnectbyclient.png

Are there any ways we can change "Let Windows keep me connected" via programming? Thank you.

Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,261 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,296 Reputation points
    2021-10-20T07:26:55.45+00:00

    Hello ShawnSheng,

    Thank you for your question.

    There might be possibility that the account with which you connect to Azure does not have access to that subscription so it does not sees it at all. Usually when you create Automation Account via Azure Portal RunAs account is created. That RunAs account is actually a Service Principal that is assigned Contributor access but only to the subscription where the Azure Automation account is created. If you have other subscriptions you have to assign access manually or create Automation account in each subscription.

    Please check if you correct permissions with Automation Account or should have a access as a contributor on your storage account.


    --If the reply is helpful, please Upvote and Accept as answer--


  2. Slavy Mihov 0 Reputation points
    2024-02-03T16:53:34.1733333+00:00

    I found this solution (https://learn.microsoft.com/en-us/archive/msdn-technet-forums/1eee2885-1973-4d20-8c42-308802a81828) which touches the following registry keys: cmd /c REG ADD "HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WwanSvc\GroupPolicy" /v "DisableWwanAutoconnect" /t REG_DWORD /d "1" /f cmd /c REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\WwanSvc\GroupPolicy" /v "DisableWwanAutoconnect" /t REG_DWORD /d "1" /f cmd /c REG ADD "HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WcmSvc\GroupPolicy" /v "DisableWwanAutoconnect" /t REG_DWORD /d "1" /f cmd /c REG ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy" /v "DisableWwanAutoconnect" /t REG_DWORD /d "1" /f

    0 comments No comments