Please give this a try and let us know how it works out.

Replace Server1 and Server2 with the correct names


 

;**************** 
;Declare variable and set options
;****************
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
;****************
;Declare variables used in the script
;****************
Dim $servernaam,$Msg,$Txt


;*****************
;Wissen oude shares = delete old shares
;*****************
USE * /DELETE /PERSISTENT ; Unmap all drives


;****************
;Uitzoeken welke inlogserver = find out which login server
;*****************
$servernaam = "" ; Set the server name variable to blank
Select
Case InStr(@LSERVER,'server1')
$servernaam = 'server1'
Case InStr(@LSERVER,'server2')
$servernaam = 'server2'
Case 1
; Unexpected or unknown error
$Msg = MessageBox('Unable to determine logon server. Script will now quit','LOGON ERROR',4112)
Quit @ERROR
EndSelect


;****************
; If Server 1 is the logon server map these drives
;****************
If $servernaam = 'server1'
USE S: '\\' + $servernaam + '\share' ; make share1
USE V: '\\server2\share2' ;make share2
EndIf


;****************
; If Server 2 is the logon server map these drives
;****************
If $servernaam = 'server2'
USE J: '\\' + $servernaam + '\share1'
USE K: '\\' + $servernaam + '\share2'
USE L: '\\' + $servernaam + '\share3'
USE M: '\\' + $servernaam + '\share4'
USE S: '\\' + $servernaam + '\share5'
USE U: '\\' + $servernaam + '\share6'
USE V: '\\' + $servernaam + '\share7'
EndIf


;*****************
;Laat messagebox zien met loggegevens = show messagebox with logindata
;*****************


$Msg = MessageBox('Ready to Logon with following information:'+@CRLF
+'Username: '+@USERID+@CRLF
+'IP:'+@IPADDRESS0+@CRLF
+'Inlogserver: '+$servernaam+@CRLF
+'PC naam: '+@WKSTA+@CRLF
+'Domein: '+@DOMAIN+@CRLF,'Information',4112)


;*****************
;Laat messagebox zien met tekst uit bestand = show messagebox with text out of textfie
;*****************
$Txt = ReadFile('\\server1\Apps\Scripts\test.txt')
$Msg = MessageBox(Join($Txt,@CRLF),'Informatie',0)


;****************
; Function to read the file to be used in the above MessageBox call
;****************
Function ReadFile($file)
Dim $lf, $f, $_, $t
$lf=CHR(10)
$f=FreeFileHandle
$_=Open($f,$file)
If @ERROR Exit @ERROR EndIf
Do $t=$t+$lf+ReadLine($f) Until @ERROR
$_=Close($f)
$ReadFile=Split(SubStr($t,2),$lf)
EndFunction