Results 1 to 5 of 5

Thread: How to pass variables objShell.Run command

  1. #1
    Join Date
    Feb 2009
    Posts
    38

    How to pass variables objShell.Run command

    hie,

    I hope some of you must be aware about the command called objShell.run. I want to know how to pass the variables to the objShell.run command. can anybody please help me giving the information regarding this....any ideas

    thanks

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How to pass variables objShell.Run command

    Try this:

    objShell.Run("%comspec% /k net user " & objUser.name & " /homedir:")

  3. #3
    Join Date
    Feb 2009
    Posts
    38

    Re: How to pass variables objShell.Run command

    I tried using the objShell.Run syntax given by you. But when I run this I get the following error message:
    Microsoft VBScript runtime error: Wrong number of arguments or
    invalid property assignment.

    what should I do ?

  4. #4
    Join Date
    May 2008
    Posts
    2,012

    Re: How to pass variables objShell.Run command

    Create a command string in a command line window that works for any of your user names. Copy that string from the command line window and paste it in a message box.

  5. #5
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to pass variables objShell.Run command

    I also wanted to pass the variables in the objShell.Run. Someone suggested to run the command as one line like this -

    objShell.Run "cmd.exe /k c:\Program Files\Advanced Data Exchange\ADX Desktop v3.3\adxautox.exe /g UploadFile"

Similar Threads

  1. Replies: 9
    Last Post: 30-08-2010, 04:57 PM
  2. Pass Variables By Reference in Javascript?
    By MAGAR in forum Software Development
    Replies: 5
    Last Post: 11-03-2010, 04:11 PM
  3. Replies: 3
    Last Post: 15-05-2009, 11:33 PM
  4. How to pass Cut paste command through CMD.exe
    By FlayoFish in forum Tips & Tweaks
    Replies: 3
    Last Post: 04-05-2009, 08:15 PM
  5. Replies: 2
    Last Post: 01-04-2009, 05:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,717,383,068.58197 seconds with 16 queries