Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/05/2023 in all areas

  1. for Registration Free COM Objects you can try this to create manifest use mt.exe https://learn.microsoft.com/en-us/windows/win32/sbscs/mt-exe not tested so if any query ask @ptrex
    1 point
  2. Melba23

    Check windows size

    AutoDEV, I think I am safe in saying that no-one here has the slightest idea of what you are trying to do with this script - which rather limits us in the help we can offer you. I suggest you write down in your native language clearly and in some detail what it is you are trying to achieve and post both that AND a translated version - that way there is a chance that we might be able to work out a solution for you. M23
    1 point
  3. Here's one way -- #include "JSON.au3" ; https://www.autoitscript.com/forum/topic/148114-a-non-strict-json-udf-jsmn $sJSON = '{' & _ '"Name": "MichaƂ",' & _ '"Number": 10,' & _ '"{\"Name\":\"Adam\",\"Number\":20}": null' & _ '}' $oJSON = Json_Decode($sJSON) $aKeys = Json_ObjGetKeys($oJSON) $sJSON = $aKeys[2] ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sJSON = ' & $sJSON & @CRLF & '>Error code: ' & @error & @CRLF) You could likely do it via the jq UDF as well.
    1 point
  4. The promised code: #RequireAdmin #include <WinAPIFiles.au3> #include <WinAPIHObj.au3> MsgBox(0, 'Serial', 'Disk serial: ' & GetDiskSerial(@HomeDrive)) Func GetDiskSerial($sDriveLetter) Local Const $IOCTL_STORAGE_QUERY_PROPERTY = 0x2D1400 Local $tagSTORAGE_PROPERTY_QUERY = 'int PropertyId; int QueryType; byte AdditionalParameters[1];' Local $tagSTORAGE_DESCRIPTOR_HEADER = 'dword Version;dword Size;' Local $tagSTORAGE_DEVICE_DESCRIPTOR = 'dword Version;dword Size; byte DeviceType;byte DeviceTypeModifier; boolean RemovableMedia;' & _ 'boolean CommandQueueing;dword VendorIdOffset;dword ProductIdOffset;dword ProductRevisionOffset;dword SerialNumberOffset;int BusType;' & _ 'dword RawPropertiesLength;byte RawDeviceProperties[1];' Local $aDevice = _WinAPI_GetDriveNumber ($sDriveLetter) If @error Then Return SetError(1, @error, Null) Local $hDevice = _WinAPI_CreateFile('\\.\PhysicalDrive' & $aDevice[1], 2, 2, 6) If @error Then Return SetError(2, @error, Null) Local $tSTORAGE_PROPERTY_QUERY = DllStructCreate($tagSTORAGE_PROPERTY_QUERY) $tSTORAGE_PROPERTY_QUERY.PropertyId = 0 ; StorageDeviceProperty $tSTORAGE_PROPERTY_QUERY.QueryType = 0 ; PropertyStandardQuery Local $tSTORAGE_DESCRIPTOR_HEADER = DllStructCreate($tagSTORAGE_DESCRIPTOR_HEADER) If Not _WinAPI_DeviceIoControl($hDevice, $IOCTL_STORAGE_QUERY_PROPERTY, _ DllStructGetPtr($tSTORAGE_PROPERTY_QUERY), DllStructGetSize($tSTORAGE_PROPERTY_QUERY), _ DllStructGetPtr($tSTORAGE_DESCRIPTOR_HEADER), DllStructGetSize($tSTORAGE_DESCRIPTOR_HEADER)) _ Then _WinAPI_CloseHandle($hDevice) Return SetError(3, 0, Null) EndIf Local $tBuffer = DllStructCreate('byte[' & $tSTORAGE_DESCRIPTOR_HEADER.Size & ']') If Not _WinAPI_DeviceIoControl($hDevice, $IOCTL_STORAGE_QUERY_PROPERTY, _ DllStructGetPtr($tSTORAGE_PROPERTY_QUERY), DllStructGetSize($tSTORAGE_PROPERTY_QUERY), _ DllStructGetPtr($tBuffer), DllStructGetSize($tBuffer)) _ Then _WinAPI_CloseHandle($hDevice) Return SetError(4, 0, Null) EndIf Local $tSTORAGE_DEVICE_DESCRIPTOR = DllStructCreate($tagSTORAGE_DEVICE_DESCRIPTOR, DllStructGetPtr($tBuffer)) If $tSTORAGE_DEVICE_DESCRIPTOR.SerialNumberOffset = 0 Then _WinAPI_CloseHandle($hDevice) Return SetError(5, 0, Null) EndIf Local $tSerial = DllStructCreate('char Serial[32]', DllStructGetPtr($tBuffer) + $tSTORAGE_DEVICE_DESCRIPTOR.SerialNumberOffset) _WinAPI_CloseHandle($hDevice) Return $tSerial.Serial EndFunc
    1 point
  5. For people new to SQLite, I'd recommend following the step by step approach: o) First install a nice 3rd-party SQLite DB manager named SQLite Expert o) Used this to design your DB o) Use the SQL tab to run the various SQL queries and statements you expect to be using o) Fine-tune the design as necessary o) Only then start coding your fancy GUI app.
    1 point
  6. Most likely, you cannot automate Anti-Virus software. Otherwise it would make it very vulnerable...
    0 points
×
×
  • Create New...