;================================================================================================
; Sets the default proxy username and password for IE for the logged on user
;================================================================================================
Function SetPass($PrintFile1, $PrintFile2)
$Handle = Freefilehandle ()
if $handle > 0
if Open ($handle, $ServerName + "\proxies\" + $Printfile1) = 0
$proxyuser = Readline($handle)
? $proxyuser
; WHILE @ERROR = 0
Close($handle)
ELSE
BEEP
? "Config file not opened, error code: [" + @ERROR + "]"
ENDIF
if $handle > 0
if Open ($handle, $ServerName + "\proxies\" + $Printfile2) = 0
$proxypass = Readline($handle)
? $proxypass
; WHILE @ERROR = 0
Close($handle)
ELSE
BEEP
? "Config file not opened, error code: [" + @ERROR + "]"
ENDIF
$shellcmd = 'cmdkey /generic: $ProxyServer /user: $proxyuser /pass: + $proxypass'
Shell $ShellCMD
EndFunction