You are not logged in.

#1 2007-11-08 18:33:24

Davigetto
Member
From: In your mind
Registered: 2007-05-10
Posts: 266

How Can I run a .vbs (Visual Basic Script) file on Linux?

Hello, I have a doubt:

How Can I execute on Linux a .vbs file? I can't use wine cause it is not a .exe file.

Is there any way?

Greetings


Only deaths can see the end of battles.

Blog: http://djmartinez.co.cc -> The life of a Computer Engineer

Offline

#2 2007-11-08 18:58:10

auditek747
Member
Registered: 2006-06-05
Posts: 17
Website

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

Hello,

I don't know if will help, but you can run

wine cmd

and get a Windows command prompt. (dos prompt)
I do this to run ".cmd scripts"

Last edited by auditek747 (2007-11-08 18:59:48)

Offline

#3 2007-11-08 20:35:21

Davigetto
Member
From: In your mind
Registered: 2007-05-10
Posts: 266

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

It don't work, look:

It's strange. On a virtualbox machine it works. On a Linux wine cmd, no :S. It tells to me "Bad Format" :S

Any solutions?


Only deaths can see the end of battles.

Blog: http://djmartinez.co.cc -> The life of a Computer Engineer

Offline

#4 2007-11-08 20:51:02

kumico
Member
Registered: 2007-09-28
Posts: 224
Website

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

it requires a vbs interpretter ,, try i.e .. `pacman -Ss ies4linux`

Offline

#5 2007-11-08 21:29:24

Davigetto
Member
From: In your mind
Registered: 2007-05-10
Posts: 266

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

Installing Internet explorer doesn't work. Is not an Internet aplication a vbs, is a Windows Program.


Only deaths can see the end of battles.

Blog: http://djmartinez.co.cc -> The life of a Computer Engineer

Offline

#6 2007-11-08 22:10:25

The Vaxorcist
Member
Registered: 2005-12-08
Posts: 18

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

What I would do is to:

Try to figure out what program runs .vbs files under windows.
Copy it (and whatever DLL's it needs) to your Linux system.
Use wine to run it.

Good Luck

Offline

#7 2007-11-08 22:57:01

kumico
Member
Registered: 2007-09-28
Posts: 224
Website

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

.vbs suggests visual-basic-script interpreted from websites through  internet explorer ... that's why i suggested you try to run it in there, i dunno if it'd work

Offline

#8 2007-11-09 10:13:09

Davigetto
Member
From: In your mind
Registered: 2007-05-10
Posts: 266

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

I have a program, called (Calculator.vbs). This program, without having to compile, is called on a Windows Line Commander with a simple "Calculator.vbs", and works opening a window. There are not .exe files and no Internet use. Is a program.

Is there anyway to execute it?


Only deaths can see the end of battles.

Blog: http://djmartinez.co.cc -> The life of a Computer Engineer

Offline

#9 2007-11-09 10:19:03

Mikko777
Member
From: Suomi, Finland
Registered: 2006-10-30
Posts: 837

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

Offline

#10 2007-11-09 13:27:42

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

Mikko777 wrote:

Google works, yes ... if you know what you are searching for. Try this search: VisualBasic is not VBScript. smile

Here is what you will need (consult an attorney first):

- Wine

- Windows Scripting Host (WSH) 5.6* (available officially from MS website, but requires validation):
http://www.microsoft.com/downloads/deta … laylang=en

* There is an update to 5.7 also available form MS

- You will also need (from your Windows installation):
mfc42.dll

- Once you have the files placed in your Wine '/system32' folder (via installer or extraction), you will need to register dll files. At minimum, I think you can get by with:

wine regsvr32 /path/to/vbscript.dll
wine regsvr32 /path/to/wshext.dll

Others may be required ... if you get more messages alerting you to register files, just repeat for each one necessary. Or register them all and be done with it.

Once you have WSH setup, you can launch the VBScript file by opening 'winefile' and double clicking on the script. From the command line, you will need to launch it with 'wscript':

 wine wscript "Z:\\home\\user\\.wine\\dosdevices\\c:\\Program Files\\test.vbs"

If you attempt to launch the VBScript with just:

wine  "Z:\\home\\user\\.wine\\dosdevices\\c:\\Program Files\\test.vbs"

you will get a message about 'BAD EXE Format' or similar.

Last edited by MrWeatherbee (2007-11-09 15:03:36)

Offline

#11 2007-11-09 13:50:56

Davigetto
Member
From: In your mind
Registered: 2007-05-10
Posts: 266

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

Weatherbee, you give me probably the correct solution but I have a little problem... I can't get WSH cause I don't have Windows on my house... Only Linux :S

Is there any other place where can I find that file?


Only deaths can see the end of battles.

Blog: http://djmartinez.co.cc -> The life of a Computer Engineer

Offline

#12 2007-11-09 14:01:19

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

Davigetto wrote:

Weatherbee, you give me probably the correct solution but I have a little problem... I can't get WSH cause I don't have Windows on my house... Only Linux :S

Is there any other place where can I find that file?

I suppose we're getting into dicey legal issues, and I really don't know of a trusted source (or untrusted source for that matter) to obtain files other than from MS. I suppose I'll now have to invoke 'google' as the only possibility.

Offline

#13 2007-11-09 14:28:42

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: How Can I run a .vbs (Visual Basic Script) file on Linux?

Follow-up:

Give this URL a shot:

http://www.microsoft.com/downloads/deta … layLang=en

The update to 5.6 (v 5.7) doesn't require validation, but it *may* fail to install for a couple of reasons:

- you don't have 5.6 installed
- wine may not be able to handle the type of installer included

So, use 'cabextract' to extract the files and place them in the wine '/sysem32' folder.

Offline

Board footer

Powered by FluxBB