# Path: machination/context.py
# def win_machination_path():
# def conf_dir():
# def status_dir():
# def cache_dir():
# def bin_dir():
# def log_dir():
# def resources_dir():
# def _get_dir(name, status_elt = None):
# def get_id(service_id):
# def get_worker_elt(name, status_elt = None):
# def main(args):


import win32api
import sys
from machination import context

# Launch a new process with elevation

def main():
    if len(sys.argv) != 3:
        msg = "Failed to raise privileges: Wrong number of parameters supplied"
        context.emsg(msg)
        return msg

    application = sys.argv[1]
    commandline = sys.argv[2]

    win32api.ShellExecute(0,
                          'runas',
                          application,
                          commandline,
                          '',
                          1)


# Path: machination/context.py
# def win_machination_path():
# def conf_dir():
# def status_dir():
# def cache_dir():
# def bin_dir():
# def log_dir():
# def resources_dir():
# def _get_dir(name, status_elt = None):
# def get_id(service_id):
# def get_worker_elt(name, status_elt = None):
# def main(args):


# Path: machination/workers/packageman/elevate.py
import win32api
import sys
from machination import context


# Launch a new process with elevation

def main():
    if len(sys.argv) != 3:
        msg = "Failed to raise privileges: Wrong number of parameters supplied"
        context.emsg(msg)
        return msg

    application = sys.argv[1]
    commandline = sys.argv[2]

    win32api.ShellExecute(0,
                          'runas',
                          application,
                          commandline,
                          '',
                          1)


if __name__ == '__main__':