News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Repair Connection

Started by 0x401000, November 14, 2009, 06:39:35 PM

Previous topic - Next topic

0x401000

I would like to automate the process fixes connection written here http://www.microsoft.com/windowsxp/using/networking/maintain/repair.mspx. To replace mouse clicks, the program did everything for me. How can this be done in assembly language? Thank you!

fearless

From an article in searchnetworking.com (have to register to see full article) http://searchnetworking.techtarget.com/tip/0,289483,sid7_gci1253613_mem1,00.html these are the steps outlined that are roughly the equivalent of what happens when you use the repair option (partial text taken from the article):

Step 1: DHCP Renew

This step only occurs if the network connection is configured to receive its address automatically using DHCP. If you've configured the connection manually with a static IP address and other TCP/IP settings, this step is skipped. The command-line action that is being performed here is similar to but not identical to the following familiar command:

ipconfig /renew


Step 2: Flush ARP Cache

The command-line action that is being performed in this step is as follows:

arp –d *


Step 3: Flush NetBIOS Cache

The command-line action that is being performed in this step is as follows:

nbtstat –R


Step 4: Flush DNS Resolver Cache

The command-line action that is being performed in this step is as follows:

ipconfig /flushdns


Step 5: Register again with WINS

The command-line action that is being performed in this step is as follows:

nbtstat –RR


Step 6: Register again with DNS

The last command-line action that is performed when you use the Repair feature is this:

ipconfig /registerdns


Hope that helps.
ƒearless

2-Bit Chip

Here is a function from the NDF (Network Diagnostics Framework):

http://msdn.microsoft.com/en-us/library/aa369869%28VS.85%29.aspx

HRESULT Repair(
  [in]   REPAIRINFO *pInfo,
  [out]  LONG *pDeferredTime,
  [out]  REPAIR_STATUS *pStatus
);

0x401000

Try to understand. Thank you!