PDA

View Full Version : Encode *.vbs (W2K)



jdharm
09-26-2003, 08:34 AM
I have a couple of high-dollar engineering apps (AutoCad, Inventor, CircuitMaker) that the authors saw fit to write the programs such that only Admins can run them.

As a final solution ( I couldn't come up with anything else and I will not turn my Users into Admins) I ended up using RunAs and SendKeys to start the apps with an admin account while a User is logged in. I used a username that was a huge random string and everything flashes fast enough I am hoping that no one can read it or interrupt it. I do this with a simple vbs script since I don't really know any programing languages.

I have heard vague references to 'encoding' vbs files so that they are executable but not human readable without a decoder ('keep the honest thief honest' type thing). Anyone know how this is done? I know VB files can be made executables fairly easily, but not vbs. I looked up the info on MS Script Encoder, but it seemed to only apply to script embedded into html or asp pages. I couldn't figure out how to use it with a stand-alone script and the paltry documentation on the MSDN page didn't mention this possibility, so I'm thinking that is the wrong way to go altogether.

Any suggestions?

Josh
<a target="_blank" href=http://www.jdharm.net>www.jdharm.net</a>

motoflop
09-28-2003, 11:54 AM
Google search found this link "http://www.microsoft.com/downloads/details.aspx?FamilyId=E7877F67-C447-4873-B1B0-21F0626A6329&displaylang=en".

It's script encoder. I didn't catch if that can encode also vbs files, but you can find that out yourself.

jdharm
09-29-2003, 08:07 AM
Yes, I am aware. See third paragraph of my post on why I didn't use it.

Anyone else?

Josh
<a target="_blank" href=http://www.jdharm.net>www.jdharm.net</a>

Jama
10-02-2003, 03:44 PM
Hi Josh,

Get the <a target="_blank" href=http://www.microsoft.com/downloads/details.aspx?FamilyId=E7877F67-C447-4873-B1B0-21F0626A6329&displaylang=en>MS Script Encoder</a> and install it.
Launch it using the right Syntax;
screnc &lt;source&gt; &lt;destination&gt;

Where source is a vbs file and destination is a vbe file (VBScript Encoded Script File)

The script will be executable but not human readable which is exactly what you want.
Note: if you want the encoding to start at a specific point in the script, then place this line where you want it to start;

'**Start Encode**
Code you want encoded.

Jama

jdharm
10-03-2003, 05:52 AM
Ahhh. That's the ticket. I was screwing it up with the wrong extention on the output file. I guess the computer didn't know how to handle the file correctly because of the wrong extention.

Thanks again Jama.

Josh
<a target="_blank" href=http://www.jdharm.net>www.jdharm.net</a>