omron — Running a Project Under Windows Services

Creating a New Project Specifies the Window user account under which the service will run. (This is the same as the User box in the Service Configuration dialog.) This is an optional switch; if it's not used, then the service will run under Local System. -password password Specifies the password for the given user account. (This is the same as the Password box in the Service Configuration dialog described above.) This is an optional parameter; it's not needed if no user is specified or if the specified user doesn't have a password. -name displayname Defines the service name that is displayed in the Computer Management console. The name must be enclosed in quotes.

This is an optional switch; the default name is "Studio". -descr description Defines the service description that is displayed in the Computer Management console. The description must be enclosed in quotes. This is an optional switch. -start Starts the service. This is the same as starting the service using the Computer Management console or by clicking Start in the Service Configuration dialog. -stop Stops the service. This is the same as stopping the service using the Computer Management console or by clicking Stop in the Service Configuration dialog. -delete Deletes the service. Example:

Creating the Service In this example, we want to create a new Windows service with the following options: Note that the system must already have a user account named "Studio" with password "Studio". So, to create the service with the desired options: 1. Make sure you're logged in as a user with administrative privileges. 2. Open a command prompt ( Start > All Programs > Accessories > Command Prompt ). 3. Navigate to the Bin folder: 4. Enter the command:

cd C:\Program Files\InduSoft Web Studio v7.0\Bin StdSvcInst –create –app "C:\Users\ username \My Documents\InduSoft Web Studio v7.0 Projects\ project_name / project_name .app" -startup auto –user IWS -password IWS –name "InduSoft Web Studio" –descr "Starts a IWS project" If the procedure is successful, then the system will display the message Service created . Otherwise, it will display an error message. Example: Changing the Project File After you create the service, you may want to change the IWS project file that it runs. You can do this by using the -app switch: 1. Make sure you're logged in as a user with administrative privileges. 2. Stop the service if it is running.

Page 100 InduSoft Web Studio IWS Project File C:\Users\username\My Documents\InduSoft Web Studio v7.0 Projects\project name\project name.app _ _ Startup Mode Automatic User IWS Password IWS Service Name "InduSoft Web Studio" Service Description "Starts a IWS project"