仅运行一组嵌入式安装程序的 Inno Setup 安装程序
Inno Setup installer that only runs a set of embedded installers
我正在 Inno Setup 中创建一个安装程序,它只会 运行 一组嵌入式安装程序。它不会自行安装任何文件。
编译安装程序时,我收到此错误:
You must enter a full path with drive letter; for example: C:\APP or a UNC path such as \server\share
以下是我的代码,但我已将公司信息换成测试信息。我有完整的 UNC 路径,所以我不确定为什么会收到此错误?在此过程中,如何输入位置的凭据?
[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:\
。
有关此错误消息的一般性讨论,请参阅:
Inno Setup error when installing to USB drive root: "You must enter a full path with drive letter"
尽管您没有安装到 U 盘根目录。您正在尝试安装到 C:
根驱动器。那是错误的。您永远不应该尝试将任何东西安装到 C:
根目录。
我了解到您的安装程序实际上并没有自行安装任何真实文件。然后,您应该将 CreateAppDir
and Uninstallable
设置为 no
:
[Setup]
CreateAppDir=no
Uninstallable=no
并且您应该将子安装程序解压缩到 {tmp}
,而不是 {app}
。
另见 。
我正在 Inno Setup 中创建一个安装程序,它只会 运行 一组嵌入式安装程序。它不会自行安装任何文件。
编译安装程序时,我收到此错误:
You must enter a full path with drive letter; for example: C:\APP or a UNC path such as \server\share
以下是我的代码,但我已将公司信息换成测试信息。我有完整的 UNC 路径,所以我不确定为什么会收到此错误?在此过程中,如何输入位置的凭据?
[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:\
。
有关此错误消息的一般性讨论,请参阅:
Inno Setup error when installing to USB drive root: "You must enter a full path with drive letter"
尽管您没有安装到 U 盘根目录。您正在尝试安装到 C:
根驱动器。那是错误的。您永远不应该尝试将任何东西安装到 C:
根目录。
我了解到您的安装程序实际上并没有自行安装任何真实文件。然后,您应该将 CreateAppDir
and Uninstallable
设置为 no
:
[Setup]
CreateAppDir=no
Uninstallable=no
并且您应该将子安装程序解压缩到 {tmp}
,而不是 {app}
。
另见