Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

application not running from VBSCRIPT

Status
Not open for further replies.

Shift838

IS-IT--Management
Jan 27, 2003
987
US
I have an application that I need to run with various switches via VBSCRIPT and it launches the cmd window but does not seem to run the executable. This executable takes a few minutes to finish the process that it does and the window immediately closes and the programs says it is done. The part of the code that executes the file is:

Code:
Set objShell = WScript.CreateObject("WScript.Shell")
strcommand = "CHFARM /joinfarm /ddsc:SERVERNAMEHERE /zone:ZONENAMEHERE/odbcuser:UIDHERE/odbcpwd:PASSWORDHERE/dsnfile:c:\program files\Citrix\Independent Management Architecture\MF20.dsn /quiet"
objshell.run(strcommand)

Any help would be greatly appreciated.

 
>strcommand = "CHFARM /joinfarm /ddsc:SERVERNAMEHERE /zone:ZONENAMEHERE/odbcuser:UIDHERE/odbcpwd:pASSWORDHERE/dsnfile:c:\program files\Citrix\Independent Management Architecture\MF20.dsn /quiet"
It is simple: ask yourself does the string work as such in the command prompt window? If yes, yes; if no, no.
[tt]
strcommand = "CHFARM /joinfarm /ddsc:SERVERNAMEHERE /zone:ZONENAMEHERE/odbcuser:UIDHERE /odbcpwd:pASSWORDHERE /dsnfile:[red]""[/red]c:\program files\Citrix\Independent Management Architecture\MF20.dsn[red]""[/red] /quiet"[/tt]
 
Furthermore:
objShell.Run strcommand, , True

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top