Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.5k views
in Technique[技术] by (71.8m points)

.net - What VSDCA_Launch mean in Custom Action script

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')";

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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')";

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...