3 ms·
The thing i've always found weird is how javascript didn't catch on for windows sysadmin scripts instead of batch files, given that it's been integrated into wi
by Joeri 14y ago
The thing i've always found weird is how javascript didn't catch on for windows sysadmin scripts instead of batch files, given that it's been integrated into windows since w2k. People spend a lot of time learning powershell, while the cscript engine exposes the same level of ability in javascript.
- just2n 14y agoI did all of my scripting in Windows in JS. You had full access to COM objects, which means you could do a lot of stuff out of the box. One thing I hated was that it wasn't even fully ES3 conformant (it's jscript), and it seemed not to be maintained. I think they threw out cscript considerations when they built powershell. For me, a simple bash shell or even a jscript REPL would've been preferable. I think my favorite least-known thing about writing simple tools for Windows during my time as a sys admin was HTAs. You had full jscript COM access with a web page presentation that's packaged into something that you can run without opening a browser explicitly. It was awesome building full web applications that could do pretty much any administrative task on Windows.
- TazeTSchnitzel 14y agoHTAs were! I believe the user accounts management screen in Windows XP was actually one.
- roel_v 14y agoIn my experience of the big problems is that it's so hard and inconvenient to call other programs and capture/process or print-to-stdout (as required) its output from WSH (javascript or vbscript). Also, if cscript had been the default WSH handler (rather than wscript), that would've made it much more like batch files. It's in the details - I tried for years to switch to WSH over batch files, but each time it's those little annoying things that make me switch back.
- 16s 14y agoI think many sys admins thought of js as a web technology and back during w2k, systems and the Web were considered totally unrelated and many systems guys were dismissive of the Web. Things are much different today.