Start as Windows Service
Top  Previous  Next

Windows Services is a topic for experts only. If you do not know what a Windows Service is, there is a very good chance that you do not need this feature. If you are merely looking for a way to execute iMacros on a regular basis, the Windows Scheduler will do the trick for you.

In the following, we assume that you are familiar with the basic concept of a Windows Service.

You can start iMacros via any application that runs as Windows Service - more information on services can be found here. The advantage of using a Windows Service is that the application can run even if no user is logged in. Due to a restriction enforced by Windows on services, a service program can either be interactive (i.e. have a Console, read keyboard input, etc) or have network access - but not both at the same time. Since iMacros needs the ability to use the network more then user input, you need to provide the user name and password of a normal Windows account.

If you use iMacros inside an application that runs as a Windows Service (as opposed to running under a regular user account) you need to provide a user name and a password:

There a two methods to do this:

(1) [Recommend]: Use "iimRunner.exe" to start iMacros under a regular user account. This method is very easy to use and avoids all complications typically associtated with a Windows service

(2) Provide a password when you use
iimInit:
int ret_code = 
  iimInit( String command_line, boolean start_browser, String run_as_user, String run_as_password, String run_as_domain )


You can also provide the password encrypted. iMacros detects automatically if the password is in plain text or encrypted form. To encrypt your password, record a macro where you enter the password into a password text field on a web page (with security settings to
STOREKEY or TMPKEY) and then copy and paste an encrypted password.

Running iMacros as a Windows service does not affect the concept of a user session, because iMacros - while started by a service - effectively runs under the user account which you use in
iimInit.





Page URL http://www.iopus.com/imacros/help/examplewindowsservice.htm