Scripting in Windows

24年 10月 2日 Wednesday
134 words
1 minutes

Background story

Recently, I have playing around with Windows scripting to perform automation of installation process.

Fun fact

I haven't do any scripting before in Windows platform, and this is the first I've tried.

So, what's different between linux and windows in terms of scripting?

  1. backslash in the path, WTF?
  2. msiexec need the installer's absolute, full path in order to work, WTF?
  3. escape character is ^ instead of \, WTF?
  4. runas instead of sudo, it require user to interact with a button by clicking it instead of enter some password, WTF?
  5. you can't escalate privilege on current terminal session legally and officially. you must spawn new terminal in order to achieve that. WTF?
  6. beware of error in your bat or cmd script! sometimes it gives you vague error and at the end you realize it just a typo or smth.

Yeah, that's new to me.

Title:Scripting in Windows

Author:ReYuki

Link:https://www.reyuki.site/posts/scripting-in-windows [copy]

Last updated:


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. You are free to share and adapt it, as long as you give appropriate credit, don’t use it for commercial purposes, and distribute your contributions under the same license. Provided under license CC BY-NC-SA 4.0