3 ms·
Automating something usually involves a risk from predicting the future: the cost of automation is amortized over the number of repetitions, but you don't alway
by barrkel 9y ago
Automating something usually involves a risk from predicting the future: the cost of automation is amortized over the number of repetitions, but you don't always repeat everything.
It's generally cheaper to automate something if you can perform it on a command line. With command history, it's easy enough to copy the commands and turn them into a script with appropriate parameterization.
It doesn't help you a great deal with Windows if you've been doing everything with GUIs. But Powershell itself is an investment that can pay off. If you can automate more everyday tasks, the pain of learning is amortized away.
I generally stick with the Unix-like shell that Cygwin gives me, and use the same commands and idioms on as I do on Linux and on Mac, on the very few occasions I use a Mac.
- gt_ 9y agoMy setup script starts by making a backup of the registry, then configuring Python. I use Python for most of the rest and Powershell only where necessary. Contrary to what my comment may suggest, I am actually a software minimalist. A large part of my setup involves removing clutter from the desktop environment. I have avoided cygwin partially just so I'm not scared of native windows command line, which I find not quite as bad as Powershell to work with, but more limited in interacting with the OS of course. I am familiar with basic linux Bash already and that's what I'm comparing all of this to. Maybe now is a good time to adopt cygwin because, well, better late than never.
- barrkel 9y agoGetting Cygwin set up right takes a little bit of work - it's much easier if you're familiar with configuring a Linux shell and terminal to taste. Out of the box, it's a bit rough; kind of similar to how Emacs is a bit rough. I am scared of the Windows command line - not because it's scary, but because it's so limited. I feel almost helpless, all my tools are missing, it's just so awful. In practice, the reason I use Windows is mostly games, but it's rare I fire them up these days - I have to upgrade and/or re-verify my Steam account almost every time I start the client. Outside of that the browser and the terminal are almost all I use, and I can have them just as easily elsewhere. My point being my experience may not translate to your environment quite as well. Registry in Cygwin is mounted under /proc/registry: ~$ ls -l /proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows total 0 dr-xr-x--- 72 SYSTEM SYSTEM 0 Dec 16 23:57 CurrentVersion dr-xr-x--- 2 SYSTEM SYSTEM 0 Dec 13 01:58 DWM dr-xr-x--- 4 SYSTEM SYSTEM 0 Dec 13 01:48 PrivacySettingsBeforeCreatorsUpdate dr-xr-x--- 6 SYSTEM SYSTEM 0 Dec 13 01:52 Shell dr-xr-x--- 4 SYSTEM SYSTEM 0 Dec 13 01:47 TabletPC dr-xr-x--- 3 SYSTEM SYSTEM 0 Dec 13 01:47 'Windows Error Reporting' dr-xr----- 3 barrkel None 0 Dec 13 01:58 Winlogon It's read-only however. Cygwin `regtool` lets you poke values in.