Introduction
Installation of Spindle Document Distribution in Unattended Mode.
Versions Applicable
- Spindle Document Distribution Standalone v8 and later
- note: for Spindle Document Management v7.4+ please refer to the equivalent Spindle Document Management knowledge base)
Requirements
- A fully installed and configured printing environment (e.g. Sage ERP X3, Realitex), with printing running under a service account that can log in interactively to the server.
- Spindle Document Distribution with a licence that allows Unattended Mode
- Windows Server 2012 or later
- Understanding of Windows Registry, Task Manager and Services.
Spindle Pro and Spindle Pro Form Creator
Please note: as Unattended Mode does not allow any user-interface to be presented to the user, the Spindle Pro and the Spindle Pro Form Creator printers cannot be used on a machine running in Unattended mode.
To create form backdrops you can do one of the following:
- Create all required forms between installation and configuring for Unattended mode.
- Install Spindle Document Distribution to another machine in interactive mode, and ensure it is using the same shared SpindlePro folder as the unattended mode installation. use this machine to print forms to the Form Creator
- Create forms on a separate installation of Spindle Document Distribution, and export the forms from the Forms Manager as fmc files and then import into the Forms Manager on the Unattended Mode site.
Note: If your forms are multi-page (ie Terms and Conditions forms), you should use the first or the second option.
Things to know
- The name of the ERP's print account & its password
- The Windows Security ID (SID) for that user
- Which Windows Session is any given process running in (add Session ID to Task Manager Columns)
- The combination of a User and Windows session is considered the User Context.
Establish the Print Agent Process and Print Agent user account
We need to know which windows user account is going to be printing to the Spindle Pro Auto printer.
Application | Print Agent Process |
Realitex | FGLRUN.exe |
Sage X3 ERP | adxSrvlmp.exe |
Protex | |
Sage 500 | |
Sage 1000 | |
NAV NAS | |
NAV Dynamics AX |
We will refer to this as the Print Agent process and the Print Agent user account.
For Sage X3, this is the account that the ”AdxSrvImp.exe” process is running under on the print server. Other ERPs will use a different process to call the printer. It will also be the name shown as the owner of any print jobs in the Windows Print queue.
In the image below it is "adonix" with a password of "adonix". We need to run the Distribution processes in this context
Alternatively check the Sage X3 management console, where this is configured when installing Sage ERP X3.
Establish the Windows Security ID
All Windows accounts are linked to a Security ID or SID that is used internally. You can see the SID linked to the usernames by running the following command in an Administrator command line:
wmic useraccount get name,sid
Typically, you only need to pay attention to the last four digits to uniquely identify the user from the SID. Keep a note of this SID for future reference.
If you cannot run the installation while logged in with the service user account, you can proceed as below, but any references to the HKEY_Current_User hive of the registry will instead need to be made in HKEY_Users\[Windows SID]\ instead.
Show the Session ID
In Task Manager>Details, right click the column header and choose Select Columns
Add a checkmark against Session ID
You can now see which processes are running in which session. Session 0 is the session for Windows services to run. We need Spindle Document Distribution in Session 0.
Installation
Install Spindle Document Distribution onto the print server while logged in with the print agent user account. Please ensure that this user has admin rights to install the software.
Once installed, the User Setup Wizard will be shown. Complete the wizard, accepting all defaults, or selecting the options you require. This will ensure that any user-specific settings (eg email credentials) are saved into the correct part of the Windows registry.
If you are not able to run the installer as the service user, these settings will be saved into the incorrect hive of the registry and will need to be copied from HKEY_Current_User to HKEY_Users\[Windows SID]\ after completing the wizard.
If you need to create form backdrops using this machine, now is the time to do it.
Stop the Monitor
The installer will place a command in the registry to launch the Spindle Document Distribution Monitor on each login. This needs to be removed for unattended mode use, so open the Windows Registry and remove the entry under
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run
Enable Crystal Reports Patch (if required)
If you will be using an ERP that uses Crystal Reports, such as Sage X3, SYSPRO and others, enable the Crystal reports patch in
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Draycir\Spindle Document Distribution\Generic\Configuration
Auto-Close Processor
Ensure that the Spindle Document Distribution processor will close after a successful print by checking that the DWORD key Auto Close Processor exists and has a value of 1 in
Computer\HKEY_CURRENT_USER\SOFTWARE\Draycir\Spindle Document Distribution\Generic\Distribution
Configure the print drivers and the service
Next, add the following two DWORD entries to the Windows registry under
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Draycir\Spindle Professional\Printers\Spindle Pro Auto\Agent
- Allow Domain Session
- Allow Self Session
and set their values to 1
Next, set the Spindle Pro Printer Agent service to run with the same credentials as the ERP service user.
Open services.msc, right-click the Spindle Pro Printer Agent service, choose Properties and select the Logon tab:
Set the account to that of the ERP service user and restart the service.
You will now see in Task Manager that the process dsplagent.exe is running in Session 0 as the ERP user instead of SYSTEM:
Finally enable unattended mode in Spindle Document Distribution Tools>User Settings>Unattended Mode.
Check the first three of the four Silent running options. These will prevent Spindle Document Distribution from attempting to show any UI in session 0.
Do not check the fourth option here "Allow server UI interaction", This is a legacy option that allowed UI to be displayed under Windows Server 2003 and will cause issues if checked.
Test Print / Troubleshooting
- Ensure that there is no instance of SpindleDocDistmonitor.exe running for the service user in a session other than 0. If no Monitor is running this is fine.
- Invoke a print from the ERP
- If the print destination is configured correctly you will see an Eprinter.log file in the Log Files folder (In the Documents folder of the service user)
- The next step is that the SpindleDocDistMonitor.exe is launched and a Monitor log file is created. The Monitor checks the licence, and tests the Printer Setup keys in the registry to see if the User Setup Wizard needs to be run.
- If the User Setup Wizard does not need to be run, the Monitor will call the Spindle Document Distribution Processor to process the document. This will cause the Processor log to be created, which can be troubleshooted as any standard processor log file.
Upgrades
When upgrading a site configured for unattended mode, please re-check the above steps, as the following items may have been reset to the defaults:
- The Service may be reset to run as SYSTEM
- Auto Close Processor
- Allow Domain/Self Session Registry entries
- The Printer Setup key may have been changed, if so, the Monitor log file will show:
20210216.103104 04: ENTERING DoUserSetupWizard 20210216.103104 04: LM SPLHKEY_PRINTERSETUP 3d451fe3-123d-4250-a757-1900afe51234 <-- HKLM 20210216.103104 04: SPLHKEY_PRINTERSETUP 40641fe3-123d-4250-a757-1900afe515c9 <--HKCU 20210216.103104 04: ENTERING CallWizardDLLFunction
If these two values do not match, the user wizard is called. Following an upgrade, the user settings will be preserved, so the wizard is not required.
Copy the value shown for SPLHKEY_PRINTERSETUP (this is the value read from HKCU\...) and update the registry for the Local Machine
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Draycir\Spindle Document Distribution\Generic
such that the Printer Setup keys match
Knowledge Base Article Details
Related Product | Spindle Professional |
Reference Number | KBA-01-01-004 |
Document Date | 02/05/2019 - Original version archived in attachment |
Original Author | Vince Hodgson |
Document Version | 2.2 |
Last Updated | 31/03/2023 |
Update Author | Vince Hodgson |
Keywords |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article