bwgfoods Posted August 4, 2017 Report Posted August 4, 2017 I've setup the resident agent on a PC and configured a HTTP location for updates. the agent detects the updates in the HTTP location, downloads the new .ini file and creates an 'update.bat' file like below: net stop TNIResidentAgent del /F /Q "C:\Windows\TNI Resident Agent\tniwinagent.ini" ren "C:\Windows\TNI Resident Agent\tniwinagent_update.ini" tniwinagent.ini net start TNIResidentAgent del "C:\Windows\TNI Resident Agent\update.bat My question - what executes the batch file? It just sits there and never updates - what am I missing? Quote
Alex Posted August 4, 2017 Report Posted August 4, 2017 Hello, Thanks for your message. After the update.bat file is created, the TNIResidentAgent service executes the following command: cmd.exe /C C:\path\to\file\update.bat Quote
bwgfoods Posted August 8, 2017 Author Report Posted August 8, 2017 Well it's not working then - The old .ini file does not get deleted, the new .ini file does not get renamed and the .bat file is still there - 5 days after being created. there's noting in the event log on the server - is there a log for the resident agent service? Quote
Alex Posted August 9, 2017 Report Posted August 9, 2017 Hello,Sorry for the delay.This problem occurs because the name of the resident agent folder has spaces in it. Please try renaming this folder and make sure that there are no spaces anywhere in the path. We’ll fix this problem in one of the upcoming updates. Quote
bwgfoods Posted September 12, 2017 Author Report Posted September 12, 2017 OK, this is painful. I've stopped and unregistered the service, renamed the folder to c:\TNIResidentAgent (no spaces), re-installed and restarted the agent, Now, the application attempts to download the update but just doesn't do it - no log entries, nothing to diagnose from - just this in the log file: 2017.09.12 21:17:54:010 Starting service... 2017.09.12 21:20:02:286 Scheduler: downloaded new settings 2017.09.12 21:25:02:260 Scheduler: starting scan... ..but nothing downloads Help!!! Quote
bwgfoods Posted September 13, 2017 Author Report Posted September 13, 2017 type above - folder is C:\Windows\TNIResidentAgent Quote
Alex Posted September 14, 2017 Report Posted September 14, 2017 Hello,Most likely that the program downloads the update, then sees that the updated .ini file has the same timestamp as the current one, and therefore, the update is not applied. If the config-timestamp parameter differs from the current one and contains a more recent date, the following line will appear in the log:Scheduler: downloaded settings are newer, need to updatePlease make sure that you have exported the agent with the updated tniwinagent.ini file from the Resident agent tab in Options.Alternatively, you can manually update the config-timestamp parameter of the tniwinagent.ini file. Quote
bwgfoods Posted September 18, 2017 Author Report Posted September 18, 2017 Not the case: Local tniwinagent.ini: config-timestamp=20170810165919.164000+060 Remote one: config-timestamp=20170913115318.224000+060 I've monitored the local folder and nothing gets written to the folder, no errors in the event log, permissions on the folder have been triple-checked. What next??? Tail of log file from this morning: 2017.09.18 10:50:47:747 Scheduler: starting scan... 2017.09.18 10:50:47:748 Starting local scan... 2017.09.18 10:51:42:616 Scan finished 2017.09.18 10:51:42:617 Sending data via FTP... 2017.09.18 10:51:57:782 Data sent successfully, local data moved to "Sent" 2017.09.18 10:55:47:757 Scheduler: downloaded new settings 2017.09.18 11:00:47:734 Scheduler: starting scan... 2017.09.18 11:00:47:735 Starting local scan... 2017.09.18 11:01:34:239 Scan finished 2017.09.18 11:01:34:240 Sending data via FTP... 2017.09.18 11:01:40:370 Data sent successfully, local data moved to "Sent" 2017.09.18 11:05:48:884 Scheduler: downloaded new settings 2017.09.18 11:10:47:703 Scheduler: starting scan... 2017.09.18 11:10:47:704 Starting local scan... 2017.09.18 11:11:42:433 Scan finished 2017.09.18 11:11:42:434 Sending data via FTP... 2017.09.18 11:11:50:726 Data sent successfully, local data moved to "Sent" 2017.09.18 11:15:48:396 Scheduler: downloaded new settings 2017.09.18 11:20:47:718 Scheduler: starting scan... 2017.09.18 11:20:47:719 Starting local scan... Quote
Alex Posted October 4, 2017 Report Posted October 4, 2017 After a few messages via email, we managed to find out what was causing the problem in this case. The webserver was configured to not serve up .ini files. As a result, the tniwinagent was unable to update the configuration file, as it uses the same HTTP GET request as any browser. To solve the problem, you can use the .txt extension for the configuration file. You can specify the extenstion manually by opening the program Options while holding down the Alt key. A new field “Custom INI name” will become visible on the Resident agent page. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.