/COMRedirSVC

Redirects incoming commands from COM1 to the command prompt and returns results from command prompt back out COM1. This is primarily useful for automation of Windows servers via console in Linux virtualization environments(ex: KVM, XEN, etc.)

Apache License 2.0Apache-2.0

Copyright 2011 Branden Coates

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

COMRedirSVC Beta V1.2

COMRedirSVC was built with the intention of bridging the gap between Linux virtualization systems and Windows server instances running on those Linux based parents. The program essentially allows you to access a command prompt within the instance by utilizing a serial console connection from the parent via the Windows server instance COM1 port. This can serve basic functions such as passing a shutdown command into the instance all the way up to utilizing native Windows 2008 and Windows 7 features such as adding or removing IPs. The program will execute any input at the windows command prompt and redirect any command prompt output back through the serial connection to the hosting virtualization parent. Since COMRedirSVC utilizes a serial connection there is little security concern over authentication taking place when the console is opened from the parent as this would mean the parent has been compromised and a larger issue than the service its self. There is no way to access the serial connection to the Windows instance unless you have either logged into the parent first, or redirected COM access through the parent. I would heavily suggest against doing the latter as it would essentially leave the instance command prompt open to the world depending on what manner of redirection you utilized.

I have added specific command functions to help facilitate the use of diskpart for shrinking or expanding the primary disk partition two (this is the default disk and partition scheme for windows 2008 and windows 7, if you do not utilize a standard partition scheme you will either need to update the scrpts generated by the program or avoid the use of these functions).  The shrink function shrinks the partition to the minimum size Windows and diskpart determine to be safe, the extend function will expand the partition to the remaining unused space on the disk.  The commands are simple to execute 'Shrink C:\' and 'Extend C:\' (however note they are case senitive and require enter be pressed at the end to prevent their accidental executiton)

I have removed the basic graphical installer that was included in v1.0 and v1.1 in favor of the SC command for simplified deployment and removal in v1.2, You can also download the entire source code for the project and modify it according to your needs for use with your environment/product. It is licensed under the Apache V2 license which does not require you to contribute or release any modified sources of the project, however any contributions would be gladly accepted provided they serve a useful purpose.

The app was built using .NET 2.0 code to facilitate easier deployment on Windows systems that may not be utilizing or have the .NET 4 framework installed.

Note: The project was developed in Visual Studio 2010, however since the removal of the graphical installer there should be no issues opening this in 2010 Express editions of Visual Studio.

If you have any questions feel free to post them in the support forum sf.net/projects/comredirsvc/forums/forum/1762797
I develop this application in my free time and will respond back as soon as possible during my non-working hours.