Previous Section Table of Contents Next Section

Chapter 27. Encoded Scripts

IN THIS CHAPTER

Looking to protect the intellectual property or the integrity of your scripts? Encoding is the way to go, and WSH supports a complete script encoding technology. You'll learn how to use it, and how it can benefit your administrative scripts.

Do you ever worry about your users seeing your script source code and somehow learning more than they should? Or, perhaps you just want to ensure that your scripts aren't modified and run by someone who shouldn't be doing so. Encrypted or encoded scripts offer a solution to these problems, and Microsoft offers a Script Encoder tool to use with your administrative scripts. The Encoder can take a script and turn it into something like this.


//**Start 

Encode**#@~^QwIAAA==@#@&0;mDkWP7nDb0zZKD.n1YAMGhk+Dvb`@#@&P,kW`UC7kLlDG

Dcl22gl:n~{'~Jtr1DGkW6YP&xDnD+OPA62sKD+ME#@#@&P,~~k6PvxC\rLmYGDcCwa.n.k

kWUbx[+X66Pcr*cJ#,@*{~!*P~P,P~. YEMU`DDE bIP,P,+s/n@#@&P~P,~PM+O;Mx`WC^

/n#pN6EU1YbWx,o Obaw.WaDrCD+nmL+v#@#@&~P7lMPdY.q,'~J_CN,Y4rkP4nnPCx,C1Y

;mV, +(PkrY ~~l,wCL PmKhwmYk(snPSkDt~JI@#@&P~\m.PkY.+,'PE8MWA/ .kPGDt D

PDtmUPri@#@&,P-CMP/D.&,'Pr\rmMWkWWY~(YnDnY,2a2^WDn.,*!,Ep@#@&,P7lD,/D.

c,'~JSW;s9Ptm-+,4+ U~VKl9+[REI,Pr0,c\ DrWHZW.. mOAMGS/nM`*#@#@&P,

~P9W^Es+UOchDbO+v/YMq~_,/DDfPQ~kY.c*IP,+sd @#@&~~,P[W1;s+UDRSDkD+vdYMF

~_,/O.yP_,dYM&P3~dYMc*iNz&R @*^#~@

Although it looks like gibberish, it still runs perfectly. You can be assured that nobody will change the script, because changing a single character of the encoded script will render it useless.

    Previous Section Table of Contents Next Section