posted on August 11, 2009

如何在windows xp下安装python2.6的setuptools

最近开始学python,要安装很多egg文件,但发现http://pypi.python.org/pypi/setuptools#downloads没有python2.6的MS Windows installer版本,google了一把,用如下方法解决:

阅读剩余部分...

posted on August 6, 2009

不改程序, 创建同一个程序不同服务名的方法

以往写windows service都需要个ProjectInstaller和serviceInstaller并配置serviceName,这样build出来的exe在install成windows service时我们会:

@echo 安装WindowService
@Set Path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;
@Set svn_dir=%cd%
installutil %svn_dir%\MyServiceDemo.exe
pause
@echo 成功!

但服务名被我们编译在程序里了,如果这个exe想被装很多次服务怎么办呢?
今天从同事Martin Jia那里学来一个好方法,可以不用ProjectInstaller、serviceInstaller这种东西,直接安装exe为windows service并在安装时指定服务名称

阅读剩余部分...