Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Saturday, February 21, 2015

python to msi ~(Windows Installer)

Info:
When you develop a lot of python applications and you want that your next script is close sourced, then you are right with this article. I explain you have to compile a python application and generate a msi Windows installer. For that i use cx_Freeze.

Built Script:

company_name = 'Marcins Programms'
product_name = 'Sokrates'

bdist_msi_options = {
    'upgrade_code': '{Banana-rama-30403344939493}',
    'add_to_path': False,
    'initial_target_dir': r'[ProgramFilesFolder]\%s\%s' % (company_name, product_name),
    }

path = sys.path
build_exe_options = {
"path": path,
"icon": "brain.ico"}

base = None
if sys.platform == "win32":
    base = "Win32GUI"
 
exe = Executable(script='Sokrates__PYMATH.py',
                 base=base,
                 icon='brain.ico',
                )

setup(  name = "Sokrates",
        version = "1.1",
        description = "Powerfull Calculator for all plattforms",
        executables = [exe],
        options = {'bdist_msi': bdist_msi_options})


run this script with a batch file:
py build.py build
py build.py bdist_msi


You need cx_freeze

Sunday, January 25, 2015

Make Windows even faster

10 steps that makes your Windows Pc a lot faster


1.) Disable Icons
2.) Disable Visual Effects
3.) Clean your Pc with ccleaner
4.) Customize Autostart
5.) Defragment your hdd
6.) Customize Graphics
7.) Battery Settings on Laptop
8.) Update your drivers
9.)Set a low background
10.) Make a Partition for your Os with enaught memory and a data partition for Software ect.

Saturday, November 8, 2014

Read Prozess Memory

Read Protess Memory in Python


import ctypes
from ctypes import *
from ctypes.wintypes import *
#import win32api
import psutil
import sys

numeprocess= "chrome.exe"
adresahexmem = 0x01012964
nrbcititi = 147

def getpid():
  for proc in psutil.process_iter():
    print(proc.name)
    if str(numeprocess) in str(proc.name):
      print(proc.pid)
      return proc.pid

PROCESS_VM_READ = 0x0010

if getpid() == None:
  print("numr:",numeprocess)
  sys.exit()
else:
  PID = getpid()

process = windll.kernel32.OpenProcess(PROCESS_VM_READ,0,PID)
readprocmem = windll.kernel32.ReadProcessMemory
bufferbcititi = ctypes.create_string_buffer(nrbcititi)

for i in range(1,1000):
  try:
    if readprocmem(process,hex(i),bufferbcititi,nrbcititi,0):
      print(bufferbcititi.raw)
  except:None