Run batch file as administrator on Jenkins?

后端 未结 4 1539
执笔经年
执笔经年 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条回答
  •  -上瘾入骨i
    2021-02-07 10:38

    One of the solution:

    1. Create bat file in slave.
    2. Create shortcut of the file and right click the shortcut, properties -> Advanced -> check run as administrator.
    3. Control Panel -> System and Security -> Action Center -> Change User Account Control Settings and set the level to "never notify".
    4. run the file on Jenkins

    Somehow the file will be executed on slave server but it return failure on Jenkins.

提交回复
热议问题