More doc / sample

This commit is contained in:
Clement Rouault
2016-03-30 18:27:40 +02:00
parent 96c8d68297
commit 6c1b4cf5e6
12 changed files with 117 additions and 42 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
Exception and Context related structures
========================================
.. module:: windows.exception
.. module:: windows.winobject.exception
This module regroups all the Exception/Context related structures and functions.
+29 -1
View File
@@ -339,4 +339,32 @@ Ouput::
I AM LOADING <C:\Windows\SysWOW64\msxml6.dll>
I AM LOADING <C:\Windows\system32\shell32.dll>
I AM LOADING <C:\Windows\SYSTEM32\WINMM.dll>
I AM LOADING <C:\Windows\system32\ole32.dll>
I AM LOADING <C:\Windows\system32\ole32.dll>
.. _wmi_request:
Make WMI requests
'''''''''''''''''
.. literalinclude:: ..\..\samples\wmi_request.py
Ouput::
(cmd λ) python .\samples\wmi_request.py
WMI requester is <windows.winobject.wmi.WmiRequester object at 0x02CAA410>
Selecting * from 'Win32_Process'
They are <94> processes
Looking for ourself via pid
Some info about our process:
* Name -> python.exe
* ProcessId -> 7896
* OSName -> Microsoft Windows 8.1 Pro|C:\Windows|\Device\Harddisk0\Partition2
* UserModeTime -> 1406250
* WindowsVersion -> 6.3.9600
* CommandLine -> "C:\Python27\python.exe" .\wmi_request.py
<Select Caption,FileSystem,FreeSpace from Win32_LogicalDisk>:
* {'Caption': u'C:', 'FreeSpace': u'14729031680', 'FileSystem': u'NTFS'}
* {'Caption': u'D:', 'FreeSpace': u'243872890880', 'FileSystem': u'NTFS'}
* {'Caption': u'E:', 'FreeSpace': u'1073852416', 'FileSystem': u'FAT32'}
+3 -1
View File
@@ -14,4 +14,6 @@ This sections describes them by group of relation.
registry.rst
network.rst
service.rst
com.rst
volume.rst
com.rst
wmi.rst
+2
View File
@@ -0,0 +1,2 @@
Volume -- The logical drives
============================
+2 -1
View File
@@ -1,7 +1,7 @@
The ``windows`` module
**********************
The ``windows`` module is the module installed by :file:`setup.py` (that does not exists right now).
The ``windows`` module is the module installed by :file:`setup.py`.
This module exports some objects representing the current state of the system.
It also offers some submodules aimed to help the interfacing with ``Windows`` and native code execution.
@@ -15,6 +15,7 @@ The submodules that you might use by themself are:
* :mod:`windows.native_exec`
* :mod:`windows.winproxy`
* :mod:`windows.utils`
* :mod:`windows.debug`
* :mod:`windows.com`
.. _object_system:
+1 -18
View File
@@ -3,21 +3,4 @@ Early Work In Progress
Here are some features that are still work in progress. Code might be unstable and/or ultra-ugly.
Wintrust -- Signature check
"""""""""""""""""""""""""""
Should it juste be part of :mod:`windows.utils` ?
.. module:: windows.wintrust
.. autofunction:: windows.wintrust.check_signature
.. module:: windows.wmi
WMI -- WMI request
""""""""""""""""""
Unstable code: not fully tested, ugly COM initialisation
.. autoclass:: windows.wmi.WmiRequester
<Nothing right now>
+12
View File
@@ -0,0 +1,12 @@
WMI -- Make request to WMI
==========================
.. module:: windows.winobject.wmi
.. note::
See sample :ref:`wmi_request`
.. autoclass:: WmiRequester