Using Jenkins to run MATLAB and PowerPoint

490 views
Skip to first unread message

jo2dad

unread,
Mar 6, 2013, 5:51:23 PM3/6/13
to jenkins...@googlegroups.com
I'm working on a project that uses Jenkins to run MATLAB (on Windows).  The MATLAB function uses the ActiveX server to start PowerPoint, open (or create) a file, put plots on slides, save the file and then exit PowerPoint.

The problem I'm having is that the PowerPoint executable won't quit, and the Jenkins job hangs until I kill it.  I've run the same MATLAB function outside of Jenkins, from the MATLAB command line, and even in a DOS command window, and PowerPoint exits with no problem.  I finally wrote a separate Jenkins job that uses "tasklist" and "taskkill" to locate and kill the PowerPoint executable.

I wrote this job originally for Hudson and don't recall that this was a problem.  Does anyone have any experience with this?  I'd prefer that the MATLAB function kills PowerPoint, without having to call a separate job.

It's not clear whether this is a Jenkins, PowerPoint or MATLAB problem, but because I only see this problem when I use Jenkins, I figured I'd start here.

Thanks,
jo2dad

Slide

unread,
Mar 6, 2013, 5:58:43 PM3/6/13
to jenkins...@googlegroups.com
How are you running Jenkins? Are you running as a service? Does the service have permission to interact with the desktop?



--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Website: http://earl-of-code.com

jo2dad

unread,
Mar 6, 2013, 6:06:16 PM3/6/13
to jenkins...@googlegroups.com
I'm running Jenkins as a service.  There is a Jenkins slave running on the Window box I'm using.  I'm not sure how to tell whether the service has permission to interact with the desktop.

The rest of the script runs fine (MATLAB make its figures, PowerPoint opens, does its thing and saves the results), it's just when it gets to the end and tries to close PowerPoint when things go wrong.

When I look at processes using Task Manager, MATLAB, PowerPoint and Jenkins show up as NT Authority\SYSTEM.  I assumed this meant that everything was running as System user and should have all necessary permissions.

Slide

unread,
Mar 6, 2013, 6:58:55 PM3/6/13
to jenkins...@googlegroups.com
Is there anything in the Jenkins log or in the build log that would give any clues?


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Johannes Wienke

unread,
Mar 7, 2013, 5:26:31 AM3/7/13
to jenkins...@googlegroups.com, jo2dad
On 03/07/2013 12:06 AM, jo2dad wrote:
> I'm running Jenkins as a service. There is a Jenkins slave running on the
> Window box I'm using. I'm not sure how to tell whether the service has
> permission to interact with the desktop.
>
> The rest of the script runs fine (MATLAB make its figures, PowerPoint
> opens, does its thing and saves the results), it's just when it gets to the
> end and tries to close PowerPoint when things go wrong.
>
> When I look at processes using Task Manager, MATLAB, PowerPoint and Jenkins
> show up as NT Authority\SYSTEM. I assumed this meant that everything was
> running as System user and should have all necessary permissions.

IIRC there are some restrictions whata system user is allowed to do.
E.g. in one of our projects we tried to get the user directory, which
fails for the system services. Maybe powerpoint hits something similar.
Can you give it a try and let the slave for once run as a usual windows
user?

Cheers,
Johannes


signature.asc

Slide

unread,
Mar 7, 2013, 8:47:41 AM3/7/13
to jenkins...@googlegroups.com, jo2dad
Actually, yes, I ran into an issue with this, I had to do something in the user directory for something I was running with Excel to work properly. This article [1] shows the location of the user directory for the NT Authority\SYSTEM user. The issue was that the Desktop directory was missing for that user, so you also need to do what "DebarchanS" says in [2]. My guess is that PowerPoint needs something similar.

jo2dad

unread,
Mar 7, 2013, 10:19:30 AM3/7/13
to jenkins...@googlegroups.com, jo2dad
Slide,
There is a C:\Windows\system32\config\systemprofile\Desktop folder already in place.  (I forgot to mention this is running on Win XP).

Johannes,
I don't have system access to this machine, and because of red-tape, it took some convincing to have Jenkins installed in the first place.  The admins here are not Jenkins users, so they are unable to answer any questions or provide much support.

I appreciate the help, but I think for know, I'll stick with the solution I have, which is to run a separate job to kill PowerPoint.
Reply all
Reply to author
Forward
0 new messages