How do I import registry settings using TeamCity?
I'm having trouble importing settings from a .reg
file using TeamCity. The app in question has a lot of registry settings which change fairly regulary so it is vital to have it as a build step.
I'm using the following command:
regedit /s "C:\app\params\epm\epm_tlp\trunk\csr_vsm_tlp_exl.reg"
The path is fine (I checked several times). When I run this command manually, it works. However, when run from TeamCity, it doesn't seem to do anything. Here's the log:
[16:01:13]: Checking for changes
[16:01:16]: Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[16:01:16]: Checkout directory: C:\app
[16:01:16]: Updating sources: server side checkout... (1s)
[16:01:16]: 开发者_如何学Go[Updating sources: server side checkout...] Building incremental patch for VCS root: NEP-content
[16:01:18]: [Updating sources: server side checkout...] Repository sources transferred
[16:01:18]: Step 1/2
[16:01:18]: [Step 1/2] Using runner: simpleRunner
[16:01:18]: [Step 1/2] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script1107617910631593889.cmd
[16:01:18]: [Step 1/2] in directory: C:\app\params\epm\epm_tlp\trunk
[16:01:18]: [Step 1/2] C:\app\params\epm\epm_tlp\trunk>regedit /s "C:\app\params\epm\epm_tlp\trunk\csr_vsm_tlp_exl.reg"
[16:01:18]: [Step 1/2] Process exited with code 0
[16:01:18]: Step 2/2
[16:01:18]: [Step 2/2] Using runner: simpleRunner
[16:01:18]: [Step 2/2] Starting: c:\app\exe\startup.exe
[16:01:18]: [Step 2/2] in directory: C:\app\exe
[16:01:18]: [Step 2/2] Process exited with code -1073741515
[16:01:18]: [Step 2/2] Step failed
[16:01:18]: Publishing artifacts
[16:01:18]: [Publishing artifacts] Paths to publish: [teamcity-info.xml]
[16:01:18]: [Publishing artifacts] Sending files
[16:01:18]: Build finished
This is the first time I'm trying out TeamCity, so I have no idea where to start looking for trouble, why would this command fail? Could there be any security causes? Are TeamCity runners running as another user?
Most likely, you have TeamCity build agent running as a Windows service. Please make sure this windows service is run under windows account, which has sufficient privileges.
精彩评论