Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 06-06-2009
Member
 
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
Reply With Quote
  #2  
Old 06-06-2009
Member
 
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:")
Reply With Quote
  #3  
Old 06-06-2009
Member
 
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 ?
Reply With Quote
  #4  
Old 06-06-2009
Member
 
Join Date: May 2008
Posts: 2,008
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.
Reply With Quote
  #5  
Old 06-06-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
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"
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to pass variables objShell.Run command"
Thread Thread Starter Forum Replies Last Post
Network Diagram - Configure to show Forward Pass/Backward Pass m3lyssa Microsoft Project 9 30-08-2010 04:57 PM
Pass Variables By Reference in Javascript? MAGAR Software Development 5 11-03-2010 04:11 PM
How to load/refresh environment variables WITHOUT leaving command prompt? troy Windows XP Support 3 15-05-2009 11:33 PM
How to pass Cut paste command through CMD.exe FlayoFish Tips & Tweaks 3 04-05-2009 08:15 PM
How to change/add environment variables from command line PERMANENTLY? Moiz Windows XP Support 2 01-04-2009 05:46 PM


All times are GMT +5.5. The time now is 12:32 PM.