nico9julio Posted August 28, 2009 Posted August 28, 2009 Hello comunity! I've made this script for changing unsecure pop conections to ssl version for outlook express. It looks for a particular server and then add 2 registry keys: one is "POP3 Secure Connection" and set it to 1 the other is "POP3 Port" and set it to 995 Now, this works impeccably on windows xp, but not in windows 98. I'm using the latest compatible version with windows 9x (v3.2.12.1) and compiling ANSI mode. Registry keys are the same for the both operating systems, so anyone knows why it doesn't work? This is the script itself $i="0" Do $i=$i+"1" $cuenta = RegEnumKey("HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts", $i) If @error <> 0 then ExitLoop $pop3server = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\" & $cuenta ,"POP3 Server") if @error <> 0 Then ExitLoop if $pop3server="pop.thecompanyiworkfor.com.ar" or $pop3server="ipop.thecompanyiworkfor.com.ar" Then MsgBox(0,"", "pop3server") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\" & $cuenta, "POP3 Secure Connection", "REG_DWORD", "1") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\" & $cuenta, "POP3 Port", "REG_DWORD", "995") EndIf Until 1=2
nico9julio Posted August 31, 2009 Author Posted August 31, 2009 (edited) The problem was not windows 98. Regedit shows keys always sorted alphabetically. It wasn't windows version, it was that registry keys, sometimes are writen in diferent order than registry editor shows. So, the script was buggy... This is the new working version. ;MsgBox(0,"", "arranca") Buscapop("HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts") Buscapop("HKEY_CURRENT_USER\Identities") ;MsgBox(0,"", "termina") Func BuscaPop($clave) $i="0" Do $i=$i+"1" $cuenta = RegEnumKey($clave, $i) If @error <> 0 then ;no hay otra cuenta Return Else $pop3server = RegRead($clave & "\" & $cuenta ,"POP3 Server") if @error = 0 Then ;tiene cuenta pop3 if $pop3server="pop.thecompanyiworkfor.com.ar" or $pop3server="ipop.thecompanyiworkfor.com.ar" Then RegWrite($clave & "\" & $cuenta, "POP3 Secure Connection", "REG_DWORD", "1") RegWrite($clave & "\" & $cuenta, "POP3 Port", "REG_DWORD", "995") Else EndIf else BuscaPop($clave & "\" & $cuenta) ;MsgBox(0,"", "Como " & $cuenta & " no tiene pop3 server busco otra cuenta) EndIf EndIf Until 1=2 EndFunc Edited August 31, 2009 by nico9julio
jvanegmond Posted August 31, 2009 Posted August 31, 2009 Thanks for sharing. The reason no one was able to give a reply within 3 days was probably because no one has Windows 98 anymore. : ) But I guess I don't need to tell you that you should be upgrading by now. github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now