Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Execute command line switches from vbs

Reply
 
Old 11-26-2008   #1 (permalink)
Jeff C


 
 

Execute command line switches from vbs

I use the following three command lines extensively executing them from *.bat
files or in the “RUN” line of a Wndows Scheduled Task.

Command Line For Access Macro
"Full Path To Access Executable" "Full Path To Access MDB" /x "Name of
Access Macro"

Command Line For Outlook
"Full Path To Outlook Executable" /c "IPM.Note.Name of form" /a "Full Path
To Attachment"

Command Line For Docuanalyzer
"Full Path To Docuanalyzer Program" "Full Path To File" "Full Path To Report
Model" "Full Path To Output"

I have been unsuccessfully trying to build a VBS file that will run them:

Set wshShell = WScript.CreateObject ("WSCript.shell")
wshShell.Run("Full Path To Access Executable" "Full Path To Access MDB" /x
"Name of Access Macro")
set wshShel = nothing

Can someone point me to a reference or assist with a solution?

My goal is to reduce numerous separate scheduled tasks to only several VBS
files that will each hold all the command lines for each operation.

Thanks in advance.

--
Jeff C
Live Well .. Be Happy In All You Do

My System SpecsSystem Spec
Old 11-27-2008   #2 (permalink)


Vista Home Premium 64 bit SP1
 
 

Re: Execute command line switches from vbs

I'm not big into WSH but from this site:
wsh run

I get the impress you need to concatenate everything into one string
for the command line. If the command line params need parts to have double
quotes then you need to see how the escape them or wrap the quotes in
quotes... however vbs does it.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Explorer Command Line Switches Vista General
Explorer Command Line Switches Vista file management
command line switches of windows mail on vista Vista mail
Application Command Line Switches PowerShell
Execute from command line with environment variable in path PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46