Solved

how to wrap a vbs script

Posted on 2009-07-08
7
210 Views
Last Modified: 2012-05-07
I have a script file (.vbs), in the content it has the domainadministrator user name and domain password.
This script will be run on a remote computer that is connected to our domain through VPN.
I would like to know if there is a way to make the user unable to edit the script and see the content of it.
another thing that I want to know is how to email the use a script in Outlook, usually Outook doesn't accept .vbs files.

Thanks
0
Comment
Question by:jskfan
  • 3
  • 2
  • 2
7 Comments
 
LVL 31

Expert Comment

by:Frosty555
ID: 24809953
You can add a fake extension to the end of the filename, like "myscript.vbs.renameme". Then Outlook will allow it through. Your users have to remember to rename the file back to a .VBS though. You can also ZIP the file up and send the zip file.

You cannot easily encrypt or hide the contents of a VBS file. Certainly not in any way that can't be easily undone. But almost anything you can do in a VBS script you can also do in a regular VB6 application. You can recreate your script in VB6 and then compile it to an EXE, which will be harder to backward engineer.

The real solution, though, is to just not have sensitive information in the file at all. What is this script doing that it requires the domain admin's username and password to be out in the clear? Maybe there is a better way to do it.
0
 

Author Comment

by:jskfan
ID: 24812540
I have Winrar would that cpmpress the file?
0
 
LVL 7

Expert Comment

by:brettkm
ID: 24812966
Yep.

You can also zip a file with winrar so it has a zip extension rather than rar.  This means whoever you email it to doesn't need to have Winrar installed and will more than likely be able to extract the file.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:jskfan
ID: 24812974
is that just by renaming a file from file.vbs to file.vbs.zip?
0
 
LVL 7

Assisted Solution

by:brettkm
brettkm earned 150 total points
ID: 24813534
No you need to use a compression program.  Winzip and Winrar are the most common ones.

http://www.winzip.com/
http://www.rarlabs.com/
0
 

Author Comment

by:jskfan
ID: 24817510
I rename a file with .zip or .rar and it changed the icon.
so It's up to the end user to extract it.
I don;t think I need to run winzip or winrar to make a zip or rar file.
do you agree?
0
 
LVL 31

Accepted Solution

by:
Frosty555 earned 350 total points
ID: 24818324
No. Like brettkm just said, if you want to compress it, you have to use a compression program.

Windows applies the icon by looking at the extension of the file. Since you manually changed the extension, windows changed the icon, but that doesn't mean the file is a valid compressed ZIP file. Inside it is still just your regular VBS file. You're just confusing windows by forcing a non-zip file to have a zip extension.

Use WinZip, WinRAR to make a ZIP or RAR file. Or you can do it using native windows way by right clicking on the file, and going to Send To->Compressed Folder (ZIP).
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes how to set permissions to allow a limited-permissions user to start and stop a particular System Service.   It is always best to give users only the permissions that they need to perform their job, so tweaking particular permi…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question