.bat File on Windows Taskbar

When building my Active Directory search tool, I wanted to launch it from the Windows taskbar. I created a .bat file to activate the python virtual environment and run the program. However, you can’t directly add a .bat file to the taskbar. To get around this you can rename the .bat file extension to .exe, add it to the taskbar, rename the .exe back to .bat, finally edit the properties of the taskbar icon to point back to the renamed .bat file. Why Microsoft? ...

September 28, 2024

Everything is Manipulatable

When working on the task scheduler issue I previously posted, I managed to lock myself out of my computer. It’s been a long time since I have done that. I had some research to do. These days that means querying an LLM but I actually didn’t find this answer through them. Good ol’ Reddit solved it. See, on the Windows login screen, there is a button for the Ease of Access settings. If you click it, it will run an .exe called utilman.exe. This password recovery process involves you booting from the USB, opening the command-line, backing up utilman.exe, creating a copy of cmd.exe, renamed as utilman.exe. Now when you boot back to Windows, you can access the command prompt from the login screen by clicking Ease of Access and resetting your password. ...

September 23, 2024

Windows Task Scheduler Woes

My favorite cartoonist has a website where he displays daily selections from his archive. I want this in my life but I can’t be bothered to go to a website everyday. So several years ago, I wrote a python script to take screenshots of the cartoons and email them to me (scraping didn’t work). The script was scheduled through Windows Task Scheduler. Then I changed computers, brought over the code, and have been struggling for days to get the task scheduler to work. The task wouldn’t run the python script directly. I wrote .bat and .ps1 files to try and activate the virtual environment, then run the scripts. I fixed that, then the images were downloaded as black images. Over and over, problem after problem, including changing my password and getting locked out of my computer (… cool hack to restore to come). ...

September 20, 2024