views:

37

answers:

0

I want to launch an application after installation with Visual Studio setup&deployment output. I follow the article 'How do I launch an application after install in a Visual Studio Setup Project'. It has a solution that using Custom Action to add a checkbox and launch the application after installation. But I still have a problem, the application has launched with the working directory was difference from the target directory. Therefore it can't read XML configuration file. I've read more about Custom Action at Custom Action Types and think I should use action 34 or 35 but I'm still confuse how to use.

The original insert action statement in script is: sql = "INSERT INTO CustomAction (Action, Type, Source, Target) VALUES ('VSDCA_Launch', '210', '" + fileId + "', '')";

I known that 210 is 18 + 192 but don't know what VSDCA_Launch mean. How can I launch the app with target directory. Thank you.

EDIT

I've changed to 226 = 24 + 192 and it work fine.

sql = "INSERT INTO CustomAction (Action, Type, Source, Target) VALUES ('VSDCA_Launch', '226', 'TARGETDIR', '[TARGETDIR]\App.exe')";