Automating command prompt combinations
There are two main reasons for the automating of command prompts and associated coding which we have been discussing. One is the obvious time advantage compared with doing the commands manually.
A second important advantage is in consistency of results, since the specific time at which some commands were done were seen to effect the results.
It is easy to Call any combinations of the Functions , along with wait periods in between. Simple macros of this form can be written , Calling on the Functions which we have already developed.
We can further use either buttons or event coding to trigger conveniently various coding combinations.Code:Option Explicit ' ' https://www.myonlinetraininghub.com/pausing-or-delaying-vba-using-wait-sleep-or-a-loop #If VBA7 Then ' Excel 2010 or later Public Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal Milliseconds As LongPtr) #Else ' Excel 2007 or earlier Public Declare Sub Sleep Lib "kernel32" (ByVal Milliseconds As Long) #End If ' '_ ' Calls Sub Calls2() Call ipconfig_release Call Sleep(500) Call ipconfigall_routeprint(" after rel in single rel ren pair") Call ipconfig_renew Call Sleep(500) Call ipconfigall_routeprint(" after ren of single rel ren pair") End Sub
The uploaded file is an initial file version which I am currently using to do some experimenting with XP and SoftEther.
I will probably develop this further and edit this post accordingly.
"Test ipconfig XP.xls" https://app.box.com/s/hk3cl2sp9nmmyigcun71w54vn38xi6zq




Reply With Quote
Bookmarks