仅运行一组嵌入式安装程序的Inno

仅运行一组嵌入式安装程序的Inno

本文介绍了仅运行一组嵌入式安装程序的Inno Setup安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Inno Setup中创建一个安装程序,它将仅运行一组嵌入式安装程序.它不会自行安装任何文件.

I'm creating an installer in Inno Setup that will only run a set of embedded installers. It does not install any files on its own.

编译安装程序时,我收到此错误:

When compiling the installer, I am receiving this error:

下面是我的代码,但我已将公司信息换成测试信息.我有完整的UNC路径,所以不确定为什么会出现此错误?在此过程中,如何输入位置的凭据?

Below is my code but I have swapped out company info for test info. I have our full UNC path so I am not sure why I am getting this error? During this process, how are the credentials for the location being inputted?

[Setup]
AppName=DRsetup
AppVerName=DRsetup
DefaultDirName=C:\
OutputDir=.
OutputBaseFilename=DRsetup
DisableDirPage=yes
DisableFinishedPage=yes
Uninstallable=no

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[TASKS]
Name: MapDrives; "Description: Map the network drives"; \
    GroupDescription: "Application Selection:";
Flags: unchecked exclusive;
Name: Test; Description: "Test"; GroupDescription: "Application
selection:"; Flags: unchecked exclusive;
Name: Test2; Description: "Test2"; GroupDescription: "Application selection:"; \
    Flags: unchecked exclusive;
Name: Test3; Description: "Test3"; GroupDescription: "Application
selection:"; Flags: unchecked exclusive;
Name: Test4; Description: "Test4"; GroupDescription: "Application selection:";
Flags: unchecked exclusive;
Name: Test5; Description: "Test5"; GroupDescription: "Application selection:"; \
    Flags: unchecked exclusive;
Name: Test6; Description: "Test6"; GroupDescription: "Application selection:";
Flags: unchecked exclusive;
Name: Test7; Description: "Test7"; GroupDescription: "Application selection:"; \
    Flags: unchecked exclusive

[Files]
Filename: {sys}\net.exe; \
     Parameters: "use I: \\Test\PUB /user:administrator /PERSISTENT:YES"; \
     Tasks: MapDrives;
Filename: {sys}\net.exe; \
    Parameters: "use H: \\Test\SYS /user:administrator /PERSISTENT:YES"; \
    Tasks: MapDrives;
Source: "\\Test\PUB\Install\Test.exe"; DestDir: "{app}"; Flags:
ignoreversion; Languages: english; Tasks: Test
Source: "\\Test\PUB\Install\Test2.exe"; DestDir: "{app}"; Flags: ignoreversion;
Languages: english; Tasks: Test2;
Source: "\\Test\PUB\Install\Test3.msi"; DestDir: "{app}"; Flags:
ignoreversion; Languages: english; Tasks: Test3;
Source: "\\Test\PUB\Install\Test4.msi"; DestDir: "{app}"; Flags:
ignoreversion; Languages: english; Tasks: Test4;
Source: "\\Test\PUB\Install\Test5.msi"; DestDir: "
{app}"; Flags: ignoreversion; Languages: english; Tasks: Test5;
Source: "\\Test\PUB\Install\Test6.exe"; DestDir: "{app}"; Flags:
ignoreversion; Languages: english; Tasks: Test6;
Source: "\\Test\PUB\Install\Test7.exe"; DestDir: "{app}"; Flags: ignoreversion;
Languages: english; Tasks: Test7;

[RUN]
Filename: {sys}\net.exe; \
     Parameters: "use I: \\Test\PUB /user:administrator /PERSISTENT:YES"; \
     Tasks: MapDrive;
Filename: {sys}\net.exe; \
    Parameters: "use H: \\Test\SYS /user:administrator /PERSISTENT:YES"; \
    Tasks: MapDrive;
Filename: "{userdesktop}\Test.exe"; Flags: runascurrentuser; Tasks: Test;
Filename: "{userdesktop}\Test2.exe"; Flags: runascurrentuser; Tasks: Test2;
Filename: "{userdesktop}\Test3.msi"; Flags:
runascurrentuser; Tasks: Test3;
Filename: "{userdesktop}\Test4.msi"; Flags: runascurrentuser; Tasks: Test4;
Filename: "{userdesktop}\Test5.msi"; Flags: runascurrentuser; Tasks: Test5;
Filename: "{userdesktop}\Test6.exe"; Flags: runascurrentuser; Tasks: Test6;
Filename: "{userdesktop}\Test7.exe"; Flags: runascurrentuser; Tasks: Test7;

推荐答案

该错误与任何网络位置均无关.它是指 DefaultDirName 中的 C:\ .

The error has nothing to do with any network location. It is referring to C:\ in DefaultDirName.

有关此错误消息的一般讨论,请参见:
安装到USB驱动器根目录时出现Inno Setup错误:您必须输入带驱动器号的完整路径"

For a general discussion about this error message, see:
Inno Setup error when installing to USB drive root: "You must enter a full path with drive letter"

尽管您没有安装到USB驱动器根目录.您正在尝试安装到 C:驱动器根目录.那是错误的.您永远不要尝试在 C:根目录中安装任何内容.

Though you do not install to USB drive root. You are trying to install to C: drive root. That's just wrong. You should never try to install anything to the C: root.

我了解您的安装程序实际上并不自行安装任何实际文件.然后,您应该同时设置 CreateAppDir 可卸载 no :

I understand that your installer actually does not install any real files on its own. Then, you should set both CreateAppDir and Uninstallable to no:

[Setup]
CreateAppDir=no
Uninstallable=no

并且您应该将子安装程序解压缩到 {tmp} ,而不是 {app} .

And you should extract your sub-installers to {tmp}, not to {app}.

另请参见将Inno Setup用户界面仅用作自解压程序-无需安装.

这篇关于仅运行一组嵌入式安装程序的Inno Setup安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 04:37