Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Run vbscript from macro Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
kenb
Newbie
Newbie


Joined: April 28 2002
Location: United States
Online Status: Offline
Posts: 6
Posted: May 02 2002 at 21:53 | IP Logged Quote kenb

What is the correct format to use when launching an application? I'm trying to run a vbscript named WriteFile.vbs. I put it in to the powerhome directory.
The log file says that the macro executes, but it appears that the script file doesn't run.
Back to Top View kenb's Profile Search for other posts by kenb
 
kenb
Newbie
Newbie


Joined: April 28 2002
Location: United States
Online Status: Offline
Posts: 6
Posted: May 03 2002 at 09:08 | IP Logged Quote kenb

It looks like I have the format correct, I can get other programs to run. But vbs scripts won't run.
Back to Top View kenb's Profile Search for other posts by kenb
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 04 2002 at 21:56 | IP Logged Quote dhoward

Ken,

I havent played with executing VB scripts yet, but it should be doable. I'll do some research and find the definitive answer for you. It probably wont be until Monday as my notebook crashed and Im in the process of reloading, but I will get back with you. Just a thought, do you have the Windows Scripting Host installed? I believe at a minimum that it is required to run VB scripts.

More later,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: May 08 2002 at 15:10 | IP Logged Quote dhoward

Ken,

Found the answer for you. Windows Scripting Host must be installed on your system for this to work. The later versions of windows should already come with this but if you dont have it, you can download it for free at http://msdn.microsoft.com/scripting/. Once WSH is installed, just run "cscript.exe <yourfile.vbs>". Its that simple. For example, if you have a vbscript file named test.vbs that you'd like to run, your command line would be: cscript.exe test.vbs. You can also include parameters after the vbs file to be passed to your script file.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
kenb
Newbie
Newbie


Joined: April 28 2002
Location: United States
Online Status: Offline
Posts: 6
Posted: May 08 2002 at 19:47 | IP Logged Quote kenb

Thanks
Back to Top View kenb's Profile Search for other posts by kenb
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum