如何在执行/verysilent安装后自动运行我的程序?
我可以在正常安装后通过使用DisableFinishedPage=yesin[Setup]部分自动运行我的程序(禁用完成页面并在安装后立即运行程序,无需用户干预)。
但是,如果我使用/verysilent不起作用的参数:我的程序会安装,但之后不会自动运行。
预先感谢您的任何帮助。
是否可以检索string.Contains方法中传递的值?
使用场景将是这样的:
foreach (string x in myList)
{
if (x.Contains("Salt") || x.Contains("Sugar") || x.Contains("Pepper"))
{
MessageBox.Show("The ingredient found in this line of myList is: " + //the ingredient found)
}
}
Run Code Online (Sandbox Code Playgroud)
目标是避免重复代码.现在我必须做以下事情才能达到预期的效果:
foreach (string x in myList)
{
if (x.Contains("Salt"))
{
MessageBox.Show("The ingredient found in this line of myList is: Salt");
}
if (x.Contains("Sugar"))
{
MessageBox.Show("The ingredient found in this line of myList is: Sugar");
}
if (x.Contains("Pepper"))
{
MessageBox.Show("The ingredient found in this line of myList is: Pepper");
} …Run Code Online (Sandbox Code Playgroud)