Penginstal Inno Setup yang hanya menjalankan sekumpulan penginstal tertanam
Saya membuat penginstal di Inno Setup yang hanya akan menjalankan sekumpulan penginstal tertanam. Itu tidak menginstal file apa pun sendiri.
Saat menyusun penginstal, saya menerima kesalahan ini:
Anda harus memasukkan jalur lengkap dengan huruf drive; misalnya: C: \ APP atau jalur UNC seperti \ server \ share
Di bawah ini adalah kode saya tetapi saya telah menukar info perusahaan untuk info tes. Saya memiliki jalur UNC lengkap jadi saya tidak yakin mengapa saya mendapatkan kesalahan ini? Selama proses ini, bagaimana kredensial untuk lokasi tersebut dimasukkan?
[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;
Jawaban
Kesalahan tidak ada hubungannya dengan lokasi jaringan mana pun. Ini mengacu pada C:\
dalam DefaultDirName
.
Untuk diskusi umum tentang pesan kesalahan ini, lihat:
Inno Setup error saat menginstal ke root drive USB: "Anda harus memasukkan path lengkap dengan huruf drive"
Meskipun Anda tidak menginstal root ke drive USB. Anda mencoba menginstal ke C:
drive root. Itu salah. Anda tidak boleh mencoba menginstal apa pun ke C:
root.
Saya memahami bahwa penginstal Anda sebenarnya tidak menginstal file asli apa pun sendiri. Kemudian, Anda harus menyetel keduanya CreateAppDirdan Uninstallableke no
:
[Setup]
CreateAppDir=no
Uninstallable=no
Dan Anda harus mengekstrak sub-installer Anda ke {tmp}, bukan ke {app}
.
Lihat juga Menggunakan Inno Setup UI hanya sebagai self-extractor - Tanpa instalasi .