[go: up one dir, main page]

Menu

[599fc9]: / win32 / sqlutil-wi.py  Maximize  Restore  History

Download this file

26 lines (22 with data), 893 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import sys, os.path as osp, subprocess
pass
#def ntservice( appname, azione='install', verbose=True ):
# shpath = osp.join( osp.join( sys.prefix, 'share' ), appname )
# scrpath = osp.join( sys.prefix, 'scripts' )
# pythonbin = osp.join( sys.prefix, 'python.exe' )
# cmdline = [ pythonbin, osp.join( scrpath, appname + '-ntsvc.py' ), ]
# if azione == 'install': cmdline += ['--startup', 'auto']
# cmdline += [azione,]
# r = subprocess.call( cmdline )
# if verbose: print 'Service %s - %s: %d' % (appname, azione, r)
# return r
#if sys.argv[1] == '-install':
# ntservice( 'kickweb', 'install' )
# ntservice( 'kickweb', 'start' )
# ntservice( 'fantaweb', 'install' )
# ntservice( 'fantaweb', 'start' )
#if sys.argv[1] == '-remove':
# ntservice( 'kickweb', 'stop' )
# ntservice( 'kickweb', 'remove' )
# ntservice( 'fantaweb', 'stop' )
# ntservice( 'fantaweb', 'remove' )