?
Solved

how do i run/execute files with a .vbs extention ?

Posted on 2001-06-25
20
Medium Priority
?
364 Views
Last Modified: 2013-12-29
hi..
i have a file with a .vbs extention which is wrongly associated with ms media player. i wanted to know which program to associate with it to run the .vbs file.

thanks
vikky
0
Comment
Question by:vikky999
[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
  • 7
  • 5
  • 2
  • +4
20 Comments
 
LVL 23

Expert Comment

by:slink9
ID: 6224250
It is vbscript and should be associated with visual basic.  Do you know the source of this file?  Do you know that it is not a virus?
If you want to associate it with visual basic you can open explorer, browse to that file, shift-right-click it, and select Open With.
0
 

Author Comment

by:vikky999
ID: 6224277
the file that i have isnt a virus. its a virus buster..well not exactly but still . infact i did try to open it in vb but i got a zillion errors...any other software that runs a .vbs file?
0
 
LVL 15

Expert Comment

by:lyonst
ID: 6224288
Hi,

The file type is Visual Basic Script file (I assume it is not a virus).

It can be opened with Visual Basic as follows...

Its simple all you need to do is change the file association.

You can do this in several ways ..

Select an file - hold down the shift key and right click on it.  Choose open with and select the

application you now wish to use to view the file.

1. In Explorer or My Computer, select a file with a .vbs extension.
2. From your menu, choose View, then Options, then File Types.
3. Select VBS file, then click the Edit button.
4. When the Edit File Type dialog box opens, click New.
5. In the Action box, type Open in XXXXX ( xxxxx - whatever application you want to use).
6. Click the Browse button, and select your new application. It will appear in the
  dialog box for  "Application used to perform action" and will probably
  be listed as:"C:\Program Files\VB6.exe"
7. Click o.k., then the close button.

Cheers,

T.
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 15

Expert Comment

by:lyonst
ID: 6224291
Also,

Just associate it with notepad and open it and see what it looks like.

T.
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6224469
a vbs script contains visual basic script which can be executed by the program specific by the vbs file. The only way is that you have to know it better.
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6224550
you can try to invoke this vbs file by activitaing manual using dos. You can identify any exe file that might use to trigger the vbs file, just type the <program name> <vbs file name> ..

Example


cscript newsletter.vbs

my assumption is base on my experinece of using vbs file in sending newsletter, wherby the csript program will activate this newsletter vbs file. Hope it could give you some hint here.

Regarsds
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6224579
i have miss your previous comment. For vbs file you dont need and file association to it. Infact specific executable program will invoke specific vbs file regardsless of its association, so it hard to tell what program is needed to run the vbs file. You can remove the vbs file association and it will still runs fine.

Regards
0
 

Author Comment

by:vikky999
ID: 6224604
i have a 15kb vbs file that i just downloaded from the net...can somebody take a look at it and tell me what to do with it ?..wait..ill send a little bit
Option Explicit

Dim Message, Title, Text1
Dim fso, WSHSHell, exefile, htmlfile
Dim tStart, tElapsed
Dim timeout1, timeout2, timeout3
Dim state(255)
Dim key(255)
Message = "Enter the name of the executable to wrap in Godmessage IV"
Title = "6IT's Godmessage IV Creator v0.4"
Text1 = "Sorry, user input was canceled"
Set fso = CreateObject("Scripting.FileSystemObject")
Set WSHShell = CreateObject("WScript.Shell")
Const ForReading = 1
Const ForAppending = 8
exefile = InputBox(Message,Title,"onz.exe", 4000, 3000)
If exefile = "" Then
     WScript.Echo Text1
     WScript.Quit()
ElseIf exefile = "onz.exe" Then

     If fso.FileExists(exefile) Then
          GMCreate()
     Else
          WScript.Echo "File Doesn't Exist!"
          WScript.Quit()
     End If
Else
     If fso.FileExists(exefile) Then
          fso.CopyFile exefile, "onz.exe", True
          GMCreate()
     Else
          WScript.Echo "File Doesn't Exist!"
          WScript.Quit()
     End If
End If
WScript.Echo "Success! and Elapsed time=" & tElapsed & " seconds"
WScript.Quit()

Sub GMCreate()
PrptHtmlFile()
PrptTimeouts()  



-----8888888---there was more but i cut it----888888---

any suggestions
??

0
 

Accepted Solution

by:
mehman earned 0 total points
ID: 6224688
A file with the extension VBS is a VBScript file It can be run in the following ways
1. cscript.exe <filename>
2. wscript <filename>

Hope this answers your question

Regards
0
 
LVL 8

Expert Comment

by:Navid
ID: 6225308
mehman:
Unlock the question. You are not even close to the answer.
vikky999:
Please reject the answer if you want a real answer from us!
I think I can help you..
0
 

Author Comment

by:vikky999
ID: 6225438
hey navid..yep i need an answer anyway
although i found the creator
thanks

please help
0
 
LVL 8

Expert Comment

by:Navid
ID: 6225464
Excellent..
If running the pack:
1. cscript.exe <filename>
2. wscript <filename>
could help,
I appologize to mehman.
Glad you solved your problem..
Good luck
Navid
0
 

Author Comment

by:vikky999
ID: 6225501
no no...it didnt work i gave the points to mehman by mistake....could you help me please
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6225888
even though if that work, that was taken from my previous comment.
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6225891
vikky999, if you wish to solve this matter, post a question in CS for their support.
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6225903
vikky999, as i had mention earlier, no matter you wanted to execute the vb script manually or automatically by a program you dont have to be worry about the file association, a vbs file can be executed no matter what fiel association it is.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6226055
Client accepted and closed this in error, I will refund these points.  Here is the link to the question requesting this.

for navid only....same vbs script???

http://www.experts-exchange.com/jsp/qShow.jsp?ta=win98&qid=20141328

Moondancer
Community Support Moderator @ Experts Exchange
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6226067
These points have been refunded.

Moondanced
Community Support Moderator @ Experts Exchange
0
 
LVL 6

Expert Comment

by:kahlean
ID: 6226149
i think the exe file that is needed to run the vbs file might be onz.exe as what my assumption base on the vbs codes. Just type onz <vbs file name>
0
 

Author Comment

by:vikky999
ID: 6227114
ok kahlean ill try
thanks mr moondancer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

771 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