how to use shell.run


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: how to use shell.run

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    how to use shell.run

    [Originally posted by anu]

    hai in my application i want to use shell.run method to change my directory path and then executing DIR command.for that i am using syntax:

    Set xshell = CreateObject("wscript.shell")
    xshell.run "command /K CD C:\ & Dir"
    It opening cmd window but giving error "too many parameters &"
    how can i use there two commands in a single statement?

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:how to use shell.run

    [Originally posted by Phlip Bradbury]

    You can use ChDir("C:\") (it probably has a different name in .net) to change directory and then use shell.run

    another thing to try (which may or may not work) is to use "command \k cd C:\ " & Chr(20) & " dir" - if you type 2 commands seperated with ^T (chr(20)) it runs them as seperate commands

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center