开发者

How can I remotely execute a commands on a Windows box as part of a build process?

How can I remotely execute a commands on a Windows box as part of a build process?

If it matters, I want to initiate the commands from 开发者_StackOverflow社区a linux machine which is performing the actual build.

To give some background...

A web application I am currently working on has, as part of the build process, a system for automatically reverting a linux VM, ssh-ing into it, installing the software, and then running a set of tests over the web interface. I'd like to do the same thing for Windows, but I'm not sure what the equivalent of ssh-ing in would be on a Windows machine.

Installing Cygwin to get sshd isn't an option (risks the system picking up some sort of cygwin dependency which this process is intended to prevent) and obviously something like remote desktop is fine for interactive use, but would not help me script the process (as far as I know).


I will mention it anyways (even though you said cygwin was out) one thing you could use is Fresshd. Its lightweight and works very well from what I can tell. Beyond needing to be installed so it can run as a service it appears to have no other dependencies.

Another option is Powershell and WinRM which allows you to use native .NET for doing windows management. Unfortunately I have no idea how you would actually get it to work from linux without using a VM environment to kick it off. Neverless it allows you to script processes and push those processes to the remote machines to be executed.

The last two options, which I have seen used in different shops, is to A) push a install script to the remote machine, then interactively log in and initiate it or B) push the install script but ensure that the machine on boot up (or first log in) will always run "setup.bat" which checks for a new version of the app and installs it. Both have their downsides of course.

Their are a few other ways, but I am not sure how you could get them to work for you. Unattended MSI installs (or silent installs) but I do not have any experience with such. The first couple google hits appear to be products which build MSI files for you.

Hope that helps.


You can take a look at the windows secure file transfer tools if ssh-ing is not the only option. Things like winscp may work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