Installshield receives a “Insert Disk 2” request, etc.

I am using the basic MSI installation.

I am trying to get a drive to ask for "Insert next drive," which will then continue for the user to insert the next drive, and then continue with the installation.

Here is my setup:

  • DVD1: install
  • DVD2: media content 1 (there is content for copying to one folder as installation)
  • DVD3: Media Content 2

I managed to use the Installshield wizard, which allows you to use the disk. I installed it in Manual and indicated the files where they should be. After going through this process, I am left with three (3) folders called "DISC1", "DISC2" and "DISC3".

I burned the first disc, expecting that everything would work fine, and so that he would prompt me as soon as he finds out that there is content trying to copy something that is not on this disc .. but instead ... it gives an error saying, that he cannot find the contents on disk (surprise!)

I was wondering what am I doing wrong so far? Does anyone have the same problem?

thank

+3
source share
2 answers

, SAME FOLDER CD . ( .MSI.) , - MediaPackage. upgrqade ( ), " 1", . .

, Windows, .

, - - .

( , , ?), ), , MediaPackagePath - , ( MediaPackage). , Rollback MediaPackage, .

, GUID . , , ProductID.

// For XP/2000/NT MediaPackage is set in two places:
// 1. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\
// Products\<encrypted prod guid>\SourceList\Media 
// MediaPackage
// 2. HKEY_CLASSES_ROOT\Installer\Products\
// <encrypted prod guid>\SourceList\Media
// MediaPackage

:

  • CalculateCompressedProdGUID() - ISSetupFilesExtract . . MediaPackagePath . , , , ResolveSource().

  • ResetMediaPackagePath() - SetCompressedProdGUID() Execute, .

  • RollbackMediaPackagePath() - MediaPackage, . InstallInitialize(), ( ).

, , , , . , rigamarole - -.

, , ( , , ):

***************

function CalculateCompressedProdGUID(hMsi) 
STRING svSubStr, svProductGUID;
STRING szCompressedGUID; // return value 
NUMBER iCount, nBuffer;
begin 

MsiGetProperty(ISMSI_HANDLE, "ProductCode", svProductGUID, nBuffer);

// character 0 of the GUID is {
szCompressedGUID = "";
// first group - reverse order
for iCount = 8 downto 1 
StrSub(svSubStr, svProductGUID, iCount, 1);
szCompressedGUID = szCompressedGUID + svSubStr; 
endfor; 
// second group - reverse order
// character 9 is - 
for iCount = 13 downto 10 
StrSub(svSubStr, svProductGUID, iCount, 1);
szCompressedGUID = szCompressedGUID + svSubStr; 
endfor;
// third group - reverse order
// character 14 is -
for iCount = 18 downto 15 
StrSub(svSubStr, svProductGUID, iCount, 1);
szCompressedGUID = szCompressedGUID + svSubStr; 
endfor;
// fourth group - swap every other
// character 19 is -
for iCount = 20 to 23 step 2
StrSub(svSubStr, svProductGUID, iCount + 1, 1);
szCompressedGUID = szCompressedGUID + svSubStr;
StrSub(svSubStr, svProductGUID, iCount, 1);
szCompressedGUID = szCompressedGUID + svSubStr;
endfor; 
// fifth group - swap every other
// character 24 is -
for iCount = 25 to 36 step 2 
StrSub(svSubStr, svProductGUID, iCount + 1, 1);
szCompressedGUID = szCompressedGUID + svSubStr;
StrSub(svSubStr, svProductGUID, iCount, 1);
szCompressedGUID = szCompressedGUID + svSubStr;
endfor; 
// character 37 of the GUID is } - so ignore 

MsiSetProperty(ISMSI_HANDLE, "COMPRESSED_PROD_GUID", szCompressedGUID);

return ERROR_SUCCESS;

end; 


*******************

function SetMediaPackagePathRegistryEntry(hMsi)
STRING svDBMediaPackagePath, szCompressedGUID, szKey; 
STRING svIsMinorUpgrade, svPathValue;
NUMBER nBuffer, nReturn, nvPathSize, nvType;
begin 

