Encrypt your Vb scripts before using with SCCM

Encryption of VB script:-

vb scripts are the sole for deployment we use vb scripts every where from MDT to SCCM there are various codes written in vb scripts which requires a password for the accounts we are dealing with.Few days back i created a vb script to set the local admin password according to the location of the machines but the only requirement for the script to get into production was to encrypt it & then use it.so,here is the process which we have use to encrypt our scripts.
For the encryption of vb script we are using a 3rd party tool called Windows Script Encoder.
We need to install the application on the server. The default location where the application gets installed is:-
C:\Program files\Windows Script Encoder.

We need to browse to the app installation folder where the file screnc.exe is present and execute the following command.
Screnc.exe <Location of input script (vb script)> <location of output script (with vbe as the extension) >
This will generate an output script which will be in encrypted & in vbe format.

Note - Once the script is encrypted to vbe format we can’t change it back to vbs. we need to have a backup of the original copy of the script.


  1. Really very helpful the information given here is..

  2. Good Pranay... Excellent Work .... :)

    Update regular

  3. Hi

    Please be aware that the scripts are only encoded, not encrypted to obfuscate its content. It will NOT prevent reading it if one really want to.
    Don't store PW in your scripts!


    patrick sczepanski