Skip to content

Commit

Permalink
fixed rare case of ICMP null, prep. for 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
thexmanxyz committed Dec 19, 2017
1 parent 46780cb commit b25494d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Many claim that the reconnect problem leads back to a timing problem during logi
* little knowledge on Windows Task Scheduling

## Download / Installation
1. [Download v1.3.1](https://github.com/thexmanxyz/network-share-reconnecter/releases/download/v1.3.1/nsr.v1.3.1.zip) of the Network Share Reconnecter Package.
1. [Download v1.3.2](https://github.com/thexmanxyz/network-share-reconnecter/releases/download/v1.3.2/nsr.v1.3.2.zip) of the Network Share Reconnecter Package.
2. Extract the files.
3. Modify the sample configuration in the **share_reconnect.vbs** script file.
* At least modify `hostname`, `sharePaths` and `shareLetters` (see also the [configuration section](https://github.com/thexmanxyz/network-share-reconnecter/blob/master/src/share_reconnect.vbs#L41-L43) and [Issue #1](https://github.com/thexmanxyz/network-share-reconnecter/issues/1)).
Expand Down
2 changes: 1 addition & 1 deletion build/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set log_files=0

REM --- Packaging Variables --
set prj_id=nsr
set prj_rev=v1.3.1
set prj_rev=v1.3.2
set prj_fullname=Network Share Reconnecter

REM --- File Variables ---
Expand Down
14 changes: 8 additions & 6 deletions src/share_reconnect.vbs
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,14 @@ Function pingICMPServer(scriptConfig, srvConfig)

online = false
Set ping = scriptConfig.winMgmts.ExecQuery(getWMIPingCmd(scriptConfig, srvConfig))
For each pEle in ping
online = Not isNull(pEle) And Not IsNull(pEle.StatusCode) And pEle.StatusCode = 0
If Not online Then
Exit For
End If
Next
If Not isNull(ping) Then
For each pEle in ping
online = Not isNull(pEle) And Not IsNull(pEle.StatusCode) And pEle.StatusCode = 0
If Not online Then
Exit For
End If
Next
End If

pingICMPServer = Not online
End Function
Expand Down

0 comments on commit b25494d

Please sign in to comment.