Link to home
Start Free TrialLog in
Avatar of Dov_B
Dov_B

asked on

I cant get my vb.net express app to start with System.Diagnostics.Process.Start("C:\WindowsApplication1 - 1 ")

I published a vb.net 2008 express application which I am now trying to run from a different vb.net application using
System.Diagnostics.Process.Start("C:\WindowsApplication1 - 1 ")
this is of courese a shortcut that I put in the c drive
any shortcut from any other program works just not my vb.net app shortcut what is wrong?
it keeps saying "The system cannot find the file specified"
SOLUTION
Avatar of CyberLex
CyberLex
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jorge Paulino
Is -1 an argument ?
You can try:

System.Diagnostics.Process.Start("C:\Path to your WindowsApplication1", "-1")
Avatar of Dov_B
Dov_B

ASKER

I changed the shortcut to ("C:\Path to your WindowsApplication") it works when I double click it but still says it cannot find it when I try to open it through vb.net's
System.Diagnostics.Process.Start("C:\Path to your WindowsApplication")
Can you show all the path and how do you use that instruction ?
Avatar of Dov_B

ASKER


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        System.Diagnostics.Process.Start _
      ("c:\WindowsApplication")
 
    End Sub

Open in new window

Avatar of Dov_B

ASKER

oh by the way the file is a shortcut
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dov_B

ASKER

yes when I double click the shortcut directly the application starts up but when I try to use the shortcut through vb.net it says it cannot find it but what is wacky is that if I put in a shortcut for any other application they run through vb.net I only have problems with the shortcuts to vb.net apps that I published myself
Avatar of Dov_B

ASKER

Dear jpaulino
I cant call th exe files directly because I have no way of knowing where vb.net 2008 express is going to install them
however I created the shortcuts differently and now I dont get the error which says it cannot find the file
however it does not run the program simply nothing happens
please note that
System.Diagnostics.Process.Start("C:\Myvb.netshortcut")
does run the shortcuts of any non vb app on my system I only have problem with apps I have created myself
also note that the ("C:\Myvb.netshortcut") does run properly when you double click it with your mouse
Avatar of Dov_B

ASKER

the problem was I was using the shortcuts used on the start menu when I used code to create the shortcut it worked
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry I was out :(
Glad you have solved your problem creating the shortcut in runtime. That was strange because I have created a test project and worked just fine. Nevermind ... it's running :)