Run batch file as administrator on Jenkins?

后端 未结 4 1601
执笔经年
执笔经年 2021-02-07 09:57

We\'re using Jenkins on Win8 x64 to build (msbuild), package (cspack), run (csrun) and test (nunit) an azure cloud services project. The Azure cloud service emulators need to ru

4条回答
  •  轮回少年
    2021-02-07 10:40

    This is My situation:

    I need to use admin privileged console to run pywinauto script (written in python) to automate some app which requires admin privileged.

    What I had tried:

    1. In my experience, install Windows Jenkins slave as a service creating more issue to take care with, so I don't go this route.
    2. To create a new process and it will open a new admin privileged shell and run command on it. But, in this way, Jenkins will not show its output, say in Blue Ocean.

    What worked for me:

    1. Just manually open an admin privileged console to start the your_window_node.jnlp file and then this Jenkins slave will have admin privileged.

提交回复
热议问题