小编Ale*_*exC的帖子

Inno Setup:/verysilent 安装后如何自动运行程序?

如何在执行/verysilent安装后自动运行我的程序?

我可以在正常安装后通过使用DisableFinishedPage=yesin[Setup]部分自动运行我的程序(禁用完成页面并在安装后立即运行程序,无需用户干预)。

但是,如果我使用/verysilent不起作用的参数:我的程序会安装,但之后不会自动运行。

预先感谢您的任何帮助。

automation inno-setup

3
推荐指数
1
解决办法
3701
查看次数

如何检索string.Contains方法中传递的值?

是否可以检索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)

.net c#

1
推荐指数
1
解决办法
92
查看次数

标签 统计

.net ×1

automation ×1

c# ×1

inno-setup ×1