I made this .bat just in case anyone using a Lenovo Thinkpad with an AMD processor tries to use an AJ40 dock with it. Lenovo's firmware updater requires a handshake with the PD Controller in the dock, which requires Thunderbolt. AMD doesn't have thunderbolt. What we do, is extract the actual firmware updater from Lenovo's .exe and force it to update in an admin cmd. You shouldn't run random .bat files though, it's a good way to get viruses or have your files ransomed. Please, try these steps to accomplish it on your own first. If that fails, then go to https://pcsupport.lenovo.com/us/en/downloads/DS505699 and click on the (Download) button on the row that says ThinkPad Docking Station Firmware Utility (when I wrote this the file was cs18dkfw334_web.exe). After you downloaded the file, just drop it on your desktop and run aj40fwupdate.bat. The script should find it. If it says it doesn't, and the file you downloaded doesn't start with cs1, open an issue and I'll update the app to find the updated file name if needed.
How to Update Your Dock Manually (The Secure Way)
You will need:
The official Lenovo firmware .exe from https://pcsupport.lenovo.com/us/en/downloads/DS505699
A file extractor like 7-Zip or WinRAR. (You can try ```firmware_path+file_name_here.exe /VERYSILENT /EXTRACT="YES" /DIR="C:\dockfw"```` but it isn't as reliable as 7zip)
Step 1: Download and Extract the Firmware Go to the Lenovo 40AJ Dock Support Page and download the firmware utility (e.g., cs18dkfw334_web.exe).
Save the file to a simple location, like a new folder on your Desktop called dock-update.
Right-click the downloaded .exe file.
Choose 7-Zip -> Extract Here.
This will unpack all the update files, including cs18_cmd.exe, into your folder.
Step 2: Run the Force-Flash Command Copy the path to the folder you extracted the files into from the address bar up top (C:\file\path)
Open the start menu/press the windows key and type cmd. Open as administrator (if this doesn't appear in your start menu, right click cmd and open as administrator)
Navigate in cmd to the folder you extracted the files into from the address bar by typing cd then pasting the path to your folder. (eg: C:\Users\your_username\Desktop\dock-update)
Now type the following command:
cs18_cmd.exe /u /f /s
In case you are curious what the / arguments mean: /u = Update
/f = Force (to bypass the PD controller bug)
/s = Silent
Step 3: Wait and Verify Go hydrate, stretch, do whatever. This will take 3-6 minutes. Nothing will appear to happen. Do not unplug the dock or close the window or generally touch your computer. If this messes up, it may brick your dock.
Once you're back at a new command prompt line, the process is finished.
If you attempt to run the original file from Lenovo now, it probably will still time-out, but you can verify that the update took place on what your machine can communicate with.
If you see that new version, the update was a success. You can now close the command prompt and enjoy using your updated dock.