Jump to content

Search the Community

Showing results for tags 'driver'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 6 results

  1. Hello. I did create these few functions several months ago. I post here, if it can interest someone. These functions based on WMI queries allow you to manage printers : add / delete printer, driver, port, or obtain configuration, set default printer ... I let you discover it with the code. Here is the list of the available functions : _Printmgr_AddLocalPort _Printmgr_AddLPRPort _PrintMgr_AddPrinter _PrintMgr_AddPrinterDriver _PrintMgr_AddTCPIPPrinterPort _PrintMgr_AddWindowsPrinterConnection _PrintMgr_CancelAllJobs _Printmgr_EnumPorts _PrintMgr_EnumPrinter _PrintMgr_EnumPrinterConfiguration _PrintMgr_EnumPrinterDriver _PrintMgr_EnumPrinterProperties _PrintMgr_EnumTCPIPPrinterPort _Printmgr_Pause _Printmgr_PortExists _Printmgr_PrinterExists _Printmgr_PrinterSetComment _Printmgr_PrinterSetDriver _Printmgr_PrinterSetPort _Printmgr_PrinterShare _Printmgr_PrintTestPage _PrintMgr_RemoveLocalPort _PrintMgr_RemoveLPRPort _PrintMgr_RemovePrinter _PrintMgr_RemovePrinterDriver _PrintMgr_RemoveTCPIPPrinterPort _PrintMgr_RenamePrinter _Printmgr_Resume _PrintMgr_SetDefaultPrinter And some examples : #Include "PrintMgr.au3" ; Remove a printer called "My old Lexmark printer" : _PrintMgr_RemovePrinter("My old Lexmark printer") ; Remove the driver called "Lexmark T640" : _PrintMgr_RemovePrinterDriver("Lexmark T640") ; Remove the TCP/IP printer port called "TCP/IP" _PrintMgr_RemoveTCPIPPrinterPort("MyOLDPrinterPort") ; Add a driver, called "Samsung ML-451x 501x Series", and driver inf file is ".\Samsung5010\sse2m.inf" _PrintMgr_AddPrinterDriver("Samsung ML-451x 501x Series", "Windows NT x86", @scriptDir & "\Samsung5010", @scriptDir & "\Samsung5010\sse2m.inf") ; Add a TCP/IP printer port, called "MyTCPIPPrinterPort", with IPAddress = 192.168.1.10 and Port = 9100 _PrintMgr_AddTCPIPPrinterPort("MyTCPIPPrinterPort", "192.168.1.10", 9100) ; Add a printer, give it the name "My Printer", use the driver called "Samsung ML-451x 501x Series" and the port called "MyTCPIPPrinterPort" _PrintMgr_AddPrinter("My Printer", "Samsung ML-451x 501x Series", "MyTCPIPPrinterPort") ; Set the printer called "My Printer" as default printer _PrintMgr_SetDefaultPrinter("My Printer") ; Connect to the shared printer "\\192.168.1.1\HPDeskjetColor") _PrintMgr_AddWindowsPrinterConnection("\\192.168.1.1\HPDeskjetColor") ; List all installed printers #Include <Array.au3> $aPrinterList = _PrintMgr_EnumPrinter() _ArrayDisplay($aPrinterList) ; List all printers configuration #Include <Array.au3> $aPrinterConfig = _PrintMgr_EnumPrinterConfiguration() _ArrayDisplay($aPrinterConfig) ; List all installed printer drivers #Include <Array.au3> $aDriverList = _EnumPrinterDriver() _ArrayDisplay($aDriverList) ; Retrieve the printer configuration for the printer called "Lexmark T640" #Include <Array.au3> $aPrinterConfig = _PrintMgr_EnumPrinterConfiguration("Lexmark T640") _ArrayDisplay($aPrinterConfig) ; Add a local printer port (for a file output) _AddLocalPrinterPort("c:\temp\output.pcl") ; Remove the local port _RemoveLocalPrinterPort("c:\temp\output.pcl") Download link : PrintMgr.au3
  2. How can I open a specific driver with Autoit, in my case I have an usb which has the driver letter of f.
  3. Is there any library or api in Autoit to check whether a particular driver is signed or not and check for the certificate validity of the driver/catalog file if it is signed.?
  4. Process + Thread + DLL Functions UDFs Fully tested on O/S's from Windows 2000 -> Windows 7, in both 32-bit and 64-bit modes. *Note: the dropdown box in the GUI has issues in Windows 2000 - workaround - type 1st letter of process. Also, RemoteThreads may not start if Terminal Services is not installed on Win2000. This is a compilation of all my Process, Thread, and DLL functions (and now Driver functions) into a number of UDF modules. Most every and anything useful can be done with these functions. The best part is the GUI interfaces (ProcessFunctionsTest, ThreadFunctionsTest) which let you experiment with what functions do without even touching a line of code. And whats that? Oh yes - it creates Threads. Even 'Wow64' threads, which requires a new way of thinking =) Bundled with the core Process, Thread, and DLL UDF's are numerous support functions, examples, and even a DLL Injection module. A comparison program 'ProcessListPropertiesTest' is also included for comparison against PsaltyDS's _ProcessListProperties UDF). The GUI's pictured above are the best way to explore the possible uses of the Process + Thread functions included, but the functionality extends beyond those default function calls. For example, there are more filters for the 'List' functions, plus other functionality that is not exposed in the GUI examples. There's also the DLL Functions which aren't even touched on (but are made use of nonetheless). *For another example use of the Process Functions UDF see the ProcessGetWinPEImportExports UDF. Below is a list of all the functions available (check the function headers for more info): ProcessFunctions UDF's Thread Functions UDF's DLL Functions UDF's DriverList.au3 UDF: ; _DriverList() ; Returns a list of Drivers that were loaded by the O/S This is now a very comprehensive suite. Most everything a programmer or user would find useful is included. If by chance you can think of *any* other (useful) functions to add to this project, however, let me know. For those that need to measure a Process's CPU Usage, please see my PDH Performance Counters UDF, another comprehensive UDF suite. Special note: For most all _Process* functions that require a 'QUERY' info handle, use the constant $PROCESS_QUERY_LIMITED_INFO, which is set based on O/S. There's only one exception to this that I can think of: _ProcessMemoryVirtualQuery() which requires full Query access no matter what O/S (0x400). Thread* functions can make use of 2 constants which are set based on O/S - $THREAD_QUERY_LIMITED_INFO and $THREAD_SET_LIMITED_INFO. Experiment with the GUI's on Vista+ O/S's to see what's the minimum req's. Download the Source and/or GUI Exe's from my site Optional addition: Special NomadMemory UDF designed to work with ProcessFunctions: NomadMemoryPF.au3 Ascend4nt's AutoIT Code License agreement: While I provide this source code freely, if you do use the code in your projects, all I ask is that: If you provide source, keep the header as I have put it, OR, if you expand it, then at least acknowledge me as the original author, and any other authors I creditIf the program is released, acknowledge me in your credits (it doesn't have to state which functions came from me, though again if the source is provided - see #1)The source on it's own (as opposed to part of a project) can not be posted unless a link to the page(s) where the code were retrieved from is provided and a message stating that the latest updates will be available on the page(s) linked to.Pieces of the code can however be discussed on the threads where Ascend4nt has posted the code without worrying about further linking.UPDATES:
  5. How do I convert this to autoit? I've seen people here post examples (Manko) of communicating with device drivers, but this is ridiculously complex! #define CODEMSG(_digitval) CTL_CODE(FILE_DEVICE_UNKNOWN,_digitval , METHOD_BUFFERED,\ FILE_READ_DATA | FILE_WRITE_DATA) #define CODE_VALUE 4094 //handle to driver HANDLE device = 0; char ret[1024]; WCHAR SendValue[512]; DWORD codeval, bytes; if( !strcmp(argv[i],"-p") ) { codeval = CODE_VALUE; i++; continue; } MultiByteToWideChar(CP_ACP, 0, argv[i], -1, SendValue, sizeof(SendValue)); DeviceIoControl(device, CODEMSG(codeval), SendValue, (wcslen(SendValue)+1)*2, &ret, sizeof(ret),&bytes,NULL); The farthest I've got is~ #Include <WinAPI.au3> $Handle = _LoadDriver() $Struc = DllStructCreate("char[1024];WCHAR[512];DWORD") DllStructSetData($Struc, 3, _WinAPI_MultiByteToWideChar("I have no idea what I'm doing" , 0, $MB_PRECOMPOSED , true)) MsgBox(0,"",DllStructGetPtr($Struc)) $ret = DllCall("kernel32.dll", "int", "DeviceIoControl", _ "dword", $Handle, _ "dword", DllStructGetPtr($Struc,3), _ "ptr", DllStructGetPtr($Struc), _ "dword", 12, _ "ptr", DllStructGetPtr($Struc), _ "dword", 12, _ "dword*", 0, _ "ptr", 0) Until I slowly started to realize I have absolutely no idea what I'm doing.
  6. Hey guys, I'm trying to use the delete files same time in Removable or change attrib to show. ex: delete : Autorun.inf ===> Attrib = SH in Removable this is try me : #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: GHOST SKIKDA Script Function: Hide Files System in Removable. #ce ---------------------------------------------------------------------------- #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <GuiStatusBar.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 554, 454, 192, 114) GUISetBkColor(0x000000) $ListView1 = GUICtrlCreateListView("Name|Status", 16, 168, 522, 270, '', BitOR($WS_EX_CLIENTEDGE,$LVS_EX_GRIDLINES)) _GUICtrlListView_SetExtendedListViewStyle(-1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 400) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 100) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x00FF00) GUICtrlSetBkColor(-1, 0x800000) $ListView1context = GUICtrlCreateContextMenu($ListView1) $MenuItem1 = GUICtrlCreateMenuItem("Show", $ListView1context) $MenuItem2 = GUICtrlCreateMenuItem("Hide", $ListView1context) $MenuItem3 = GUICtrlCreateMenuItem("Delete", $ListView1context) $Button1 = GUICtrlCreateButton("Scan", 462, 134, 75, 25, $WS_GROUP) $Combo1 = GUICtrlCreateCombo("", 50, 136, 409, 25) $Label1 = GUICtrlCreateLabel("Path : ", 16, 139, 35, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0xFF0000) $StatusBar1 = _GUICtrlStatusBar_Create($Form1) Dim $StatusBar1_PartsWidth[1] = [-1] _GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth) _drivercombo() GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _GUICtrlListView_DeleteAllItems($ListView1) Sleep(200) ;Search("f:\") _driver() Case $ListView1 EndSwitch WEnd ;~ Func _Search() ;~ $search = FileFindFirstFile("C:\*.*") ;~ If $search = -1 Then ;~ MsgBox(0, "Error", "No files/directories matched the search pattern") ;~ Exit ;~ EndIf ;~ $com=0 ;~ While 1 ;~ $file = FileFindNextFile($search) ;~ If @error Then ExitLoop ;~ $var = FileGetAttrib("C:\"&$file) ;~ If ($var = "RASH") or ($var = "SH") Then ;~ _GUICtrlListView_AddItem($ListView1, $file, $com) ;~ _GUICtrlListView_AddSubItem($ListView1, $com,$var, 1) ;~ ;_GUICtrlListView_SetItemChecked($ListView1, $com) ;~ $com=$com+1 ;~ EndIf ;~ WEnd ;~ FileClose($search) ;~ _GUICtrlStatusBar_SetText($StatusBar1, @TAB & "Resultat = " & _GUICtrlListView_GetItemCount($ListView1), 0) ;~ EndFunc Func Search($current) Local $search = FileFindFirstFile($current & "\*.*") $com=0 While 1 Dim $file = FileFindNextFile($search) If @error Or StringLen($file) < 1 Then ExitLoop $var = FileGetAttrib($current &"\"&$file) If ($var = "RASH") or ($var = "SH") or ($var = "RAH") or ($var = "ASH") Then;StringInStr(FileGetAttrib($current & "\" & $file), "D") And ($file <> "." Or $file <> "..") and _GUICtrlListView_AddItem($ListView1, $file, $com) _GUICtrlListView_AddSubItem($ListView1, $com,$var, 1) ;_GUICtrlListView_SetItemChecked($ListView1, $com) $com=$com+1 Search($current & "\" & $file) EndIf Sleep (1) _GUICtrlStatusBar_SetText($StatusBar1, @TAB & "Resultat = " & _GUICtrlListView_GetItemCount($ListView1), 0) WEnd EndFunc Func _driver() $drv = DriveGetDrive( "Removable") If NOT @error Then For $i = 2 to $drv[0] GUICtrlSetData($Combo1,$drv[$i]) Search($drv[$i]) Next EndIf EndFunc Func _drivercombo() $drv = DriveGetDrive( "Removable") If NOT @error Then For $i = 2 to $drv[0] GUICtrlSetData($Combo1,$drv[$i]) Next EndIf EndFunc
×
×
  • Create New...