Вопрос

Using Rundll32.exe in Windows XP

Can I pass some arguments like "Yes to all prompts" or "Return key to all prompts" to such commands?

Like we do while copy/pasting files and overwriting, etc.

Edit: DLL in question:

C:\Program Files\Sony Ericsson\Sony Ericsson PC Suite\RasCnxMngr.dll

Command to open a GPRS session using saved connection is:

C:\WINDOWS\system32\Rundll32.exe RasCnxMngr.dll,Rundll_Dial Aitel_GPRS

I've little knowledge about DLLs. However, opening the DLL in binary mode I could find below strings together with "Rundll_Dial":

RasCnxMngr.dll
Rundll_Dial
RasCM_CreateView
RasCM_ModuleInquire
RasCM_RemoveAllConnection
RasCM_RemoveConnection
_RasCM_ClearConnectionStatistics@4
_RasCM_Connect@16
_RasCM_Connection@12
_RasCM_ConnectionProperties@12
_RasCM_ConnectionWizard@12
_RasCM_Disconnect@4
_RasCM_Disconnection@8
_RasCM_EnumConnections@12
_RasCM_EnumConnectionsEx@16
_RasCM_GetConnectStatus@4
_RasCM_GetConnectionStatistics@8
_RasCM_GetConnectionStatus@8
_RasCM_GetDefaultConnection@4
_RasCM_GetFallbackConnection@8
_RasCM_GetRASHandle@4
_RasCM_HideConnections@4
_RasCM_Init@8
_RasCM_InitEx@12
_RasCM_ReadConnectionData@12
_RasCM_SetModemInfos@8
_RasCM_Uninit@4
_RasCM_ViewConnections@12
_RasCM_ViewLog@12

I would like to disconnect current connection and reconnect after a minute. Also, to suppress all prompts/confirmations.

Это было полезно?

Решение

Let me explain the scenario before arival at the solution.

  1. It's about connect/disconnect of GPRS sessions using a Mobile phone with an Indian Telecom Service Provider.
  2. It's a dial-up service which involves PPP.
  3. Windows XP, SP3 and with Sony Ericsson PC Suite

Problem: Usually when operator services requests over GPRS, they keep a validated session to bill accordingly. When session is closed so should be connection. Sometimes, my operator kept connection open but session closed. All the requests were dropped(not sure how). Usual session period is/was 50 minutes, after which I used to make a Dial-Up call using scheduled tasks. DLL approach was not helping as explained in the question.

However, few days back I came across, "rasdial" utility. Below two simple lines addressed the problem easily:

rasdial "AirTel_GPRS" /DISCONNECT

rasdial "AirTel_GPRS"

I've a created a .bat file with above commands, scheduled it every 50 minutes. Now I've an almost uninterrupted GPRS connection for downloads. :-)

MicroSoft WinXP - Rasdial

And sevaral posts on stackoverflow regarding rasdial.

Thank you.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top