To support advanced deployment scenarios, like multi-tenancy, or networking / permission issues, the service can be installed and activated manually without the MSI.
Steps
Extract
.zip
package to a folderUpdate the following settings in the
appsettings.json
fileAutoprintApiKey: The API Key generated for the user via OneFlo.
ClientId: THis needs to be set to a unique guid, can generate a new one at https://www.guidgen.com/
AutoPrintServiceName: The service name should be unique to allow multiple instances of the service to run successfully. The name should meeting the following criteria:
The name must be unique - if it is not uniquely named, the target windows service will not run. If there are existing services that are already running with the same name, this will cause issues.
The name length cannot exceed 50 characters.
The name should not have the following characters:
<
,>
,:
,"
,/
,\
,|
,?
,*
,.
Activate the client by running
Autoprint.WindowsService.exe /activate
from a command prompt in the installation directory.At this point the service can be run as a console app as the logged in user if required, without installing it as a windows service.
But to install it as a windows service:
Run:
sc.exe create "OneFlo Autoprint {custom text}" binpath=c:\ {installdirectory}\Autoprint.WindowsService.exe type= own start= auto depend= spooler
If the service needs to run as a user other than Local System, for instance if it needs the ability to access network printers, modify the service’s Login user manually through the services screen.
Start the service
What does this mean?
If there are 4 separate printers, create x4 OneFlo users, one for each print queue. The sender will need to do these steps x4 times for each service on the server that has access to the printers.
Installation
Log into OneFlo
Log into OneFlo using username configured
Download file
Navigate to https://portal.oneflo.com.au/PrinterConfig/download-v2-zip
Download the Zip and unzip it
Configure Folder
Copy the whole folder AutoPrint 2.3.10
into Program Files
Rename folder AutoPrint - 2.3.10
something meaningful related to username. Ideally name folder AutoPrint Username
Edit Settings
Open folder AutoPrint Username
Edit file appsettings.json
Generate Key
Add AutoPrintAPI Key
When creating a multi instance installation you will need to provide the AutoPrint service name, and for all installations it must be unique. (Alphanumeric only, limit of 50 chars)
Get ClientID
Add ClientID to file
Save and Close
Create Service
Open CMD prompt as Administrator
Navigate to install directory
Activate Service
Run Autoprint.WindowsService.exe /a
to activate the windows service
sc.exe create "OneFlo Autoprint {custom text}" binpath=
”c:\{installdirectory}\Autoprint.WindowsService.exe" type= own start= delayed-auto depend= spooler
If the service has been installed but can’t be seen then perhaps the service does not have a logon or access to printers
eg
sc.exe create "OneFlo Autoprint Username" binpath= "C:\Program Files (x86)\Flip Group\AutoPrint-RossCefm\Autoprint.WindowsService.exe" type= own start= delayed-auto depend= spooler
Check the service exists in Windows Services named OneFlo Autoprint Username
If you need to delete the service
sc.exe delete "OneFlo Autoprint Username"