Encode and Decode a VB script

Attached scripts can encode and decode a VB script file. Just drag and drop the VB script into the two script attached. The new decoded/encoded script can be generated using this. Script for encoding : Option Explicit  dim oEncoder, oFilesToEncode, file, sDest dim sFileOut, oFile

Code.zip
 
 
 
 
 
4.7 Star
(10)
23,114 times
Add to favorites
8/6/2013
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • How to make script Encode work on Windows 10?
    2 Posts | Last post February 13, 2019
    • This script dont stay running Windows 10 Pro
      
      Option Explicit 
       
      dim oEncoder, oFilesToEncode, file, sDest 
      dim sFileOut, oFile, oEncFile, oFSO, i 
      dim oStream, sSourceFile 
       
      set oFilesToEncode = WScript.Arguments 
      set oEncoder = CreateObject("Scripting.Encoder") 
      For i = 0 to oFilesToEncode.Count - 1 
          set oFSO = CreateObject("Scripting.FileSystemObject") 
          file = oFilesToEncode(i) 
          set oFile = oFSO.GetFile(file) 
          Set oStream = oFile.OpenAsTextStream(1) 
          sSourceFile=oStream.ReadAll 
          oStream.Close 
          sDest = oEncoder.EncodeScriptFile(".vbs",sSourceFile,0,"") 
          sFileOut = Left(file, Len(file) - 3) & "vbe" 
          Set oEncFile = oFSO.CreateTextFile(sFileOut) 
          oEncFile.Write sDest 
          oEncFile.Close 
      Next 
    • He's (script) working on Windows 10 Pro, just drag-and-drop you'r script onto file Encode.vbs, and you will have"YouFile.vbe"
      Both script working - Encode and Decode -  running on Windows 10 Pro
  • I need to Encode a .asp
    1 Posts | Last post July 17, 2018
    • Have a .ASP page that need to encoded.
  • How can I prevent vbe from being decoded?
    1 Posts | Last post December 30, 2017
    • I found that the vbe encoded with the encode.vbs can be decoded with the decode.vbs, so how can I protect the password hardcoded in vbe?
  • Thanks
    1 Posts | Last post October 01, 2015
  • Encoding/decoding affects VBS functionality?
    2 Posts | Last post August 15, 2013
    • Does encoding/decoding of VBS affects the script's functionality? And once encoded, how can the script be used?
    • Hello balaji..
      The functionality remains the same.the main code is hidden. This can be used when you are hardcoding passwords or dont want end user to see the code.