0

Creating a C# install package and I'd like on completed install for the "Program Files/My Application" folder to open.

Any way to do this?

Thanks!

P.K
  • 18,587
  • 11
  • 45
  • 51
user53885
  • 3,809
  • 11
  • 33
  • 43
  • I've tried the following: public override void Commit(IDictionary savedState) { base.Commit(savedState); string strDir = "C:\\Program Files\\My Application"; System.Diagnostics.Process.Start("explorer.exe", strDir); } But no matter what I put in there for the path, I get an error like "MyApplication\InstallActions.InstallState cannot be found :( – user53885 Dec 29 '09 at 18:19

2 Answers2

2

You will need to create a custom action. Here is an example that opens a web page after install.

Instead of opening the webpage, just use Environment.CurrentDirectory to get the location and open the directory by starting an explorer process with the path args.

Gabe
  • 49,577
  • 28
  • 142
  • 181
0

Environment.CurrentDirectory should do the trick.

Oded
  • 489,969
  • 99
  • 883
  • 1,009