Unable to open word document from jenkins

心已入冬 提交于 2019-12-25 17:44:54

问题


I have one windows utility which opens word document, extract data out of it and generate another word document using that data.

Now my problem is that this windows exe is working fine directly on command prompt, but if I call this exe through jenkins, i.e. build step "Execute windows batch command" it gives error, it is not able to open word document so utlity exists with error.

I have tried other options also like calling exe from pom file, and from batch file. every time it gives me same error. My tomcat service is running with the same user from which I am login to windows.

Any guidance on this topic will helpful.


回答1:


You have to add "Desktop" folder in BOTH locations: C:\Windows\System32\config\systemprofile\Desktop and C:\Windows\SysWOW64\config\systemprofile\Desktop




回答2:


Jenkins is not able to manage such application with a GUI as Tomcat is launched with a Windows service.

One option is to try to check this option on your Windows service: "Allow service to interact with desktop"

If it doesn't solve your problem, I'm not sure you will find a solution :(




回答3:


Create an empty directory "Desktop" in

C:\Windows\SysWOW64\config\systemprofile\

this solved the issue.

I guess this is problem with user rights for the desktop folder under users directory. The user by which tomcat service is running.



来源:https://stackoverflow.com/questions/30392115/unable-to-open-word-document-from-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!