Пример #1
0
def cmd_truecrypt_mount(ensoapi, letter):
    """Mount a truecrypt volume"""
    args = letter.split()
    volumes = restore_table(get_script_folder_name() + "\\vdata.dat")
    if args[0] in volumes:
        volume = volumes[args[0]][0]
        subprocess.call([
            os.environ["ProgramFiles"] + "\\TrueCrypt\\TrueCrypt.exe", "/v",
            volumes[args[0]][0], "/l" + args[0], "/a", "/p", "", "/q"
        ])
Пример #2
0
def cmd_truecrypt_mount(ensoapi, letter):
    """Mount a truecrypt volume"""
    args = letter.split()
    volumes = restore_table(get_script_folder_name() + "\\vdata.dat")
    if args[0] in volumes:
        volume = volumes[args[0]][0]
        subprocess.call([os.environ["ProgramFiles"] +
                         "\\TrueCrypt\\TrueCrypt.exe", 
                         "/v", volumes[args[0]][0],
                         "/l" + args[0], "/a", "/p", "", "/q"])
Пример #3
0
import os
import glob
import operator
import re
import time
import win32api
import win32con
import win32process
import pythoncom
import logging


unlearn_open_undo = []

my_documents_dir = shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, 0, 0)
LEARN_AS_DIR = os.path.join(get_script_folder_name(), u"Enso's Learn As Open Commands")

# Check if Learn-as dir exist and create it if not
if (not os.path.isdir(LEARN_AS_DIR)):
    os.makedirs(LEARN_AS_DIR)

SHORTCUT_TYPE_EXECUTABLE = 'x'
SHORTCUT_TYPE_FOLDER = 'f'
SHORTCUT_TYPE_URL = 'u'
SHORTCUT_TYPE_DOCUMENT = 'd'
SHORTCUT_TYPE_CONTROL_PANEL = 'c'

def _cpl_exists(cpl_name):
    return (
        os.path.isfile(
            os.path.expandvars("${WINDIR}\\%s.cpl") % cpl_name)
Пример #4
0
from enso.platform.win32.scriptfolder import get_script_folder_name
import os
import glob
import operator
import re
import time
import win32api
import win32con
import win32process
import pythoncom
import logging

unlearn_open_undo = []

my_documents_dir = shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, 0, 0)
LEARN_AS_DIR = os.path.join(get_script_folder_name(),
                            u"Enso's Learn As Open Commands")

# Check if Learn-as dir exist and create it if not
if (not os.path.isdir(LEARN_AS_DIR)):
    os.makedirs(LEARN_AS_DIR)

SHORTCUT_TYPE_EXECUTABLE = 'x'
SHORTCUT_TYPE_FOLDER = 'f'
SHORTCUT_TYPE_URL = 'u'
SHORTCUT_TYPE_DOCUMENT = 'd'
SHORTCUT_TYPE_CONTROL_PANEL = 'c'


def _cpl_exists(cpl_name):
    return (os.path.isfile(os.path.expandvars("${WINDIR}\\%s.cpl") % cpl_name)