Solved

how to wrap a vbs script

Posted on 2009-07-08
7
219 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
The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

 

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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

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…
This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

832 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