Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vb.net and launching an app from the cmd line

Posted on 2014-12-23
6
Medium Priority
?
284 Views
Last Modified: 2015-01-15
attempting to load a program from command line and keep getting "cannot find file specified".

If i load the below from cmd line it works fine but not when i try in vb.
C:\Windows\SysWOW64\CCM\VAppLauncher.exe /launch "Avaya CMS Supervisor R16 -- English 16.1.0.0 R2"

Open in new window


When i do the below, i get the error:

Dim process1 As New Process
        process1.StartInfo.FileName = "VAppLauncher.exe"
        process1.StartInfo.WorkingDirectory = "C:\\Windows\\SysWOW64\\CCM"
        process1.StartInfo.Arguments = (" /launch Avaya CMS Supervisor R16 -- English 16.1.0.0 R2")
        process1.Start()

Open in new window

0
Comment
Question by:derek7467
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 13

Expert Comment

by:Jesus Rodriguez
ID: 40515032
Try to put everything on the Same line like
Process.Start("VAppLauncher.exe","/launch Avaya CMS Supervisor R16 -- English 16.1.0.0 R2")

Open in new window

Just in case put the that this no work add the location of the program on the first part of the code like
Process.Start("C:\Windows\SysWOW64\CCM\VAppLauncher.exe","/launch Avaya CMS Supervisor R16 -- English 16.1.0.0 R2")

Open in new window

0
 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 750 total points
ID: 40515036
I imagine you need to quote the string after "launch" due to the spaces.

Try:
Dim process1 As New Process
        process1.StartInfo.FileName = "VAppLauncher.exe"
        process1.StartInfo.WorkingDirectory = "C:\\Windows\\SysWOW64\\CCM"
        process1.StartInfo.Arguments = (" /launch ""Avaya CMS Supervisor R16 -- English 16.1.0.0 R2""")
        process1.Start()

Open in new window

0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 750 total points
ID: 40515058
You specify the working directory but not the path to where the app is (not the same thing).
Try this:
Dim process1 As New Process
        process1.StartInfo.FileName = "C:\\Windows\\SysWOW64\\CCM\\VAppLauncher.exe"
        process1.StartInfo.WorkingDirectory = "C:\\Windows\\SysWOW64\\CCM"
        process1.StartInfo.Arguments = (" /launch Avaya CMS Supervisor R16 -- English 16.1.0.0 R2")
        process1.Start()

or this as the next trial in case the arguments need quotes
Dim process1 As New Process
        process1.StartInfo.FileName = "C:\\Windows\\SysWOW64\\CCM\\VAppLauncher.exe"
        process1.StartInfo.WorkingDirectory = "C:\\Windows\\SysWOW64\\CCM"
        process1.StartInfo.Arguments = (" /launch 'Avaya CMS Supervisor R16 -- English 16.1.0.0 R2' ")
        process1.Start()
0
 

Author Comment

by:derek7467
ID: 40515104
doesnt work, now i get "cannot start application", but if i run that same code from a cmd line, it works.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40515201
>>doesnt work, now i get "cannot start application"
Actually that sounds like one or more comments solved your original problem.  Now you have a rather different one.
0

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question