Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/07/2020 in all areas

  1. Maybe the first step should be to get the file thru InetGet (as suggested above), so we can know for sure that the file can be downloaded from this URL and we are not trying to debug excel uselessly. Just an idea...
    1 point
  2. Just to make sure we correctly understand your goal: Putty gets started by CyberArk When putty connects to a linux server, X11 should be enabled by a script. This script needs to run on your PC Correct? If yes I have a few more questions: How would your script determine that CyberArk tries to connect to a linux machine? At the moment you are able to manually set X11 when CyberArk starts a linux session?
    1 point
  3. you can use below command : C:\Program Files\PuTTY\putty.exe" -ssh msnoc@10.0.0.11 -pw mypassword -P pwd -M "C:\Program Files\PuTTY\script.txt where script.txt contain your commands: sh isdn st | i Bs
    1 point
  4. aaaa ok i think you can use many thing for do ssh -X <host> also crete a link of putty in desktop rename puttyX11 and with right mouse click over icon and insert a command ssh -X <host> or if you want by autoit you can copy example of command run in help F1 and substitute like this Example() Func Example() ; Run Notepad with the window maximized. substitute ----> Local $iPID = Run("notepad.exe", "", @SW_SHOWMAXIMIZED) To run DOS (console) commands, try Run(@ComSpec & " /c " & 'commandName', "", @SW_HIDE) ; don't forget " " before "/c" ; Wait 10 seconds for the Notepad window to appear. ;WinWait("[CLASS:Notepad]", "", 10) ; Wait for 2 seconds. Sleep(2000) ; Close the Notepad process using the PID returned by Run. ProcessClose($iPID) EndFunc ;==>Example yopu can able putty also directly Graphical Menu: Many SSH clients have a menu to change the configuration settings. For example, to change the setting in PuTTY, check the box next to Connection --> SSH --> X11 --> Enable X11 Forwarding
    1 point
  5. the helpfile also states so: local $aArray[6] = [1,2,3,2,5,2] $aDel = _ArrayFindAll($aArray , 2) _ArrayDelete($aArray , _ArrayToString($aDel , ";")) _ArrayDisplay($aArray) or reduced local $aArray[6] = [1,2,3,2,5,2] _ArrayDelete($aArray , _ArrayToString(_ArrayFindAll($aArray , 2) , ";")) _ArrayDisplay($aArray)
    1 point
  6. I think the problem is caused by a function you call before $sE2 has been fully created. According to the help file for function SetError: "When entering a function @error is set to 0." Means even if you do nothing in a function that sets @error, it will be reset to 0 on entry to the function.
    1 point
  7. Just use _ArrayInsert to add ubound in cell 0.
    1 point
  8. Since NZ is in lockdown we've had a number of users complaining about Office Activation via VPN, (some machines hadn't updated to our new KMS servers before lock down), so I just created a script that writes a custom script for each users computer, we use LAPs for managing local Administrator passwords (i.e. each machine has a different password) fortunately it's only a hand full of staff. https://docs.microsoft.com/en-us/sysinternals/downloads/psexec Example: ;~ Will run as a standard user, without #RequireAdmin ;~ Line below should create a C:\Windows\Temp\Test folder (requires administrator rights). RunAs("Administrator", @ComputerName, "Password", 0, @ScriptDir & "\PSExec.exe -accepteula -s ' & @ComSpec & ' /c MD ' & @WindowsDir & '\Temp\Test') The system account doesn't use UAC, which is how products like SCCM perform installations. With regards to compressing AutoIt scripts into msi, you may encounter issues with AV, if they are left uncompressed, i.e. having the MSI reference the file from the same directory. As seadoggie01 pointed out you could use Scheduled Tasks as well to also utilize the system account. ;~ Will run as a standard user, without #RequireAdmin ;~ Line below should create a Scheduled Task ;~ Run as System ;~ Run Once at 12:00 ;~ Create C:\Windows\Temp\Test folder (requires administrator rights). ;~ Delete Scheduled Task RunAs("Administrator", @ComputerName, "Password", 0, @ComSpec & ' /c schtasks.exe /RU "SYSTEM" /Create /TN "Run Once Task" /SC ONCE /ST 12:00 /TR "' & @ComSpec & ' /c MD ' & @WindowsDir & '\Temp\Test" /V1 /Z')
    1 point
  9. Hi maloysius A script found at this link could be helpful, as long as the system tray icon you want to click on got a tooltip (which is common in the notification area). I paste the script below, amended with a few added lines to make it work in case the icon is hidden : #Include <GuiToolBar.au3> #NoTrayIcon Global $hSysTray_Handle, $iSystray_ButtonNumber ; Global $sToolTipTitle = "Microsoft Office Outlook" ; <<<<<<<<<<<<<<<< Enter some tooltip text for the icon you want here Global $sToolTipTitle = "Intel(R)" ; <<<<<<<<<<<<<<<< you can enter prefix of your tooltip, no need to enter it all ;~ WinActivate('[Class:Shell_TrayWnd]') ; if taskbar is Autohide $iSystray_ButtonNumber = Get_Systray_Index($sToolTipTitle) If $iSystray_ButtonNumber = -1 Then MsgBox(16, "Error", "Icon not found in system tray") Exit Else Sleep(500) _GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right") EndIf Exit Func Get_Systray_Index($sToolTipTitle) ; Find systray handle $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') If @error Then MsgBox(16, "Error", "System tray not found") Exit EndIf ; Get systray item count Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) If $iSystray_ButCount = 0 Then MsgBox(16, "Error", "No items found in system tray") Exit EndIf ; Look for wanted tooltip For $iSystray_ButtonNumber = 0 To $iSystray_ButCount If StringInStr(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber), $sToolTipTitle) <> 0 Then ; MsgBox(0,$iSystray_ButCount,$iSystray_ButtonNumber) ; uncomment if you need info ; 2 lines added in case the icon is hidden (thanks Nine) <======================= Local $hWnd = WinGetHandle ('[Class:Shell_TrayWnd]') ControlClick($hWnd, '', 1502) ControlClick($hSysTray_Handle, "", $iSystray_ButtonNumber, "right") ; <========== Return $iSystray_ButtonNumber ; Found EndIf Next Return -1 ; Not found EndFunc Also, here is an interesting link to choose which items are shown in the notification area, from earlier Windows versions to Windows 10. Good luck
    1 point
  10. BrewManNH

    _ProgressGUI

    Version 1.0.0

    844 downloads

    I have created a UDF that will allow you to easily create a customizable GUI with either a standard progress bar or a marquee style progress bar. You can change the size and back ground color of the GUI, as well as the font, font size, and color of the text. The function doesn't require any parameters to operate, but the default text is very generic so you probably would want to set that at the very least.
    1 point
  11. Why automate the GUI when you can retrieve the data using WMI. WMI is available on all/most Windows OSs. Try this: ; Generated by AutoIt Scriptomatic $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "." $Output="" $Output = $Output & "Computer: " & $strComputer & @CRLF $Output = $Output & "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PrintJob", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $Output = $Output & "Caption: " & $objItem.Caption & @CRLF $Output = $Output & "Color: " & $objItem.Color & @CRLF $Output = $Output & "DataType: " & $objItem.DataType & @CRLF $Output = $Output & "Description: " & $objItem.Description & @CRLF $Output = $Output & "Document: " & $objItem.Document & @CRLF $Output = $Output & "DriverName: " & $objItem.DriverName & @CRLF $Output = $Output & "ElapsedTime: " & WMIDateStringToDate($objItem.ElapsedTime) & @CRLF $Output = $Output & "HostPrintQueue: " & $objItem.HostPrintQueue & @CRLF $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF $Output = $Output & "JobId: " & $objItem.JobId & @CRLF $Output = $Output & "JobStatus: " & $objItem.JobStatus & @CRLF $Output = $Output & "Name: " & $objItem.Name & @CRLF $Output = $Output & "Notify: " & $objItem.Notify & @CRLF $Output = $Output & "Owner: " & $objItem.Owner & @CRLF $Output = $Output & "PagesPrinted: " & $objItem.PagesPrinted & @CRLF $Output = $Output & "PaperLength: " & $objItem.PaperLength & @CRLF $Output = $Output & "PaperSize: " & $objItem.PaperSize & @CRLF $Output = $Output & "PaperWidth: " & $objItem.PaperWidth & @CRLF $Output = $Output & "Parameters: " & $objItem.Parameters & @CRLF $Output = $Output & "PrintProcessor: " & $objItem.PrintProcessor & @CRLF $Output = $Output & "Priority: " & $objItem.Priority & @CRLF $Output = $Output & "Size: " & $objItem.Size & @CRLF $Output = $Output & "SizeHigh: " & $objItem.SizeHigh & @CRLF $Output = $Output & "StartTime: " & WMIDateStringToDate($objItem.StartTime) & @CRLF $Output = $Output & "Status: " & $objItem.Status & @CRLF $Output = $Output & "StatusMask: " & $objItem.StatusMask & @CRLF $Output = $Output & "TimeSubmitted: " & WMIDateStringToDate($objItem.TimeSubmitted) & @CRLF $Output = $Output & "TotalPages: " & $objItem.TotalPages & @CRLF $Output = $Output & "UntilTime: " & WMIDateStringToDate($objItem.UntilTime) & @CRLF if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop $Output="" Next Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_PrintJob" ) Endif Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 5, 2) & "/" & _ StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc
    1 point
×
×
  • Create New...