;; 
;;=====================================================================================----- 
;; 
;;FUNCTION       SNVerify() 
;; 
;;ACTION         Formats a server name with leading "\\" & trailing "\" 
;; 
;;AUTHOR         Glenn Barnas 
;; 
;;VERSION        1.0  - 2003/08/18 
;; 
;;HISTORY        1.0  - 2003/08/18 - Initial Release 
;; 
;;SYNTAX         SNVerify(server [, Reverse]) 
;; 
;;PARAMETERS     Server - REQUIRED - String 
;;               - The name of target server. 
;; 
;;               Reverse - OPTIONAL - Integer 
;;               - A Boolean that strips all "\" characters if true. 
;; 
;;REMARKS        Used by many registry functions to enable remote access 
;; 
;;RETURNS        Name of server in the format "\\server\"  
;;               With the optional parameter Reverse set to non-zero, all  \  
;;               characters are removed from the beginning and end of the system name. 
;;		 UNC paths are reduced to just the server name! 
;; 
;;DEPENDENCIES   none 
;; 
;;TESTED WITH    NT4, W2K, WXP 
;;               Explicit, NoVarsInStrings 
;; 
;;EXAMPLES       $Server = SNVerify($Server) 
; 
Function SNVerify($_System, Optional $_Reverse)
 
  ; Isolate system name, add leading & trailing slashes if needed 
  $SNVerify = IIf(Not $_Reverse And CStr($_System) <> '', '\\' + Join(Split(CStr($_System), '\'), '', 3) + '\', Join(Split(CStr($_System), '\'), '', 3))
 
  Exit 0
 
EndFunction