Setup SmartFTP service
The SmartFTP service is required to run scheduled tasks in the background session (session 0).
To setup the service, a Local Administrator is required and the user under which the service is running requires the Log on as service user right.
Only use this method if no user interface is available. E.g. on Windows Server Core.
set USER=user
set PASSWORD=password
sc create SmartFTP_%USER% binPath= "C:\Program Files\SmartFTP Client\SmartFTPService.exe" start= delayed-auto DisplayName= "SmartFTP Service (%USER%)" obj= ".\%USER%" password= "%PASSWORD%"
sc failure SmartFTP_%USER% reset= INFINITE actions= restart/60000
sc description SmartFTP_%USER% "Allows file transfers to be run in the background."
sc start SmartFTP_%USER%
wmic useraccount where name="%USER%" get sid
whoami /user
sc sdset SmartFTP_%USER% D:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SID)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
Keywords
service,scheduler