Jump to content

madmikep

Members
  • Posts

    11
  • Joined

  • Last visited

Profile Information

  • Location
    USA

madmikep's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. If ProcessExists("Outlook.exe") Then MsgBox(4096,"", "Outlook is running") ; You can enter your code here Else MsgBox(4096,"","Outlook is not running, Now Open Outlook") $Outlook_Path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\OUTLOOK.EXE", "") ; Read in the location of Outllook and us the deafult key MsgBox(4096,"",$Outlook_Path) Run($Outlook_Path) ; You can enter your code here EndIf
  2. Why not use the Office Resource Kit to configure Outlook when it is installed http://office.microsoft.com/en-us/ork2003/...1494521033.aspx
  3. I created this to read the BIOS serial number Lenovo "IBM" Dim $StrSerial $StrSerial = "" $ObjWMI = ObjGet("winmgmts:") $ColSettingsBios = $ObjWMI.ExecQuery("Select * from Win32_BIOS") For $ObjComputer in $ColSettingsBios $StrSerial = $StrSerial & $ObjComputer.SerialNumber Next MsgBox(4096,"","Serial Number= " & $StrSerial) $Result = StringLen($StrSerial) IF $Result > 15 Then $StrSerial = StringLeft ( $StrSerial, 15 ) EndIf
  4. Thnaks,ptrex But no go on that keyword
  5. Not sure what you are looking for but I some what fixed your script NO Errors CODE#include <GUIConstants.au3> Dim $Answer[3] $sGui = GUICreate("Sloganizer.Net :: Secure_ICT AutoIt Version", 554, 338, -1, -1) GUISetBkColor(0xFFFFFF) $Pic1 = GUICtrlCreatePic("logo.jpg", 0, 16, 553, 81, BitOR($SS_NOTIFY,$WS_GROUP)) $Text = GUICtrlCreateInput("Text", 72, 112, 385, 21) $sloganize = GUICtrlCreateButton("Sloganize", 152, 144, 217, 25, 0) $FinalText = GUICtrlCreateLabel("", 72, 192, 4, 4) GUICtrlSetFont(-1, 36, 800, 0, "Arial") GUICtrlSetColor(-1, 0xFF0000) GUICtrlSetBkColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW) Global $Answer $Answer[1] = "<< " & $Text & " will be for you what you want it to be.>>" $Answer[2] = "<< " & $Text & ", in touch with tomorrow.>>" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $sloganize EndSwitch WEnd Func SloganizeTxt() $SloganizeNow = GuiCtrlRead($Text) $Random = Random($Answer) GUICtrlSetData($sGui ,$Random) EndFunc Added: Dim $Answer[3] Changed $Answer[1] = "<< " & $Text & " will be for you what you want it to be.>>" $Answer[2] = "<< " & $Text & ", in touch with tomorrow.>>" Fixed GUICtrlSetData($sGui ,$Random)
  6. PsaltyDS, I also try the Dims no go and just for the hell of it I even tried Dim $Nul = Dec("00")
  7. Thanks again, I did try this with the same result $objOU.MoveHere ('"' & $strADsPath & '"', "")
  8. Thanks, jefhal But, This would not be the first time that the ScriptingGuys gave out incorrect information. I ran across a script that they published that did not work correctly they for got to include a Set command for a Getobject IF you do not include the second parameter in the VBscript it will error out âunless you have an ON Error resume notâ with the following error âWindows Script Hostâ WSH. Error: Wrong number of arguments or invalid property assignment: objOU.MoveHere code 800A01c2 The second parameter is required
  9. Here is the VBscript that works correctly CODEobjOU.MoveHere strADsPath, vbNullString Convert it to Autoit should be CODE$objOU.MoveHere($strADsPath,"") I have evey tried $objOU.MoveHere($strADsPath,"vbNullString") with the same error I think this might be a bug in AutoIt, but not sure. CODEOn Error Resume Next Const ADS_SCOPE_SUBTREE = 2 Set objOU = GetObject("LDAP://OU=Workstations,OU=Pasteur,OU=Corp,DC=wf,DC=local") Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Open "Active Directory Provider" Set objCommand.ActiveConnection = objConnection objCommand.Properties("Page Size") = 1000 objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE objCommand.CommandText = _ "SELECT ADsPath FROM 'LDAP://dc=WF,dc=local' WHERE objectCategory='computer' " & "AND Name='WF-6789'" Set objRecordSet = objCommand.Execute objRecordSet.MoveFirst Do Until objRecordSet.EOF strADsPath = objRecordSet.Fields("ADsPath").Value objOU.MoveHere strADsPath, vbNullString objRecordSet.MoveNext Loop
  10. PsaltyDS Thanks, Object is reporting as correct If IsObj($objOU) Then MsgBox(64, "Debug", "$objOU is object.") Else MsgBox(16, "Debug", "$objOU is not an object!") EndIf Valuater Thanks, The format for .MoveHere ($strADsPath, "") is object reference .MoveHere(parameter 1, parameter 2) First parameter is the current location of the object Second parameter is used for renaming the object during the move, But sine I am not renaming the object I pass a Null variable as the second parameter.
  11. Hello, I have search for help on the following problem. This might be a bug. I have converted the following VBScript to Autoit and I am receiving the following error. The VBScript works fine but just can get it to work in AutoIT MoveComputer.au3 (39) : ==> The requested action with this object has failed.: $objOU.MoveHere ($strADsPath, "") $objOU.MoveHere ($strADsPath, "")^ ERROR The MsgBox command works and displays the current ADS Path. So I know it is connecting to AD and pulling information. When it hits the move command it falls. Any help would be greatly appreciated Note. Both login ID and ID used in the script have Domain Admin rights $wfID = "xxxxx" ; $CmdLine[1] $wfPass = "xxxxx" ;$CmdLine[2] Const $ADS_SCOPE_SUBTREE = 2 $objOU = ObjGet("LDAP://OU=Workstations,OU=Pasteur,OU=Corp,DC=wf,DC=local") $objConnection = ObjCreate("ADODB.Connection") $objCommand = ObjCreate("ADODB.Command") $objConnection.Provider = "ADsDSOObject" $objConnection.Properties ("User ID") = "wf\" & $wfID $objConnection.Properties ("Password") = $wfPass $objConnection.Properties ("Encrypt Password") = 1 $objConnection.Properties ("ADSI Flag") = 1 $objConnection.Open ("Active Directory Provider") $objCommand.ActiveConnection = $objConnection $objCommand.Properties ("Page Size") = 1000 $objCommand.Properties ("Searchscope") = $ADS_SCOPE_SUBTREE ; $objCommand.CommandText = "SELECT ADsPath FROM 'LDAP://dc=WF,dc=local' WHERE objectCategory='computer' " & "AND Name='WF-6789'" $objCommand.CommandText = "SELECT ADsPath, distinguishedName, Name FROM 'LDAP://dc=WF,dc=local' WHERE objectCategory='computer' AND Name='WF-6789'" $objRecordSet = $objCommand.Execute $objRecordSet.MoveFirst () While Not $objRecordSet.EOF () $strADsPath = $objRecordSet.Fields ("ADsPath").Value MsgBox(4096, "", "Current path = " & $strADsPath) $objOU.MoveHere ($strADsPath, "") $objRecordSet.MoveNext () WEnd
×
×
  • Create New...