2
votes

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:

You must enter a full path with drive letter; for example: C:\APP or a UNC path such as \server\share

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;
1

1 Answers

3
votes

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

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"

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.

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

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

See also Use Inno Setup UI as a self-extractor only - No installation.