WshShell.Run paramaters list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • user1980
    New Member
    • Dec 2009
    • 112

    WshShell.Run paramaters list

    Hello..

    I am not sure if this is the correct location for this question....so moderator please feel free to move it to the right forum...thanks. ..

    I am working on a vb script for windows ...to point the mydocuments to a server...the script was not developed by me..I am new to this..and would like to know where can I find a good tutorial or list of all the parameters that follow WshShell.Run... I have googled for its parameters list but could not get any...

    can somebody please help me with this..thank you...
  • RedSon
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    Next time try going to MSDN directly...



    Or you can hit F1. Try that too.

    Comment

    • user1980
      New Member
      • Dec 2009
      • 112

      #3
      thank you for the response...i have gone through that..but could not find much help on the parameters..the re are only two parameters in that /k and /c ..but there are many there like /t /e etc....which are not listed in msdn....

      Comment

      • RedSon
        Recognized Expert Expert
        • Jan 2007
        • 4980

        #4
        All I see is:

        object.Run(strC ommand, [intWindowStyle], [bWaitOnReturn])

        Where do the /k and /c come from?

        Comment

        • user1980
          New Member
          • Dec 2009
          • 112

          #5
          oShell.run "cmd /K CD C:\ & Dir"

          The switch /k tells the command processor not to close the MS-DOS window. If you want to close the MS-DOS window automatically after termination, you must use the switch /c instead.

          similar /k and /c there are others too..which I would like to know
          thank you for your time

          Comment

          • RedSon
            Recognized Expert Expert
            • Jan 2007
            • 4980

            #6
            If you want to see what the cmd switches are then type "cmd /?" in a command window.

            Comment

            • user1980
              New Member
              • Dec 2009
              • 112

              #7
              ok..my bad..
              please find the line below..in the following line..I know what it does to certain extent..but would like to know what else it does.....
              err = WshShell.Run("c acls """ & objEnv("USERPRO FILE") & "\My Documents"" /e /g testserver\" ("USERNAME") & ":F", 0, True)'
              the /g testserver ......all this part gives the access to the user...
              i would like to know what the rest does..thank you for your time.......

              Comment

              Working...