GithubHelp home page GithubHelp logo

justaman / pywinclobber Goto Github PK

View Code? Open in Web Editor NEW
58.0 9.0 9.0 5.41 MB

A set of Python scripts to clobber some free space out of Windows installations. Use at your own risk!

License: MIT License

Python 100.00%

pywinclobber's Introduction

pyWinClobber

A set of Python scripts to clobber some free space out of Windows installations. Use them at your own risk!

pywinclobber's People

Contributors

i3laze avatar justaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pywinclobber's Issues

Отказывается работать 64-битная версия

ОС Windows 7 x64

C:\Users\Alexander\Desktop\64-bit>driver_cleanup.exe
Reading all OEM drivers...
Traceback (most recent call last):
File "", line 248, in
File "", line 158, in main
File "", line 108, in getAllDrivers
main.PnpUtilOutputError: Unexpected pnputil.exe output start: ╤ыєцхсэр  яЁюу
Ёрььр PnP ╠рщъЁюёюЇЄ

Cannot find suitable date format

w7 pro 64 sp1 ru

Reading all OEM drivers...
Traceback (most recent call last):
File "", line 287, in
File "", line 197, in main
File "", line 157, in getAllDrivers
main.PnpUtilOutputError: Cannot find suitable date format

pnputil нет
после создания символьной ссылки в system32 и syswow64 на pnputil в winsxs:

Reading all OEM drivers...
Traceback (most recent call last):
File "", line 287, in
File "", line 197, in main
File "", line 131, in getAllDrivers
main.PnpUtilOutputError: Unexpected pnputil.exe output start:

Support for non-English pnputil

E.g. on German Windows the error occurs:

driver_cleanup.exe
Reading all OEM drivers…
Traceback (most recent call last):
File "", line 287, in File "", line 197, in main
File "", line 131, in getAllDrivers
main.PnpUtilOutputError: Unexpected pnputil.exe output start: Microsoft-PnP-Dienstprogramm

ValueError: need more than 1 value to unpack

Утилита потрясающая! Очистила 13 Гб на Win7x64 с материнской платой NVidia!
Для офисного компьютера с 64 Гб SSD это было волшебно.

А вот на двух других Win7x64 (развернутых из одного образа) работать отказывается. v1.0.3:

c:\DriverStore Cleaner>driver_cleanup.exe
Reading all OEM drivers...
Traceback (most recent call last):
File "", line 303, in
File "", line 202, in main
File "", line 142, in getAllDrivers
File "", line 71, in parseLine
ValueError: need more than 1 value to unpack

Текущая Python-версия скрипта (master) выдаёт ту же ошибку.
Кстати, Python 3.6 ругается на синтаксис скрипта. Пришлось ставить 2.7.

UPD:
Ага.. print self.driverDateAndVersion говорит, что есть хитрый драйвер без версии:

06/23/2010 5.5.0.85
06/23/2010 5.5.0.85

07/20/2014 1.2.1.0
07/20/2014 1.2.1.0

05/13/2015

graceful handling of windowserror

Cannot remove "c:\windows\installer\102b733.msi": WindowsError(32, '\xcf\xf0\xee
\xf6\xe5\xf1\xf1 \xed\xe5 \xec\xee\xe6\xe5\xf2 \xef\xee\xeb\xf3\xf7\xe8\xf2\xfc
\xe4\xee\xf1\xf2\xf3\xef \xea \xf4\xe0\xe9\xeb\xf3,')

cant decode it byself, but this is probably cp1251

Doesn't work on german windows....

C:\Users\mpl\Downloads\64-bit>driver_cleanup.exe
Reading all OEM drivers...
Traceback (most recent call last):
File "", line 287, in
File "", line 197, in main
File "", line 131, in getAllDrivers
main.PnpUtilOutputError: Unexpected pnputil.exe output start: Microsoft-PnP-
Dienstprogramm

IOError: [Errno 2] No such file or directory:

pnputil -e файл:
d.txt

Ошибка:
D:\Downloads\64-bit (1)>driver_cleanup.exe
Reading all OEM drivers... done
Reading oem*.inf files... done
Parsing DriverStore...
Traceback (most recent call last):
File "", line 287, in
File "", line 254, in main
IOError: [Errno 2] No such file or directory: 'C:\WINDOWS\system32\DriverStore\FileRepository\mshdc.inf_amd64_1f12e6cb61874561\mshdc.inf'

Не работает утилита очиски MSI

Win7\64bit\Eng

e:\HDDCLEAN\64-bit>msi_cleanup.exe
Orphan patches not found
Traceback (most recent call last):
File "", line 85, in
File "", line 82, in main
File "", line 58, in orphanCleanup
File "C:\Vass\Dev\pyWinClobber\build\pyi.win32\pyWinClobber\out00-PYZ.pyz\msi_
helpers", line 98, in getattr
AttributeError: Product {14841822-B60D-418A-9AD7-6FA73104D927} has no LocalPacka
ge attribute (error: 1608)

Не работает на Win7 Prof Eng

D:\Temp\32-bit>driver_cleanup.exe

Reading all OEM drivers...
Traceback (most recent call last):
File "", line 248, in module // (слово module в треугольных скобках)
File "", line 158, in main
File "", line 118, in getAllDrivers
File "", line 77, in parseLine
ValueError: too many values to unpack

OpenProcessToken should be from advapi32 rather than kernel32

While this works in Windows 10, it isn't documented as belonging to kernel32.

The documentation says that this function lives in advapi32, so if you need to use this code on windows Vista, for instance, then you will need to correct this.

Additionally, as a stylistic issue, I would suggest consistently using the lowercase form for 'kernel32' and 'advapi32', rather than 'kernel32' and 'Advapi32'.

Please refer to https://msdn.microsoft.com/en-us/library/windows/desktop/aa379295%28v=vs.85%29.aspx

Incomplete driver directory (missing .inf file) causes program to crash

Example traceback:

C:\tmp\pyWinClobber-1.0.1>python driver_cleanup.py
Reading all OEM drivers... done
Reading oem*.inf files... done
Parsing DriverStore...
Traceback (most recent call last):
File "driver_cleanup.py", line 287, in
main()
File "driver_cleanup.py", line 254, in main
with open(os.path.join(driverRepo, driverDir, infName), 'rb') as f:
IOError: [Errno 2] No such file or directory: 'C:\Windows\system32\DriverStore\FileRepository\snp2uvc.inf_x86_neutral_172184aba6eb6ffe\snp2uvc.inf'

Create new release

Please create a new release since there have been some commits after the last release was created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.