#209630 - 2014-11-07 12:45 PM
Is this a bug with readprofilestring?
|
Robdutoit
Hey THIS is FUN
Registered: 2012-03-27
Posts: 363
Loc: London, England
|
I don't need this anymore as I will be changing to using different filtering groups based on proxy port number rather than digest authentication. However, I discovered something rather interesting with this particular line of coding.
If I logon as a pupil it will fill in the details for the username and password in the credentials manager in windows 7. If I logon as a manager account that is also a member of the domain admins account, the script doesn't do anything while logging on. Curiously enough the script works when I run the script manually. The script is obviously running during logon because it works for the pupils and all the other code in the main script is running. I just wonder why this code does not work on logon if you are a member of the domain admins account in addition to the managers global group.
I am not worried about it as I will no longer be using this coding after December, but I just thought that I would report it as a possible bug. I am using kixtart version 4.62
Thanks
Code in main script
proxyauthenticate ($servername + "\profiles$\all\software\patches\proxies\", "proxyauth.ini")
Function
Function proxyauthenticate ($Installs, $File)
$groups = "Pupils", "Students", "Staff", "OfficeAdmin", "Managers", "Visitors"
$inifile = $Installs + $File
For Each $group in $groups
If InGroup($group)
$proxyuser = ReadProfileString($inifile, $group, "username")
$proxypass = ReadProfileString($inifile, $group, "password")
$proxyserver = ReadProfileString($inifile, $group, "proxy")
$shellcmd = 'cmdkey /generic:$ProxyServer /user: $proxyuser /pass: $proxypass'
Shell $ShellCMD
EndIf
Next
EndFunction
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 507 anonymous users online.
|
|
|