Encode VBScript on Unix

Still, many terminal users are using Windows Operating System. So I have to adapt to develop scripts that can be both easily written and conveniently used. Yes, I use vbs and don’t want to share my codes.

Microsoft has a set of tools for developers to encrypt their vbs and thus release as vbe file.

Quickly I figured out that have to use wine to enable running vbs on non-windows platform.

I tried to install wine on Debian. But it keeps warning me lacking of X server. What the hell is X server ? I’m suppose to run just a vbs on VPS.

Later inspired by an answer from SO, I use xvfb to do the job but nothing correctly outputed.

I realized this must be a dead way and may have to use wine locally, on my Mac.

brew cask install xquartz
brew install winetricks
winetricks wsh57
wine cscript encode.vbs example.vbs

Got it!

I can generate vbs on Debian and encode into vbe on Mac without bothering Bill ~