摘要:        
在Windows服务程序中,有时希望获得安装程序所在的目录对齐对其进行操作,如生成Log日志文件等,若用语句System.Environment.CurrentDirectory则返回的路径为C:\WINDOWS\system32不能正确指向安装程序所在路径,改用如下代码即可实现。string strAssemblyFilePath = Assembly.GetExecutingAssembly().Location;string strAssemblyDirPath = Path.GetDirectoryName(strAssemblyFilePath);strPath = strAsse.    阅读全文
posted @ 2011-10-27 12:12
小锋神
阅读(955)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号