+ Post New Thread
Results 1 to 13 of 13
Scripts Thread, convert vbs to exe in Coding and Web Development; Just sorted out a vbs to run a program that requires a password in the vbs (saves me having to ...
  1. #1
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,828
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39

    convert vbs to exe

    Just sorted out a vbs to run a program that requires a password in the vbs (saves me having to make the users local admins while they are logged on ), so would like to convert it to an exe to make it safe, after a bit of googling I can find paid for ones and evaluation ones but does anyone know of a free one?

  2. #2

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,144
    Thank Post
    113
    Thanked 518 Times in 447 Posts
    Blog Entries
    2
    Rep Power
    121
    You can encode the script so that it's not (easily) readable - Using Script Encoder

  3. #3
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,828
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39
    Tried that but when I enclode it and then try and run it it gives me an error. Used it with the code as shown in the link:

    <SCRIPT LANGUAGE="VBScript">
    'Copyrightę 1998. XYZ Productions. All rights reserved.
    '**Start Encode**

    my bit here

    </SCRIPT>

    I get error line 1 character 1, Error Expected statement

    Output:
    <SCRIPT LANGUAGE="VBScript">
    'Copyrightę 1998. XYZ Productions. All rights reserved.
    '**Start Encode**#@~^BQIAAA==@#@&@#@&}wDkW

    Any ideas what I may be doing wrong? Script works fine before encoding.

  4. #4

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,182
    Thank Post
    1,285
    Thanked 1,029 Times in 729 Posts
    Rep Power
    658
    Not using XP SP3 are you?

  5. #5
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,828
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39
    Yup, definately XP2 with all the updates (may be thats the problem). Still anyone know of a vbs to exe (free)?

  6. #6

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,182
    Thank Post
    1,285
    Thanked 1,029 Times in 729 Posts
    Rep Power
    658
    Do you mean you are using Service Pack 2 and haven't installed Service Pack 3? The reason I ask is that for some reason SP3 kills the Script Encoder:

    It should be noted that after installing windows XP SP3, the script encoder, screnc.exe, will not work. You will continue to get an error like "screnc.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

    AppName: screnc.exe AppVer: 0.0.0.0 ModName: msvcrt.dll
    ModVer: 7.0.2600.5512 Offset: 00036fa3

    This error will only occur when actually trying to encode a script, simply running screnc.exe will not cause the error. I don't see MS fixing this error any time soon, so if you need the script encoder, you will have to skip SP3, or have a VM handy that skips SP3.

  7. #7
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,938
    Thank Post
    114
    Thanked 272 Times in 250 Posts
    Rep Power
    104
    Could your script not be made into straight VB? These type of converters have been discussed here before and the general consensus was that these programs seem to just compress the thing and then run it from a temp file.
    I assume your script is using run somewhere or something? One option would be to use autoit as that has a native compiler and there seems to be some run as examples. http://www.autoitscript.com/forum/in...howtopic=77936


    EDIT looks like the command was renamed with different functionality if you read that thread but you could investigate the rest.

  8. #8
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,828
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39
    Yes, thats correct we have not installed SP3 here, just any updates that would be required using WSUS (service packs not included), anyway looks as though it may not work for me.

  9. #9

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,182
    Thank Post
    1,285
    Thanked 1,029 Times in 729 Posts
    Rep Power
    658
    If you want a hand converting it to an EXE, I'll take a look at it for you if you want? I've got VB.net running on my system, I'm sure it wouldn't take me long to convert your script to code and send you the compiled EXE

  10. #10
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,185
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    What about this?

    New Features Include:

    - Support for Executable Files, Batch Files, VB Script & Windows Installer Packages
    - RunAsUser can now compile your target files into the executable you create
    - Password is now encrypted with a 64bit Cipher to stop the discovery of the password
    - User Name and Password can be saved to the registry (encrypted), saving you having to type them again and again

    RunAsUser 4.1 free download. The function of this software is to allow Administrators to deploy applications that require elevated user rights to users who have restricted rights without having to issue Administrator Credentials to the user.

  11. #11
    TechSupp's Avatar
    Join Date
    Mar 2007
    Location
    South Yorkshire
    Posts
    1,828
    Thank Post
    288
    Thanked 112 Times in 93 Posts
    Rep Power
    39
    Looks prommising, thanks...sites off line at the moment to download it, so will have a look when its back up and running.

  12. #12
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,185
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Quote Originally Posted by TechSupp View Post
    Looks prommising, thanks...sites off line at the moment to download it, so will have a look when its back up and running.

    Typical. Here you go this is version 4.1 it seems to work ok.

    RunAS.zip - Windows Live

  13. #13
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    403
    Thank Post
    63
    Thanked 84 Times in 69 Posts
    Rep Power
    60
    this is what i use (see attached)

    it includes a little batch script to encode and rename the file.

    HTH

    BoX
    Attached Files Attached Files

  14. Thanks to box_l from:

    TechSupp (12th January 2010)

SHARE:
+ Post New Thread

Similar Threads

  1. Annoying csrss.exe final.exe virus
    By AXE in forum Windows
    Replies: 1
    Last Post: 17th August 2010, 07:58 AM
  2. Convert RM SmartCache2 to PC
    By speckytecky in forum How do you do....it?
    Replies: 1
    Last Post: 14th October 2008, 02:44 PM
  3. media convert
    By CyberNerd in forum How do you do....it?
    Replies: 1
    Last Post: 12th February 2008, 02:58 PM
  4. Lsass.exe and Lssas.exe
    By ndavies in forum Network and Classroom Management
    Replies: 5
    Last Post: 30th October 2007, 03:19 PM
  5. convert to mp3
    By Uraken in forum General Chat
    Replies: 16
    Last Post: 23rd March 2007, 08:47 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •