C#服务windows批处理

编程入门 行业动态 更新时间:2024-10-28 19:26:59
本文介绍了C#服务windows批处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好 我做了一个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批处理

本文发布于:2023-05-25 07:32:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/285825.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:批处理   windows

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!