Windows 7 : GSM modem auto-connect fails when Roaming

2

1

We have several (15) PCs which we use for data collection and send the data back to our server. Each of these PCs has an internal GSM modem which works great (most of the time).

For economic reasons we have gone with a cut-price supplier of SIM cards which provide data on a Roaming profile. In fact, it is our customer who provides the SIM cards and is reluctant to change supplier.

In the image below, we can see the two network interfaces on the PC :

  • TelenoDK which provides access to the internet.
  • Unidentified network, a local ethernet network used for data collection.

enter image description here

By default Windows shows a warning when connecting to the network. The warning indicates that we are using a Roaming profile and may incur additional charges. Once we click "Roam Anyway" the PC will be connected to the internet.

enter image description here

The problem is that the PCs are in remote locations and there is nobody onsite to click on the warning. We want to configure Windows to never show this warning. Fortunately, this is easy :

enter image description here

enter image description here

The option "Always connect automatically" seems to provide this functionality. Following system startup, the warning is not shown and the PC is connected to the internet without any further input. However it does not work correctly. While the PC connects directly following system startup, if for any reason the PC is disconnected (by loss of signal for example), the warning is shown and we must acknowledge the warning before we can connect to the internet.

Our solution has been to execute a daily restart (Windows Scheduled Tasks) but this is not ideal. Because sometimes we loose the connection during the day and we don't know if there is a problem onsite until the next day, also we have a hole in out data for 10 minutes at midnight every day.

Unfortunately we have been unable to reach Microsoft directly, at least not anyone with knowledge of this process. The MS helpdesk thinks the problem lies with the operator of the phone network or the supplier of the SIM card. We have trouble believing this and on my phone I can configure the settings to use data while roaming and I never need to reconfigure the setting once it has been set.

I am looking for a way to disactivate this warning or at least find a way around the problem so as to resolve the issue for our customer.

klonq

Posted 2018-08-05T10:28:41.193

Reputation: 73

Answers

1

This is easy to solve using AutoHotkey, to create a script that will watch for any appearance of the dialog titled "Connect to a Network" and simulate a click on "Roam Anyway" whenever it appears on the screen.

I assume that the click will dismiss the dialog, or the script below needs to be extended.

Put the following text inside a file named name.ahk (or any other file-name ending with .ahk) :

SetTitleMatchMode, 3        ; A window's title must be an exactly match
CoordMode, Mouse, Client    ; Coordinates are relative to the active window's client area
Loop {                              ; Loop forever
    WinWait Connect to a Network    ; Search a window with this title
    WinActivate                     ; Activate the found window (just in case)
    Click, 55, 65                   ; Click on "Roam Anyway"
}                                   ; End of loop

To test, just launch the script, for example by double-click on the file. When testing, to avoid the script continuously stealing your mouse if the dialog is on the screen, you may delete temporarily the Loop keyword, making it a once-only call. This is not necessary if you can simply dismiss the dialog with the Esc key, which will set the script to searching and effectively disable it until the dialog re-appears. To dismiss the script itself, right-click its tray icon (green H) and choose Exit.

I have set the parameters of the script from your screenshot. This includes in the WinWait command the title of the window to wait for and the X,Y coordinates of the Click command in the client-area of the window.

If you find that these parameters are wrong, to find the right parameters right-click the tray icon (green H) and choose Window Spy. Ensure the dialog is activated and hover the mouse over the point where you want to click. The Window Spy window will contain the exact title under "Window Title" and the right coordinates under "Mouse Position" line "Client".

To have the script run always, put the file name.ahk in the Startup folder.
For more info see the article How to Open the Start Menu Folder in Windows 7 or 10.

harrymc

Posted 2018-08-05T10:28:41.193

Reputation: 306 093

@klonq: Did you try this? – harrymc – 2018-08-31T17:49:04.600

You are late - your bounty has elapsed. – harrymc – 2018-09-03T08:42:17.353