杏吧传媒

Search
searchclose icon

杏吧传媒 Development Notes: Updating the Updater

Glitch effectGlitch effectGlitch effect
Glitch banner

If you鈥檝e ever taken a look inside the 杏吧传媒 Agent directory you may have noticed the file聽wyUpdate.exe聽. This executable is聽, the third party update utility we use as part of the agent update process. Our small team had plenty of work ahead of us when we first started developing the 杏吧传媒 agent in 2015, so we decided to find something we could quickly adapt and integrate to perform updates. wyUpdate fit the bill perfectly; Windows support, the ability to update a Windows service鹿, and it didn鈥檛 break the bank.

While wyUpdate is reliable and easy to use, one of the downsides for us has always been its .NET requirement. Since we support everything from Windows Vista虏 to Windows Server 2019, we can鈥檛 rely on a standard version of .NET everywhere. As such, the 杏吧传媒 Agent installer includes two聽wyUpdate.exe聽files, one for .NET2 and another for .NET4. The installer decides which version of聽wyUpdate.exe聽to install based on the version of Windows.

The .NET version requirement became an issue recently when we started to move to TLS 1.2. Older versions of .NET do not support TLS 1.2 and newer versions require a registry modification to enable it. Since we can鈥檛 require all of our partners to upgrade their .NET installations we had to find an alternate solution.

As it turns out, wyUpdate is open source and the author published the specification. We originally purchased a license for the聽聽(used to create the update packages), but ultimately ended up using the specs to develop our own build tool that we could better into the agent/installer build process. While we couldn鈥檛 leverage the build tool code in a new updater (the build tool it is written in Python and we needed a compiled executable to ship), the experience developing it helped with the new development. The 杏吧传媒 Agent is written in聽, so re-writing the wyUpdate functionality in GoLang was a no-brainer. In keeping with the open source spirit of wyUpdate, we have聽.

We鈥檒l be testing the new updater extensively over the next few weeks and plan to roll it out later this year once testing is complete.

[1] Updating Windows services is tricky because the service can鈥檛 be running when the update is applied. wyUpdate was designed with that in mind. The service starts the wyUpdate process, the wyUpdate process then terminates the service, updates the service executable, re-starts the service, and finally exits.

[2] Yes, the 杏吧传媒 Agent still works on Windows Vista, but that doesn鈥檛 mean we recommend using it. The same goes for Windows 7 and Windows Server 2008; Microsoft is ending support for these operating systems in January 2020, however, the 杏吧传媒 Agent will continue to operate on these operating systems for the foreseeable future. That said, we highly recommend moving to an operating system that is currently supported by Microsoft.

Share

Sign Up for 杏吧传媒 Updates

Get insider access to 杏吧传媒 tradecraft, killer events, and the freshest blog updates.

By submitting this form, you accept our Terms of Service & Privacy Policy
Oops! Something went wrong while submitting the form.
杏吧传媒 at work