Thursday 9 October 2014

Installshield Error 1327 (Or Invalid Drive)

A common problem I come across which causes me lots of problems to resolve, particularly with networked machines, is the Invalid Drive error (usually error code 1372) when you try and run the an InstallShield Installer often caused by a Mapped Network drive.  I believe the problem exists because you map a drive at a user level, but the administrator doesn't get the same 'layer' of drives (just try opening a mapped drive from an Administrative command prompt).   Previously, Id got round this problem by logging in as a local administrator, installing the app needed for All Users, then logging back in as the user required to finish off the setup.    Note, this problem usually occurs before you even choose which drive to install to, so I can only assume its a feature of Installshield related to either a temporary file store location, or enumeration of drives at start.

However, I've discovered a really useful work around which seems to resolve the problem, and its the subst command.   Subst associates a drive letter with an alternative drive/path, allowing you to have multiple letters pointing to a location.  It is to drive letters what the mklink is for files and folders.

To use it, fire up an administrative command prompt and type:
susbt M:  C:\temp\installshieldtemp
where
subst ProblemDriveLetter TemporaryFolderLocation 

Run the installer to let it install and you can then cleanup with:
subst /D M:
where /D is delete and M: is the Drive letter you used in step 1.

Just typing subst will show  you drive letters you have susbtituted.