Page 7 of 17 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 165

Thread: VPN Forum access and IP addresse Tests

  1. #61
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10




    Setting up Soft Ether ( XP)
    Introduction

    I recommend starting with SoftEther: It is slightly easier to install than OpenVPN, and usually requires less information from your provider.

    The explanations assume that you have registered an account with hide.me.
    But if you are using a different provider, only the steps related to your Username, Password and finding Host Name at your registered account will usually be different ( UsernamePasswordHostname.jpg : https://imgur.com/fXtxVWM , https://imgur.com/zMZmqit , https://imgur.com/7huFyW2 , https://imgur.com/rXWYAyz )

    Some tips before starting
    _1) Set up just 1 – 2 Servers initially.
    After the initial instillation, some steps need to be repeated for each Server that you want to connect to in order to “hide behind” it. You finally have a list of Servers to choose from.
    It is advisable to just initially try out the software with 1 – 2 Servers closest to your actual location. In the early testing and learning how to adjust various settings, you may well likely encounter problems , some of which may require a de instillation and re instillation of software. After re installation you will need to repeat those steps.
    So until you have a good understanding and stable running VPN system it may be advisable not to make many connections. 1-2 are enough to test out the system, and you would otherwise possibly need to repeat work unnecessarily.
    _2) Make a list of all or some of you internet providers Server internet addresses. Along with your Username and Password you will need this info at various stages.


    Setting up Soft Ether
    The initial step is usually to download the SoftEther .exe file and open / run it which will guide you through installing the SoftEther Client.

    I have used these successfully:
    softether-vpnclient-v4.30-9696-beta-2019.07.08-windows-x86_x64-intel.exe Build 4.30.9696 : https://app.box.com/s/got5jknov33p9x8ky8951d0dhxc0hac1 :
    softether-vpnclient-v4.19-9605-beta-2016.03.06-windows-x86_x64-intel.exe : https://app.box.com/s/nj2rk76riakcpyg280fax35nmb7jev1q


    The instillation is fairly typical and self explanatory. Any of the suggested tutorials show the steps.

    _2) Network connection organisation in Windows.
    _2a) Network connections.
    A basic understanding of Network connections in modern computers is very useful when using and setting up VPN since many issues and problems are associated with these things.
    The true inner workings of Microsoft Windows may in the meantime not be understood anymore by anyone. Physical connections and actual connector ports, whether physical connection or the arial/antenna for a connection such as WLAN, are all combined deep in the low level software.
    An attempt is made in the control panel software to give some organisation of this in a User friendly interface, the Network Connections console, https://imgur.com/sKLn3eb
    _2b) Make a desktop icon for quick access of the Network Connections console.
    You will likely frequently want to access this when first getting VPN up and running. It is a bit hidden amongst similar consoles, so you will save yourself sometime if you make a desktop icon link so as to get quickly at it.
    To do this in xp: ( The exact steps may be slightly different on different XP versions )
    Either
    _2b)(i)
    Via Control Panel --- Control Connections navigation
    Either
    (left) mouse click on the Microsoft Start button bottom left, and navigate to Control panel , https://imgur.com/sOpJ6ms , https://imgur.com/udmq5Fa , https://imgur.com/laCEZuo
    Or
    use the command window way : To get that command window :
    Hit the Microsoft Key + r, then type in cmd followed by OK https://imgur.com/sMOSbte
    Then type in control , followed by Enter

    Once you are in the Control Panel and have the list of available consoles, https://imgur.com/laCEZuo , then first left mouse click on Network Connections, then right mouse click on the Network Connections and select the option to make a quick access link https://imgur.com/BwktnNi
    After this, a desktop icon should appear: https://imgur.com/4uDNTdr
    Or
    _2b(ii) Using Desktop --- New – Link . To do this:
    Right mouse click anywhere on a spare space on the desktop, and select from the options in the pop up, new --- link : https://imgur.com/S4zTU6g
    Another pop up should come up. First type in ncpa.cpl , https://imgur.com/khfMD4P , then in the next window you can give it any name you like, such as Network Connections, https://imgur.com/n2Z1toj .
    After this, a desktop icon should appear: https://imgur.com/xXTOJkL

    2c) Network Adaptors.
    2c)(i) What are they
    Typically, each way you have to connect with the internet or other networks, will be represented by a separate thing in the Network Control Console. (You can select typically from 5 different ways to view these by selecting from a drop down list in the top toolbar of the Network Control Console window, https://imgur.com/sHRZuA2 )
    The name given for these things are like Tap / and or adaptor or Network adaptor or Virtual Network Adaptor. These names are approximately consistent with an attempt to represent these virtual things with what might be there real life equivalent in the absence of computers.
    Often when you install a VPN Client on your computer, it will install its own adaptor: It is the thing which allows you to connect some thing to your computer. It will somehow contain various settings, adjustments, encoding, transitions etc…

    As example of typical adaptor views on one of my XP computers, here are two views of the Network Control Console showing 5 things, 4 of which are similar
    https://imgur.com/5BcWHDi , https://imgur.com/sfu8wzx
    At this stage the computer has no VPN client software installed
    These adaptor things basically allow access to all the settings and information required to make work the particular connection that is representing/referring to.
    These adaptors can be set up from scratch , but that would require a lot of low level Computer Network knowledge. Usually they are created automatically when either software is installed, or by physically connecting things to a computer.
    In the example from the last screenshots, the last 2 of the 4 similar things were already on the computer as I purchased it second hand. I am not sure what actual thing and/ or process is that they represent. The first two represent my house “Router”, which is the “box” which is connected to my telephone line and somehow along with those 2 adaptors provides me with internet. I never had anything to do with making them appear: I expect somehow they were automatically made the first time I tried to use internet on my computer. The first , which was in use as I made those screenshots allows use via WLAN. The second would allow connection via a LAN RJ45 type cable, and would typically start working if I physically connected such a LAN RJ45 type cable between the router and my computer.
    If now I connect a USB Internet “Dongle” stick to my computer, then I notice that another adaptor appears: https://imgur.com/bKC2Jgi

    C2c)(ii) States of Network adaptors.
    As with some computer things, the “On” and “Off” states are not always clear, and a source of confusion.
    _ You could consider “On running” or “On in use” as when the adaptor is actually in use. This will usually be indicated by
    the absence of a red cross on the device in some of the picture type views,
    or
    in some of the list views as “connected”.
    Note that this will usually , but not always , mean that it is doing what you would regard as “working” and giving you, for example, a working internet.
    Occasionally this “On” state might be referred to as active and enabled, but that is a bit confusing considering the next state:
    _ Another state is usually referred to as Enabled or Activated. This could be regarded as ready for use and likely to start running easily.
    _ A final state is known as something like Disabled or Deactivated. An adaptor may be disabled/deactivated by right-clicking on it in the Network Control Console window and selecting Disable/Deactivate. Disabling the device will automatically disconnect any connection to that device.

    Deactivating and reactivating an adaptor may loose some information held by it, or loose and then replace information. The latter can be a form of resetting which occasionally solves strange problems with a connection, and note that this might not always be the same adaptor which caused the problem. More on that later when discussing typical problems.

    C2c)(iii) Adaptor Properties.
    Right-clicking on an adapter in the Network Control Console window and choosing Properties will bring up the more advanced properties of network connections and adapters.
    You will likely need to access that occasionally when getting familiar with VPN things: Instillation of the SoftEther Client software will typically create an adaptor. That Adaptor will “take over” control and be the “On running” connection when you choose to use the SoftEther VPN. It may also effect other adaptor settings. Checking properties of adaptors can often help in solving problems with VPN stuff. Once again, you may need to check an adaptor other than the VPN adaptor to solve strange unexpected problems in either VPN stuff, or problems in your normal non VPN internet, which occur after you have been doing VPN stuff.














    Ref
    https://tweaks.com/windows/39156/cre...k-connections/
    Config files : http://www.frostvpn.com/clients/know...and-usage.html
    https://oit.ncsu.edu/my-it/resnet/ip...in-windows-xp/
    https://www.sciencedirect.com/topics...ork-connection






  2. #62
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10

    Installing SoftEtherVPN on a computer with operating system Windows XP

    flflffhh
    Last edited by DocAElstein; 11-18-2021 at 05:32 PM.

  3. #63
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10

    Installing SoftEtherVPN on a computer with operating system Windows XP

    slkfjlkfjlkjfjfslkjf
    Last edited by DocAElstein; 11-18-2021 at 05:36 PM.

  4. #64
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10
    Last edited by DocAElstein; 11-18-2021 at 05:37 PM.

  5. #65
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10

    Problems with SoftEtherVPN on a computer with operating system Windows XP

    Problems with SoftEtherVPN on a computer with operating system Windows XP





    Problems with SoftEther connections in XP and work arounds
    _1) Endless prompt to log in by first use of a connection.
    Usually the first attempt to make a connection leads to an endless repeating prompt to give your Password , https://imgur.com/1TG4SV6 , https://imgur.com/KYOOtBo
    If this occurs, which in XP usually does, then you will have to wait for approximately a day. Usually after this, the problem is gone.
    _2) 10 minute settling down time
    Once you have got rid of Problem _1) , then usually connections do then appear to be successful. But almost always they break , disconnect and reconnect automatically a few times. It always best to ignore this for about 10 minutes , after which it settles down and the connection I usually stable.
    _3) Time out error.
    If you have not made any attempts at a VPN SoftEther connection on your XP computer for a few days then you may have a working internet after the initial settling down period.
    Otherwise you will usually get a Time out error, https://imgur.com/bLwfPqc , https://imgur.com/POQx7OF , https://imgur.com/5VVrVsX
    This means, that, although you may appear to have a successful connection, you find that internet does not work. You typically get a time-out error, https://imgur.com/bLwfPqc , https://imgur.com/POQx7OF , https://imgur.com/5VVrVsX

    I made many experiments with different computers , and always experience these connectivity problems with SoftEther on XP devices.

    So far, the best workaround which will most likely get you a connection and a working internet is the following:

    _3a) Either
    De activate and re activate the Network connector for your typically working non VPN Internet .
    Or
    Restart your computer

    ( After doing this, wait until you have a normal working internet ( without VPN )

    _3b) Make a connection to a Server, via the SoftEther VPN Client Manager , https://imgur.com/ZnnEdSm

    _3c) Wait approximately 10 minutes

    _3d) if you now have the time out error in internet then..
    _3d)(i) Bring up the black command window,
    ( using keyboard Keys: [MicrosoftSymbol] + [ r ] , then type cmd , then hit OK ) https://imgur.com/62pUXTh
    _3d)(ii) Type the following 4 commands, fairly quickly
    ipconfig /release Enter
    ipconfig/ renew Enter
    ipconfig /release Enter
    ipconfig/ renew Enter

    https://imgur.com/juzxT3C , https://imgur.com/9bP3hGw


    Often, after a long time period of a working connection, the time-out problem may suddenly occur. This will often occur when a connection breaks and re connects automatically
    Occasionally, you may find that the double
    ipconfig/ release Enter
    ipconfig /renew Enter
    pair of 3d) , without the 3a)-3c) , will recover this situation of a connection with internet time out error.


    Occasionally, no work around will get you a working connection. There seems to be some mechanism/s, known or unknown, in place which reduce the likelihood of a successful connection by increased attempts a connection. So if you are beginning to have problems with a connection, then you can slip into a vicious circle if you try more and more.
    If you do not easily get a connection in the first 15 minutes, then it is best to give up for a day or so on that particular computer with SoftEther.
    If you need to be able to reliably get a connection via VPN at an time, then I would suggest that you should have a minimum of two computers available with at least two independent methods for getting a connection on each computer.



    _4) Problem with your normal ( non VPN ) internet, most likely caused by a current or recent VPN connection.
    You may hit a problem like this: You appear to have a typical situation which is known to you as your typical working system/Router/WLAN connection, etc., with a routinely healthy looking connection to your normal internet. This is the usual situation which almost always for you results in a working internet. ( For example: This is a typical indication of a healthy Internet WLAN connection which usually results in a working internet for me: )
    However, in such a situation a computer may untypically give an error suggesting that there is no internet connection. (You may or may not at this time be able to get a working VPN connection on that computer, and most likely other computers, if you have them, may have a working internet as typically expected.
    This may be the cause of the problem:
    At some point the VPN software has required to fix temporarily some values in your internet source, which are usually set at dynamic/non fixed . Usually the VPN would reset to the typical dynamic/non fixed at some point. Occasionally this resetting may have not taken place.
    For example.
    Get the Network Connections Console up, as described in previous sections. Here is an example of one of my xp computers: https://imgur.com/bb2hYZJ
    Right mouse click on the representation of your internet, in my example the WLAN connection to my house Router: https://imgur.com/89KZoYs
    After Right mouse clicking, select Properties in the List of options which should have come up.
    Look in the list for things of the IP and / or TCP nature. Most likely there will be one for something like Internetprotokoll TCP/IP, https://imgur.com/yahJIAQ , which is currently ticked
    Left mouse click on the text to the right of the ticked box.
    Then click on the Properties button. Selecting the Properties button should bring up a second Window. Typically you will see in such a window radio buttons selected which indicate of some form of automated selection, https://imgur.com/1GaOgcK
    ( If this Properties button is grayed out, then you may need to disable/deactivate the connection, or possibly close something else. A pop up might advise you on what action should be taken, when initially you left mouse clicked on the representation of your internet in the Network Connections Console.
    If , instead of automatic options selected, you see something like this: https://imgur.com/r071G6X , then this is likely the cause of your strange internet problem.
    If you change the settings to automatic, them typically your internet will immediately start working as normal.







    Ref
    https://www.askvg.com/category/windows-xp/
    https://hide.me/de/support



  6. #66
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10
    Last edited by DocAElstein; 11-18-2021 at 05:38 PM.

  7. #67
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10
    Further notes to XP SoftEther problems....
    Automating fixes and investigations in XP


    Information as text string, programmatically obtaining
    In addition to time saving, advantages of automating the fixes discussed allow for more consistent results, since it was apparent from initial investigations that the timing at which commands such as ipconfig /release and ipconfig/ renew where typed manually seemed to have an effect.

    It turns out that automating off theses commands via VBA is very simple, in principle a single code line does the main action http://www.eileenslounge.com/viewtop...=33775#p261628
    of doing the command, and additionally storing the contents displayed as a result of the command, into a text file

    Further manipulation of the text file information
    Using VBA lends itself to bringing the data into a convenient form into Excel such as in columns for ease of comparing.
    When doing this manually, some untidy behavior was sometimes seen, such as extra unnecessary blank lines and information spilling into adjoining columns. So some initial investigation into the actual build up of the text file is useful.
    The complete text in a text file, or a column in Excel , is actually just a single long text string. The different “lines” of text as we perceive it is made possible by the inclusion “invisible characters” of the so called “line feed” and / or “carriage return” form. If we analyze typical strings in detail then this will help us in deciding how to manipulate them in order to get consistent / tidy results
    We need to first produce a simple long text string, which we can then analyze, for example using this coding: http://www.excelfox.com/forum/showth...ts-of-a-string
    The following macro example, will give us the required complete string for ipconfig /all in variable strIPcon

    Code:
      Sub cmdconsoleContentsToString()
        Shell "cmd.exe /c ""ipconfig /all > """ & ThisWorkbook.Path & "\ipconfig__all.txt"""""
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\ipconfig__all.txt"
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Analyse string
    Call WtchaGot(strIn:=strIPcon)
    End Sub 
    ( Sub WtchaGot(ByVal strIn As String) can be found here : http://www.excelfox.com/forum/showth...ll=1#post10946

    The results from Sub WtchaGot( ) can be used in analyzing the text format given out by the command prompt code live.

    Alternatively, if you already have the results in a text file, then you use the same basic coding without the initial commend prompt code line. You will need to know the file name and location of the text file.
    Code:
    Sub StringContentsFromTextfile()
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\test1B"
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Analyse string
    Call WtchaGot(strIn:=strIPcon)
    End Sub


    Some Examples:
    When trying to compare some similar measurements for Vista and XP operating systems, two annoying characteristics were noticed
    _ In XP there seemed to be extra lines, XP Extra Blank Lines.JPG : https://imgur.com/flm1pjQ

    Looking at the first part of a typical Vista output from Sub WtchaG( ) , we see this First Part of Typical Vista Output ipconfig all.JPG , https://imgur.com/Zxkyxkq

    vbCr & vbLf & "Windows" & "-" & "IP" & "-" & "Konfiguration" & vbCr & vbLf & vbCr & vbLf & " " & " " & " " & "Hostname" & " " & "…………..
    Comparing that with a similarly generated text in XP we see this First Part of Typical XP Output ipconfig all.JPG : https://imgur.com/nXtTeQH

    vbCr & vbCr & vbLf & "Windows" & "-" & "IP" & "-" & "Konfiguration" & vbCr & vbCr & vbLf & vbCr & vbCr & vbLf & " " & " " & " " & " " & " " & " " & " " & " " & "Hostname" & "."…………….
    Clearly we see in the XP output a doubling of vbCr where we might more typically see a single vbCr
    We can use a simple VBA code line to easily replace double occurrences of vbCr with a single vbCr

    _ Spilling into neighboring columns when pasted into Excel
    Another annoyance shows up as contents spilling into neighboring columns when pasted into Excel : XP Spilling into neighboring columns.JPG : https://imgur.com/8aWq5uj
    Examining parts of the offending string, we see that there are some occurrences of vbTab, XP Spilling into neighboring columns due to vbTab.JPG :
    …………" & " " & " " & "192" & "." & "168" & "." & "2" & "." & "105" & vbTab & " " & " " & "25" & vbCr & vbLf………..
    In sinple text, vbTab is used as a sort of ordered positioning separation by empty spaces. Unfortunately , VBA uses them to indicate a cell vertical wall.
    To overcome this problem we can use a simple VBA code line to easily replace occurrences of vbTab with a few empty spaces.


    A final code to tidy the text given, by a command such as ipconfig /all , would have this form:
    Code:
    Sub cmdconsoleContentsToStringTidy() '  http://www.excelfox.com/forum/showthread.php/2384-VPN-Forum-access-and-IP-addresse-Tests?p=11568&viewfull=1#post11568
     Shell "cmd.exe /c ""ipconfig /all > """ & ThisWorkbook.Path & "\ipconfig__all.txt"""""
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\ipconfig__all.txt"
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Tidy the string
     Let strIPcon = Replace(strIPcon, vbCr & vbCr, vbCr, 1, 1, vbBinaryCompare)
     Let strIPcon = Replace(strIPcon, vbTab, "   ", 1, 1, vbBinaryCompare)
    End Sub












    _




    Last edited by DocAElstein; 11-18-2021 at 05:38 PM.

  8. #68
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10
    Further notes to XP SoftEther problems....



    Automating fixes and investigations in XP

    Bringing results into Excel File
    It is convenient to bring the text results into an excel column.
    Manually we do this by simply pasting into a single cell: Because the text string has already got a degree of formatting into lines via the vbCr & vbLf s , this is recognized by Excl, since excel also uses the convention of vbCr & vbLf as the line separator or, as Excel sees it, as a horizontal cell wall border.
    So we simply need to add a few code lines to put the text string into the clipboard, and then paste into a convenient cell in Excel.
    ( A few probllems were encountered when adding some extra information. These are the subject of some other forum posts, for example: https://www.eileenslounge.com/viewto...p?f=18&t=33834 )

    Code:
    Sub cmdconsoleContentsToExcel() '  http://www.excelfox.com/forum/showthread.php/2384-VPN-Forum-access-and-IP-addresse-Tests?p=11569&viewfull=1#post11569
     Shell "cmd.exe /c ""ipconfig /all > """ & ThisWorkbook.Path & "\ipconfig__all.txt"""""
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\ipconfig__all.txt"
     ' Let PathAndFileName = ThisWorkbook.Path & "\test2B.txt"  '  Al
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Tidy the string
     Let strIPcon = Replace(strIPcon, vbCr & vbCr, vbCr, 1, 1, vbBinaryCompare)
     Let strIPcon = Replace(strIPcon, vbTab, "   ", 1, 1, vbBinaryCompare)
    ' add any extra info to string
      Let strIPcon = vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & """" & Format(Now, "DD MMM YYYY") & " " & vbLf & " " & Format(Now, "hh mm ss") & """" & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & strIPcon  ' vbLf is recognised as a new line within an Excel"
    ' String content check
    ' Call WtchaGot(strIPcon)
    ' put the text in the clipboard
    Dim objDataObject As Object: Set objDataObject = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
    objDataObject.SetText strIPcon: objDataObject.PutInClipboard
    
    ' Excel Worksheet
    Dim Ws As Worksheet: Set Ws = ActiveSheet
    Dim Clm As Range, NxtClm As Long
     Set Clm = Ws.Cells.Find(What:="*", After:=Ws.Range("A1"), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False)
        If Clm Is Nothing Then
         Let NxtClm = 1
        Else
         Let NxtClm = Clm.Column + 1
        End If
    ' Put in next free column in Active sheet
     Ws.Paste Destination:=Ws.Cells.Item(1, NxtClm)
     Ws.Columns.AutoFit: Ws.Rows.AutoFit
    
    
    End Sub
    




    The next coding has a section to add the results obtained in the command window for the command route print

    Code:
    Sub ipconfigall_routeprint() '
    Rem 1 ipconfig /all
     Shell "cmd.exe /c ""ipconfig /all > """ & ThisWorkbook.Path & "\ipconfig__all.txt"""""
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\ipconfig__all.txt"
     ' Let PathAndFileName = ThisWorkbook.Path & "\test2B.txt"  '  Al
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Tidy the string
     Let strIPcon = Replace(strIPcon, vbCr & vbCr, vbCr, 1, 1, vbBinaryCompare)
     Let strIPcon = Replace(strIPcon, vbTab, "   ", 1, 1, vbBinaryCompare)
    ' add any extra info to string
      Let strIPcon = vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & """" & Format(Now, "DD MMM YYYY") & " " & vbLf & " " & Format(Now, "hh mm ss") & """" & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & strIPcon  ' vbLf is recognised as a new line within an Excel"
    ' String content check
    ' Call WtchaGot(strIPcon)
    ' put the text in the clipboard
    Dim objDataObject As Object: Set objDataObject = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
    objDataObject.SetText strIPcon: objDataObject.PutInClipboard
    
    ' Excel Worksheet
    Dim Ws As Worksheet: Set Ws = ActiveSheet
    Dim Clm As Range, NxtClm As Long
     Set Clm = Ws.Cells.Find(What:="*", After:=Ws.Range("A1"), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False)
        If Clm Is Nothing Then
         Let NxtClm = 1
        Else
         Let NxtClm = Clm.Column + 1
        End If
    ' Put in next free column in Active sheet
     Ws.Paste Destination:=Ws.Cells.Item(1, NxtClm)
    ' Ws.Columns.AutoFit: Ws.Rows.AutoFit
    
    Rem 2 route print
     Shell "cmd.exe /c ""route print > """ & ThisWorkbook.Path & "\route_print.txt"""""
    ' Get the entire text file as a string
     Let FileNum = FreeFile(1) '
    Dim strrouteprint As String
     Let PathAndFileName = ThisWorkbook.Path & "\route_print.txt"
     ' Let PathAndFileName = ThisWorkbook.Path & "\test2B.txt"  '  Al
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strrouteprint = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strrouteprint
      Close #FileNum
    ' Tidy the string
     Let strrouteprint = Replace(strrouteprint, vbCr & vbCr, vbCr, 1, 1, vbBinaryCompare)
     Let strrouteprint = Replace(strrouteprint, vbTab, "   ", 1, 1, vbBinaryCompare)
    ' put the text in the clipboard
    objDataObject.SetText strrouteprint: objDataObject.PutInClipboard
    ' Excel Worksheet
    Dim Lr As Long: Let Lr = Ws.Cells(Ws.Rows.Count, NxtClm).End(xlUp).Row
    ' Put in next free column in Active sheet
     Ws.Paste Destination:=Ws.Cells.Item(Lr + 30, NxtClm)
     Ws.Columns.AutoFit: Ws.Rows.AutoFit
    
    End Sub





    Typically , ipconfig/ all and route print are done together to get information concerning a connection.
    A code version here, http://www.excelfox.com/forum/showth...ll=1#post11834 , combines the two macros and the two sets of info is pasted out to the same column, with the and route print info under the ipconfig/ all info.
    In addition the coding calls some Functions which give some extra information , such IP address, computer name. Details to those Functions is given here : http://www.excelfox.com/forum/showth...ll=1#post11672




    Ref
    http://eileenslounge.com/viewtopic.p...=31395#p243002




    Last edited by DocAElstein; 11-18-2021 at 05:39 PM.

  9. #69
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10
    Further notes to XP SoftEther problems....





    Other useful command prompt commands when experimenting with VPN are ipconfig /release and ipconfig /renew

    Here is are a pair of macros to give a similar Excel column output for the commands are ipconfig /release and ipconfig /renew


    Code:
    
    '
    Sub ipconfig_release() '
    Rem 1 ipconfig /all
     Shell "cmd.exe /c ""ipconfig /release > """ & ThisWorkbook.Path & "\ipconfig_release.txt"""""
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '      ' The "highway/ street/ link" to be built to transport the text will be given a number. It must be unique. So we use for convenience, the Freefile function: it returns an integer that represents the next file number that the Open statement can use.  The optional argument for the range number is a variant that is used to specify a range from which the next free file number is returned. Enter a value of data type 0 (default) to return a file number in the range 1 - 255 inclusive. Enter 1 to return a file number in the range 256 - 511.   https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/freefile-function  . Note also : Use file numbers in the range 1-255, inclusive, for files not accessible to other applications. Use file numbers in the range 256-511 for files accessible from other applications
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\ipconfig_release.txt"
     ' Let PathAndFileName = ThisWorkbook.Path & "\test2B.txt"  '  Al
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Tidy the string
     Let strIPcon = Replace(strIPcon, vbCr & vbCr, vbCr, 1, -1, vbBinaryCompare)
     Let strIPcon = Replace(strIPcon, vbTab, "   ", 1, -1, vbBinaryCompare)
    ' add any extra info to string
    Dim PublicIP As String: Call PubicIP(PublicIP)
      Let strIPcon = "ipconfig /release  " & vbCr & vbLf & ComputerName & vbCr & vbLf & GetIpAddrTable & vbCr & vbLf & PublicIP & vbCr & vbLf & vbCr & vbLf & """" & Format(Now, "DD MMM YYYY") & " " & vbLf & " " & Format(Now, "hh mm ss") & """" & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & strIPcon      ' vbLf is recognised as a new line within an Excel"
    ' String content check
    ' Call WtchaGot(strIPcon)
    ' put the text in the clipboard
    Dim objDataObject As Object: Set objDataObject = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
    objDataObject.SetText strIPcon: objDataObject.PutInClipboard
    
    ' Excel Worksheet
    Dim Ws As Worksheet: Set Ws = ActiveSheet
    Dim Clm As Range, NxtClm As Long
     Set Clm = Ws.Cells.Find(What:="*", After:=Ws.Range("A1"), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False)
        If Clm Is Nothing Then
         Let NxtClm = 2
        Else
         Let NxtClm = Clm.Column + 1
        End If
    ' Put in next free column in Active sheet
     Ws.Paste Destination:=Ws.Cells.Item(1, NxtClm)
     Ws.Columns.AutoFit: Ws.Rows.AutoFit
     ActiveWindow.Panes(2).Activate
     Ws.Cells.Item(1, NxtClm).Select
    
    End Sub



    Code:
    
    '
    Sub ipconfig_renew() '
    Rem 1 ipconfig /all
     Shell "cmd.exe /c ""ipconfig /renew > """ & ThisWorkbook.Path & "\ipconfig_renew.txt"""""
    ' Get the entire text file as a string
    Dim FileNum As Long: Let FileNum = FreeFile(1) '        ' The "highway/ street/ link" to be built to transport the text will be given a number. It must be unique. So we use for convenience, the Freefile function: it returns an integer that represents the next file number that the Open statement can use.  The optional argument for the range number is a variant that is used to specify a range from which the next free file number is returned. Enter a value of data type 0 (default) to return a file number in the range 1 - 255 inclusive. Enter 1 to return a file number in the range 256 - 511.   https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/freefile-function  . Note also : Use file numbers in the range 1-255, inclusive, for files not accessible to other applications. Use file numbers in the range 256-511 for files accessible from other applications
    Dim PathAndFileName As String, strIPcon As String
     Let PathAndFileName = ThisWorkbook.Path & "\ipconfig_renew.txt"
     ' Let PathAndFileName = ThisWorkbook.Path & "\test2B.txt"  '  Al
      Open PathAndFileName For Binary As #FileNum 'Open Route to data. Binary is a fundemental type data input...
        strIPcon = VBA.Strings.Space$(LOF(FileNum)) '....and wot recives it hs to be a string of exactly the right length
        Get #FileNum, , strIPcon
      Close #FileNum
    ' Tidy the string
     Let strIPcon = Replace(strIPcon, vbCr & vbCr, vbCr, 1, -1, vbBinaryCompare)
     Let strIPcon = Replace(strIPcon, vbTab, "   ", 1, -1, vbBinaryCompare)
    ' add any extra info to string
    Dim PublicIP As String: Call PubicIP(PublicIP)
      Let strIPcon = "ipconfig /renew  " & vbCr & vbLf & ComputerName & vbCr & vbLf & GetIpAddrTable & vbCr & vbLf & PublicIP & vbCr & vbLf & vbCr & vbLf & """" & Format(Now, "DD MMM YYYY") & " " & vbLf & " " & Format(Now, "hh mm ss") & """" & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & vbCr & vbLf & strIPcon      ' vbLf is recognised as a new line within an Excel"
    ' String content check
    ' Call WtchaGot(strIPcon)
    ' put the text in the clipboard
    Dim objDataObject As Object: Set objDataObject = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
    objDataObject.SetText strIPcon: objDataObject.PutInClipboard
    
    ' Excel Worksheet
    Dim Ws As Worksheet: Set Ws = ActiveSheet
    Dim Clm As Range, NxtClm As Long
     Set Clm = Ws.Cells.Find(What:="*", After:=Ws.Range("A1"), LookAt:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, MatchCase:=False)
        If Clm Is Nothing Then
         Let NxtClm = 2
        Else
         Let NxtClm = Clm.Column + 1
        End If
    ' Put in next free column in Active sheet
     Ws.Paste Destination:=Ws.Cells.Item(1, NxtClm)
     Ws.Columns.AutoFit: Ws.Rows.AutoFit
     ActiveWindow.Panes(2).Activate
     Ws.Cells.Item(1, NxtClm).Select
    
    End Sub
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    




    Last edited by DocAElstein; 11-18-2021 at 05:39 PM.

  10. #70
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,313
    Rep Power
    10



    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.

    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
    
    We can further use either buttons or event coding to trigger conveniently various coding combinations.



    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





    Last edited by DocAElstein; 11-18-2021 at 05:40 PM.

Similar Threads

  1. Table Tests. And Thread Copy Tests No Reply needed
    By DocAElstein in forum Test Area
    Replies: 1
    Last Post: 11-20-2018, 01:11 PM
  2. Table Tests. And Thread Copy Tests No Reply needed
    By DocAElstein in forum Test Area
    Replies: 1
    Last Post: 11-20-2018, 01:11 PM
  3. New Forum Style
    By Admin in forum Public News
    Replies: 2
    Last Post: 05-16-2014, 11:34 AM
  4. Forum performances
    By Loser Who Got Kicked Where The Sun Don't Shine in forum Greetings and Inception
    Replies: 1
    Last Post: 01-03-2013, 07:50 PM
  5. Replies: 2
    Last Post: 09-08-2012, 10:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •