问题
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 = 34 + 192 and it work fine.
sql = "INSERT INTO CustomAction
(Action
, Type
, Source
, Target
) VALUES ('VSDCA_Launch', '226', 'TARGETDIR', '[TARGETDIR]\App.exe')";
回答1:
Just a minor correction to the above solution: There's a backslash missing. I think it may have to do with the formatting of the post. The line should be:
sql = "INSERT INTO CustomAction (Action, Type, Source, Target) VALUES ('VSDCA_Launch', '226', 'TARGETDIR', '[TARGETDIR]\\App.exe')";
来源:https://stackoverflow.com/questions/3486353/what-vsdca-launch-mean-in-custom-action-script