// For XP/2000/NT MediaPackage is set in two places:
// 1. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\
// Products\<encrypted prod guid>\SourceList\Media 
// MediaPackage
// 2. HKEY_CLASSES_ROOT\Installer\Products\
// <encrypted prod guid>\SourceList\Media
// MediaPackage

// precaution against using during non-Minor Upgrade 
svIsMinorUpgrade = "0";
nBuffer = 1;
MsiGetProperty (ISMSI_HANDLE, "IS_MINOR_UPGRADE", svIsMinorUpgrade, nBuffer);
if (svIsMinorUpgrade != "1") then
return ERROR_SUCCESS;
endif;

nBuffer = 40;
MsiGetProperty(ISMSI_HANDLE, "COMPRESSED_PROD_GUID", szCompressedGUID, nBuffer);

svPathValue = "\\"; // default
// Save the value for rollback functionality:
if (RegDBGetKeyValueEx ( szKey, "MediaPackage", nvType, svPathValue, nvPathSize ) = 0) then
MsiSetProperty(ISMSI_HANDLE, "MEDIAPACKAGEPATHROLLBACK", svPathValue);
endif; 

nBuffer = 130;
MsiGetProperty(ISMSI_HANDLE, "MEDIAPACKAGEPATH", svDBMediaPackagePath, nBuffer);


// This is the main location MediaPackage is stored on 2000/XP/NT
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
szKey = "Installer\\Products\\";
szKey = szKey + szCompressedGUID + "\\SourceList\\Media";
RegDBSetKeyValueEx ( szKey, "MediaPackage", REGDB_STRING, svDBMediaPackagePath, -1 );
// This is the secondary location.
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\Classes\\Installer\\Products\\";
szKey = szKey + szCompressedGUID + "\\SourceList\\Media";
RegDBSetKeyValueEx ( szKey, "MediaPackage", REGDB_STRING, svDBMediaPackagePath, -1 );

return ERROR_SUCCESS;

end; 


*************************

function RollbackMediaPackagePathRegistryEntry(hMSI)
STRING svRollbackPackagePath, szCompressedGUID, szKey; 
STRING svIsMinorUpgrade, svPathValue;
NUMBER nBuffer, nvPathSize, nReturn;
begin 

// For XP/2000/NT MediaPackage is set in two places:
// 1. HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\
// Products\<encrypted prod guid>\SourceList\Media 
// MediaPackage
// 2. HKEY_CLASSES_ROOT\Installer\Products\
// <encrypted prod guid>\SourceList\Media
// MediaPackage 

// Remember that we no longer support Windows 98.

nBuffer = 1;
svIsMinorUpgrade = "0";
MsiGetProperty (ISMSI_HANDLE, "IS_MINOR_UPGRADE", svIsMinorUpgrade, nBuffer);
// precaution against use during non-Minor Upgrade
if (svIsMinorUpgrade != "1") then
return ERROR_SUCCESS;
endif;

nBuffer = 40;
MsiGetProperty(ISMSI_HANDLE, "COMPRESSED_PROD_GUID", szCompressedGUID, nBuffer);

// Get the rollback path
nBuffer = 130;
MsiGetProperty (ISMSI_HANDLE, "MEDIAPACKAGEPATHROLLBACK", svRollbackPackagePath, nBuffer);

// Primary location
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
szKey = "Installer\\Products\\" + szCompressedGUID + "\\SourceList\\Media";
RegDBSetKeyValueEx ( szKey, "MediaPackage", REGDB_STRING, svRollbackPackagePath, -1 );
// Secondary location 
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey = "SOFTWARE\\Classes\\Installer\\Products\\" + szCompressedGUID + "\\SourceList\\Media";
RegDBSetKeyValueEx ( szKey, "MediaPackage", REGDB_STRING, svRollbackPackagePath, -1 );

return ERROR_SUCCESS;

end;
+2

Windows , . , DISK1, DISK2, DISK3 .. (, , InstallShield), , .

+1

Source: https://habr.com/ru/post/1765423/


All Articles