小编jon*_*neK的帖子

使用 InnoSetup 安装程序时,如何创建目录并将 exe 文件复制到该目录?

我有 InnoSetup 做的这个自动脚本:

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId=
AppName=VideoScreenRecorder
AppVersion=1.5
;AppVerName=VideoScreenRecorder 1.5
AppPublisher=Daniel Lipman
DefaultDirName={pf}\VideoScreenRecorder
DefaultGroupName=VideoScreenRecorder
InfoBeforeFile=D:\ScreenVideoRecorderHelp.txt
OutputDir=D:\ScreenVideoRecorderCompiler
OutputBaseFilename=Setup
SetupIconFile=D:\Activity Monitor.ico
Compression=lzma
SolidCompression=yes

[Languages]
Name: …
Run Code Online (Sandbox Code Playgroud)

inno-setup

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

我尝试使用 FileStream 创建文件但出现异常,为什么?

这是代码:

public OptionsFile(string settings)
    {
        
        if (File.Exists(settings))
        {
            
        }
        else
        {
        FileStream fs=File.Create(settings);

        fs.Close();
        }
        
        path_exe = Path.GetDirectoryName(Application.LocalUserAppDataPath);
        Options_File = settings;
        
    }
Run Code Online (Sandbox Code Playgroud)

上线:FileStream fs=File.Create(settings);

由于某种原因,它无法创建该文件。在 Form1 中我在构造函数中做了:

Options_DB.Get_Video_File();
Run Code Online (Sandbox Code Playgroud)

现在在 Options_DB 类中使用断点执行以下操作:

namespace test
{
    
    static class Options_DB
    {
        static string settings_dir;
        static string settings_file;
        static OptionsFile setting_file;
        static string path_settings;
        static string path_exe;
        static string outPutVideoFileDirectory;

        static Options_DB()
        {
            // ---  O P E N N I N G   S E T T I N G   F I L E …
Run Code Online (Sandbox Code Playgroud)

c# winforms

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

为什么在对int变量+ int变量求和时,我得到两个数字作为结果?

这是我的代码:

this.Invoke(new MethodInvoker(delegate {
    label13.Text = e.failedUrls + doneWebPages.ToString();
}));
Run Code Online (Sandbox Code Playgroud)

结果是:01,02,03,04 ..... 09,111

当e.failedUrls现在是例如1并且doneWebPages是22时所以在label13中显示我,总和23我看到122.

怎么了 ?

c#

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

标签 统计

c# ×2

inno-setup ×1

winforms ×1