launch vb.net app from its shortcut from another app after deployi

G

Guest

Greetings,

I am deploying vb2005 apps using Click Once deployment. This works fine.
The problem is that the user needs to be able to launch a 2nd app from the
1st app, but the application startup paths are different for each user.
However, the shortcuts for these apps are created in the same Start directory
for each user.

Is it possible to launch app2 from app1 by calling the shortcut of app2 (or
vice versa)? How to do this? Or, how can I make app1 know the application
startup path of app2 (and vice versa) after deployment?

Thanks,
Rich
 
R

rowe_newsgroups

Greetings,

I am deploying vb2005 apps using Click Once deployment. This works fine.
The problem is that the user needs to be able to launch a 2nd app from the
1st app, but the application startup paths are different for each user.
However, the shortcuts for these apps are created in the same Start directory
for each user.

Is it possible to launch app2 from app1 by calling the shortcut of app2 (or
vice versa)? How to do this? Or, how can I make app1 know the application
startup path of app2 (and vice versa) after deployment?

Thanks,
Rich

System.Diagnostics.Process.Start("SecondApp.Lnk")

Thanks,

Seth Rowe
 
G

Guest

Thanks. So I guess this does not require any path? Well, I will find out,
won't I.

Thanks again,
Rich
 
R

rowe_newsgroups

Thanks. So I guess this does not require any path? Well, I will find out,
won't I.

Thanks again,
Rich


It requires the path of the shortcut - I just left out the "C:
\Whatever" part and just listed the name of the shortcut
(SecondApp.Lnk).

As far as settings the path after deployment, it really just depends
on how you want to do it. You could a settings in the app.config file,
a registry setting, an ini file, a seperate Xml file, etc. If tracking
a lot of settings I personnally like using a table in a database, but
it's all up to you.

Thanks,

Seth Rowe
 
G

Guest

The startup path for each app is

Dim theAppPath As String

theAppPath = "C:\Document and Settings\" & "theparticularUser" & "\TStart
Menu\Programs\TheDirEstablishedBySharePoint\TheApp.lnk"

Is it Click Once or Sharepoint that creates the deployment directory on the
client workstations? Is Sharepoint required for Click Once?

Anyway, I think I got the path thing figured out with the use of theFile.lnk

So it would be

Dim p As Process
p.Start(theAppPath)

Thanks again for your help.
 
G

Guest

I just tried the process.start thing from the shortcut. For posterity I note
this: the extention for my shortcuts is not .lnk but .appref-ms

System.Diagnostics.process.start("C:\...myapp.appref-ms)
 
R

Rad [Visual C# MVP]

The startup path for each app is

Dim theAppPath As String

theAppPath = "C:\Document and Settings\" & "theparticularUser" & "\TStart
Menu\Programs\TheDirEstablishedBySharePoint\TheApp.lnk"

Is it Click Once or Sharepoint that creates the deployment directory on the
client workstations? Is Sharepoint required for Click Once?

Anyway, I think I got the path thing figured out with the use of theFile.lnk

So it would be

Dim p As Process
p.Start(theAppPath)

Thanks again for your help.

"rowe_newsgroups" wrote:


Hey Rich,

Your code may trip up under the following circumstances:
- The user rearranged their start menu and renamed folders
- The user is on Windows 2000 or NT which stores the start menu in a
different location

It might be a good idea to check if the file exists before execution
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top