Jump to content

mc1226

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by mc1226

  1. Sorry I miss an s for Cookies Thanks th.meger For your previous question: if you delete registry values, you don't delete the path they define next time you restart IE, the deleted values are recreated from same values defined under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders Vic
  2. Read the registry values: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cookie This value contains the path of cookies folder HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\History This value contains the path of history folder Use appropriate AutoIT function like $sCookiePath=RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Cookie") $sHistoryPath=RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","History") Hope this helps you Vic
  3. Sorry, in post I didn't use original Autoit source but modified from VBS (and non correctly .... as you can see). The original source is bigger and with confidential data... I confirm the error/behaviour: variable $aValori is non an array as in VBS, but an empty variable. If LDAP attribute is multivalue in VBS you obtain an array cointaining every value, for a monovalue attribute the array has only one element. Thanks for your correction. Vincenzo
  4. I'm a novice using COM support in AU3 ... so have mercy I'm using an ActiveX control from Novell Developers Kit supporting LDAP query. If I use the control with VBScript no problem; when I translate the script in AU3 the method returnig value(s) for an attribute of a searched object give non results. This is an OLEVIEW export of the method [id(0x00000004), propget, helpstring("Returns the requested field value"), helpcontext(0x00000026)] VARIANT FieldValue([in] BSTR FieldName); I think the problem is the VARIANT datatype. This is the fully functional VBScript Option Explicit Dim oShell Dim oNWQry Dim oNWLst Dim nOggetti Dim oNWUsr Dim aValori ' Set oShell = WScript.CreateObject("WScript.Shell") Set oNWQry = WScript.CreateObject("NWIDirQueryLib.NWIDirQuery.1.2") oNWQry.FullName = "ldap://server/o=myorg/ou=myou1" oNWQry.Filter = "(&(objectclass=inetOrgPerson)(|(surname=FO0233*)(uid=FO0233*)(cn=FO0233*)))" oNWQry.Fields = "sn, givenName" oNWQry.TimeLimit = 60 oNWQry.SearchScope = 2 oNWQry.MaximumResults = 20 oNWQry.SearchMode = 0 oNWQry.AutoReferral = 1 ' LDAP Connect oNWQry.Connect ' LDAP Search Set oNWLst = oNWQry.Search ' goto 1st object Item(0) Set oNWUsr=oNWLst.Item(0) ' show object shortname tipically cn=userid oShell.Popup oNWUsr.ShortName ' value(s) for attribute "sn" in array aValori aValori = oNWUsr.FieldValue("sn") ' show 1st value for attribute oShell.Popup aValori(0) ' LDAP Disconnect oNWQry.DisConnect WScript.Quit The Autoit3 $oNWQry = ObjCreate("NWIDirQueryLib.NWIDirQuery.1.2") $oNWQry.FullName = "ldap://server/o=myorg/ou=myou1" $oNWQry.Filter = "(&(objectclass=inetOrgPerson)(|(surname=FO0233*)(uid=FO0233*)(cn=FO0233*)))" $oNWQry.Fields = "sn, givenName" $oNWQry.TimeLimit = 60 $oNWQry.SearchScope = 2 $oNWQry.MaximumResults = 20 $oNWQry.SearchMode = 0 $oNWQry.AutoReferral = 1 ' LDAP Connect $oNWQry.Connect ' LDAP Search $oNWLst=$oNWQry.Search ' goto 1st object Item(0) $oNWUsr=$oNWLst.Item(0) ' show object shortname tipically cn=userid Msgbox(0,"",$oNWUsr.ShortName) $aValori=$oNWUsr.FieldValue("sn") ' aValori is not an array, the variable is null Do you know if VARIANT datatype is supported for OLE/COM in Autoit3 or there is another error in my vbs->au3 porting. TIA Vincenzo
  5. Thereis a front-end for PsTools freeware but written in .NET at Front end for PsTools Is a very good tool ... maybe a sample to follow for same tool written in AutoIt. Vincenzo
  6. The installed printers (OS W2K/WXP) are listed in registry subkeys of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Print\Printers or/and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers The syntax of each subkey is related to printers type (local, network and network provider) Other usefull info are contained in key values of each printer subkey (like "Name", "Printer Driver", "Port" ....) Hope this can help you Vincenzo
  7. You can also use a Win32 porting of OpenLDAP command line tools like LDAPSEARCH This tools operate with every LDAP server (AD,eDirectory,iPlanet,OpenLDAP and so..) and are OS indipendent (same utility on Win32,Lnx,Solaris and so on ..) Novell has in developers area a W32 porting of OpenLDAP with libraries and command line tools Novell C LDAP Libraries Vincenzo
×
×
  • Create New...