C#服务windows批处理 [英] C# service windows batch
问题描述
你好
我做了一个windows服务,这个服务运行用户Toto,在windows会话中我登录了Toto,
步骤:
- 我的服务运行非批处理文件
- 批处理文件运行程序,执行excel文件
c:\ temp \ MMW5.exe -fc:\\\ tempmp \ test.mkd
当我执行批次时双击全部是否有效?
如果我的服务运行批次我有一个错误:
Hello
I make a windows services , this services run with user Toto, in the windows session i'm logged in Toto,
Steps:
- My service run un batch file
- the batch file run a program, doing an excel file
c:\temp\MMW5.exe -f "c:\0temp\test.mkd"
when i execute th batch with double click all is work?
When if my service run the batch i have an error :
16:30:59 - [OUT 35452] - Error: Error manager for <CISAExcelWriter> reported error:
16:30:59 - [OUT 35452] - Error writing "c:\users\Toto\appdata\local\temp\markdata\mmw5\tmp3\map848ac6d8.xls" file (SAExcel exception).
但文件夹已创建,而?
非常感谢
我尝试了什么:
您好我有错误有人有个主意非常感谢
but the folder was created, While ?
Thank you very much
What I have tried:
Hello i have an error somebody have an idea thank you very much
推荐答案
如果您正在使用的话这使用Excel Interop,您不能使用Windows服务应用程序中的Excel。它不受支持。
我不知道MMW5.exe是什么或来自哪里,所以如果从服务中使用它有问题,你'我将不得不与编写该可执行文件的人交谈。
If whatever you're using to do this uses Excel Interop, you cannot use Excel from a Windows Service application. It's not supported.
I have no idea what MMW5.exe is or where it came from, so if there is a problem with using that from a service, you're going to have to talk to the people who wrote that executable.
这篇关于C#服务windows批处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!