Hi
I have the problem, that if I make a connection to a ftp server via
microsoft explorer or internet explorer, the system stores the last
logon informations. If I navigate to an other server, the explorer tries
automaticaly log on with the previous logon informations.
Now I will make a script wich delete this logon information in the
registry HKCU\Software\Microsoft\FTP\Accounts
Here is my example but I think that the EnumKey Method is not the right
on for this script. Maybe anyone has a better solution, please help
Thanks
Peter
const HKCU = &H80000001 'HKEY CURRENT USER
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Ftp\Accounts"
objReg.EnumKey HKCU, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
Return = objReg.DeleteKey(HKCU, strKeyPath & "\" & subkey)
MsggBox HKCU & strKeyPath & "\" & subkey
If (Return = 0) And (Err.Number = 0) Then
Wscript.Echo "HKCU\Software\Microsoft\Ftp\Accounts\" &
subkey & " deleted"
Else
Wscript.Echo "DeleteKey " & subkey & " failed. Error = "
& Err.Number
End If
Next