# Runing Appvance IQ on Windows as a Service

It is recommended that you start AIQ services automatically rather than manually. The suggested method is to use the Autologon utility to setup Appvance IQ to run as service on Windows.

Autologon is Microsoft utility that enables you to easily configure Windows’ built-in autologon mechanism. Instead of waiting for a user to enter their name and password, Windows uses the credentials you enter with Autologon, which are encrypted in the Registry, to log on the specified user automatically.

It is recommended to start Appvance services automatically, but they can be started manually if needed. See [Starting AIQ Services Manually](https://docs.appvance.net/Content/AIQ/AIQ_Install/Windows/Install_WindowsAIQServiceManual.htm) for more information.

Prerequisites:

- Appvance IQ is installed on Windows OS
- Login to Windows using an account with administrator privileges

## Download and Install Autologon

1. Download Autologon from Microsoft here: [Download Autologon](https://docs.microsoft.com/en-us/sysinternals/downloads/autologon)
2. Extract `<span class="editor-theme-code">Autologon.zip</span>` archive. For example, extract to `<span class="editor-theme-code">C:\Autologon</span>`.

## Setup Autologon Service

### Checking for Previous Configurations

Verify that no other entries for Autologon service exist as follows. If there are previous configurations on the server, it may prevent Autologon from working correctly.

For any past users for which an Autologon service was created:

1. Open Autologon.
2. Enter the Username, Domain and Password.
3. Click **Disable**.

Check the Registry for Autologon entries:

1. Inthe Registry navigate to **HKEY\_LOCAL\_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon**
2. Change the value of the `<span class="editor-theme-code">AutoAdminLogon</span>` key from `<span class="editor-theme-code">1 (true)</span>` to `<span class="editor-theme-code">0 (false)</span>`, to disable the `<span class="editor-theme-code">AutoAdminLogon</span>` feature.  
    See [Turn on automatic logon in Windows](https://learn.microsoft.com/en-us/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon) on the Microsoft site for more information.

Active Directory considerations:

- When the user used to login is provided by an Active Directory domain and the Active Directory is set to have an interactive login, the Autologon process will not work. In those cases, try creating a local user in the machine itself, edit its group policy to remove any interactive logon and use this local user to set the autologin process.

### Configuring Autologon

1. Open Autologon.exe (64 bit). The **Autologon - Sysinternals** window appears.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-162147.png)
2. Enter the user’s password and click **Enable**.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-162216.png)
3. Open **Task Scheduler** with administrative privileges, click **Action** and select **Create Basic Task**. The Create Basic Task Wizard appears.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-162316.png)
4. Enter a name in the **Name** box (such as AIQ or Appvance) and click **Next**The Task Trigger list appears
5. Select **When I log on** and click **Next**  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-162527.png)
6. The Action list appears.
7. Select **Start a Program** and click **Next**  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-162744.png)
8. The Start a Program configuration appears.
9. Click **Browse**.
10. Browse to and select **&lt;aiq-path&gt;/TestNode/startup.bat** and click **Open**.
11. **IMPORTANT**: Also enter the **&lt;aiq-path&gt;/TestNode/** path in the **Start in** box and click **Next**.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-163155.png)
12. Select **Open the Properties dialog for this task when I click Finish**.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-163508.png)
13. Click **Finish**The Properties dialog appears.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210929-162027.png)
14. Select whether it runs when a user is logged into that test node of not. This choice will be important in situations where the system reboots when no one is logged into that test node.
    - **Run only when user is logged on**
    - **Run whether the user is logged on or not**
15. Check **Run with highest privileges**.
16. Click the **Settings** tab.
17. Uncheck the **Stop the task if it runs longer than** option.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-163826.png)
18. Click **OK**.
19. When prompted, enter the service username and password to apply the changes and click **OK**.  
    ![](https://docs.appvance.net/Content/Resources/Images/GeneralGraphics/image-20210927-161440.png)

### Verifying Autologon Service

You may test the Autologon service by running it manually from the Task Scheduler. However to ensure the settings are working as expected, it is recommended that you restart the server and confirm that Appvance IQ launches properly without a user directly logging into the server.

After you have configured AIQ to run as a service, proceed to the next step: [Installing License and Certificate](https://docs.appvance.net/Content/AIQ/AIQ_Install/Windows/Install_WindowsLicenseCertificate.htm)

---

Last updated: January 22, 2025

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>