Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to wrap a vbs script

Posted on 2009-07-08
7
Medium Priority
?
241 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 600 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 1400 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Suggested Courses

636 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