Windows NT Resource Kit provides below two utilities that
allow you to run an executable as a service
Instrsrv.exe
Srvany.exe
More
details regarding the same can be found at the below links.
MyEnum foo = (MyEnum) Enum.Parse(typeof(MyEnum), myString)