windows - Open Excel on Jenkins CI -


i working on windows 7 (logged in session no.1), jenkins ci running windows service in session 0. problem is.. want open excel file through jenkins ci in session 0, want display gui on session 1.

i know session 0 isolated in windows 7, possible run process in session 0 , output in session? please help.

edit:
took little trial , error, worked me (windows 7 64-bit).

  • download pstools microsoft site
  • we need psexec.exe, can extract everything. extract location accessible jenkins, preferably without spaces in path.
  • open elevated command prompt: type cmd start's quicksearch, right click cmd.exe, select run administrator.
  • type c:\path\to\psexec.exe -accepteula , press enter.
  • type c:\path\to\psexec.exe -i 1 cmd , press enter. (if see command prompt appear, good, close now)
  • in job configuration, configure execute windows batch command step
  • write following:
    c:\path\to\psexec.exe -accepteula && c:\path\to\psexec.exe -i 1 cmd /c start c:\progra~2\microso~1\path\to\excel.exe

where:

  • c:\path\to full path psexec.exe, unless in %path%
  • -i 1 session id want launch in.
  • c:\progra~2\microso~1\path\to full path excel.exe without spaces. since office installations going under paths spaces, "program files (x86), have figure out short path, or place somewhere without spaces.
  • having excel.exe under %path% , working regular command line was not enough.

a little explanation care:

  • psexec needs install services first. that, needs run elevated command prompt first time. one-time installation step.
  • to make psexec work, need accept eula prompt. done per session/user. if run psexec -accepteula in command prompt, doesn't when jenkins service (running local system in session 0) tries use it. therefore, have place jenkins job, along command. technically, needs there once, , can removed afterwards, doesn't hurt keep there.
  • i've used cmd /k , running command local cmd prompt debug. made me realize couldn't find way escape spaces (tried various quoting), had resort short file names. note short file names not required, escape spaces.

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -