To create a service called SunJavaSystemAppServer DOMAIN1 that starts and stops domain1 using password file C:\\Sun\\AppServer\\password.txt, run the following command:
C:\\windows\\system32\\sc.exe create domain1 binPath= "C:\\Sun\\AppServer\\ lib\\appservService.exe \\"C:\\Sun\\AppServer\\bin\\asadmin.bat start-domain --user admin --passwordfile C:\\Sun\\AppServer\\password.txt domain1\\" \\"C:\\Sun\\AppServer\\bin\\asadmin.bat stop-domain domain1\\"" start=auto DisplayName= "SunJavaSystemAppServer DOMAIN1" |