Convert VBS to exe

Hello,

I wrote a VBS script to run a program as another user, but the problem is the password is stored in plain text as the user. If possible, I would like to convert a VBS to a true exe, or just find a way to hide the password.
So far all the programs i've found convert it to a self extracting exe. Any suggestions on programs? Or anyone know a script that can accomplish what i'm trying to do? I'm open for any of these.

Thanks in advance.
dscitsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Todd GerbertIT ConsultantCommented:
Microsoft used to have available a VBScript Encoder, not sure if it's still around by try searching at http://download.microsoft.com/
It's not full-proof encryption, but obfuscate the password and prevent casual viewers from seeing it.
0
Steve KnightIT ConsultancyCommented:
Depending upon what your script is and does using ADS as suggested here by t0t0  may be suitable in that you can hide your password in an alternate date stream which is effectively not there unless you know how to find it...

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/Q_25000620.html?cid=1133#a26130150

Can we se what your script is doing and maybe it can be revised to use such methods?

Steve
0
dscitsAuthor Commented:
Ok thanks i'll give that a try, I don't have time right now but i'll get back to you once I do. Meanwhile heres the script, so If you have any suggestions let me know. I found this online so I didn't handwrite it.

' ----- ExeScript Options Begin -----
' ScriptType: window,invoker
' DestDirectory: temp
' Icon: default
' OutputFile: C:\TaxPrep\TY09\Bin\TaxWorks\test.exe
' ----- ExeScript Options End -----
Option explicit
dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "runas /user:administrator ""splash09.exe"""
WScript.Sleep 100
'Replace the string yourpassword~ below with
'the password used on your system. Include tilde
oShell.Sendkeys "mypassword~"
Wscript.Quit
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Todd GerbertIT ConsultantCommented:
Here's the link to the encoder: http://www.microsoft.com/downloads/details.aspx?FamilyId=E7877F67-C447-4873-B1B0-21F0626A6329&displaylang=en
And here's what your script looks like once it's encoded (save it with a .VBE extension to run it (that's VB Encoded))

#@~^DgIAAA==v,OR O P2X+U^DbwOP}wOrKx/,$+Tkx,RRO O@#@&vPj^Mk2Y:zw)~AbxNGABkU\KVD@#@&B,f+kYGrDmOWMXl~D+:a@#@&EPq1GU),N0CEsO@#@&vP};YaEOobV+l~;)wKmahDna-:5!O-~rx'KC6qW.Vk-YdYc+6@#@&B,O ORO~3X+jmMrwDP62DkWUd,2UN,R OR @#@&rwDkKUP62VbmrO@#@&NbhPK?tss@#@&/Y~Wj4Vs',	/1Dr2DRZ.nmYnr(%mOvJq?mMkaORUtnV^Jb@#@&W?4nV^RI!U~JME	ldP&;k+.)m[:bxrdDDlOGMPEJk2^ld4!OR+X+rEJ@#@&	?1Dr2DR?^n+aPFZT@#@&EIwsl^n,Y4+,dYMkUL,XW;.ald/SGMN=,4VWSPSrY4@#@&BDtn~al/kAWMNP!dnN,W	PzW;.,/z/Dn:cP(U1VE[n,YrV9n@#@&GUtVVc?UN0+z/,Jhzal/kAWMNUr@#@&kmMk2Y }!kO@#@&f6YAAA==^#~@

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dscitsAuthor Commented:
Awesome thanks! I'll have to re-encode it with my password, But that should be the solution, I'll try it right now!
0
dscitsAuthor Commented:
OK so that worked like a charm, thanks. So for the future people reading this I downloaded VBScript Encoder and encoded it.
To do that, open a command prompt and change to the directory you installed VBScript encoder to,
cd C:\program Files\Windows Script Encoder

Then I copied the VBS script to encode to the directory and ran
screnc.exe /f test.vbs         (it will overwrite your vbs file)

and rename the extension to test.vbe and it worked. Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.