This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: ISDEV - Fatal Error -5037
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 26, 2007
09:20 AM
ISDEV - Fatal Error -5037
Greetings, :confused:
Tis funny, no matter what programming language you use, or whether you are doing installs like I am doing right now. You always get an error message that really doesn't have a lot of information to go with it, or what you find is just cryptic as the error message itself.
Guess this one is no different. What I tried to do is change the licence agreement dialog to check to see if there was a previous version of the software before it moved onto the licence page.
I added a condition to the next button and then this cropped up, I removed the said change and still this is cropping up. So it may not have been my change at all.
What I was trying to do is detect if a previous version of the software existed on the users machine, if it did then I would attempt to uninstall it from their machine.
I would call this function FindPreviousVersion(HWND) from a custom action and then depending on whether or not it removed would determine if it moved on or not to the next dialog.
Any help would be appreciated. Thanks.
This is the code I was trying to use
//////////////////////////////////////////////////////////////////////////////
//
// Function : FindPreviousVersion(HWND)
//
// Purpose : Checks to see if the previous version of the application is already
// installed on the users machine.
// Author :
// Date : 11/26/2007 (Created)
// Notes :
///////////////////////////////////////////////////////////////////////////////
function FindPreviousVersion(hMSI)
STRING szString, szMsg, svResults, svString, szDir;
NUMBER nResult, nReturn;
BOOL bDir, bSearch;
begin
//Set the search path
szString = "C:\\Program Files\\JD Maker Exp;C:\\Program Files\\JD Maker JD;C:\\Program Files\\JD Maker JD - Mag;";
//Place the search path into the path buffer
if (PathSet(szString) < 0) then
//Report error
MessageBox ("PathSet failed.", SEVERE);
abort;
else
szMsg = "PathSEt set the path buffer to: %s";
SprintfBox (INFORMATION,"PathSet ID Maker",szMsg,szString);
endif;
//Set default value for nReturn to 0 for nothing found
nReturn = 0;
//Set the path find variables
szDir = "ID Maker Express";
//Search the path buff for paths that include ID Maker folder.
nResult = PathFind(szDir,svResults,PARTIAL,RESTART);
//Error check on PathFind
if (nResult = 0) then
nReturn = 1; //Express
else
szDir = "ID Maker Pro - Mag";
nResult = PathFind(szDir,svResults,PARTIAL,CONTINUE);
if (nResult = 0) then
nReturn = 3; //Pro-Mag
else
szDir = "ID Maker Pro - Mag";
nResult = PathFind(szDir,svResults,PARTIAL,CONTINUE);
if (nResult = 0) then
nReturn = 2; //Pro
endif;
endif;
endif;
if (nReturn > 0) then
MessageBox("Uninstalling previous version",INFORMATION);
//Some stuff still needed here
nReturn = LaunchUninstallPreviousVersion(hMSI,nReturn);
switch(nReturn)
case 0: MsiSetProperty(hMSI, "PREVIOUSVERSION", "1");
default: //Issue uninstalling software
MessageBox("Could not remove the previous version of the software",SEVERE);
abort;
endswitch;
else
MessageBox("No previous version found",INFORMATION);
MsiSetProperty(hMSI, "PREVIOUSVERSION", "1");
endif;
end;
//////////////////////////////////////////////////////////////////////////////
//
// Function : LaunchUninstallPreviousVersion(HWND)
//
// Purpose : Uninstall the previous version of the application
// Author :
// Date : 11/26/2007 (Created)
// Notes :
///////////////////////////////////////////////////////////////////////////////
function LaunchUninstallPreviousVersion(hMSI, nVersion)
STRING szProgram, szCmdLine, szMsg;
BOOL bLaunchAndWait, bExit;
NUMBER nWait;
begin
//Set default values
bLaunchAndWait = TRUE;
nWait = WAIT;
switch(nVersion)
case 1: //Express
szProgram = PROGRAMFILES^"JD Exp\unwise.exe";
case 2: //Pro
szProgram = PROGRAMFILES^"JD Maker JD\unwise.exe";
case 3: //Pro-Mag
szProgram = PROGRAMFILES^"JD Maker JD-Mag\unwise.exe";
endswitch;
//Run the installation in a normal window
Enable (BACKGROUND);
Enable (DEFWINDOWMODE);
//Disable the back button in the installation dialogs
Disable (BACKBUTTON);
//Launch uninstall
if (LaunchAppAndWait(szProgram,"",nWait) < 0) then
MessageBox ("Unable to uninstall previous version " + szProgram + ". Set up will now exit.",SEVERE);
abort;
endif;
end;
Tis funny, no matter what programming language you use, or whether you are doing installs like I am doing right now. You always get an error message that really doesn't have a lot of information to go with it, or what you find is just cryptic as the error message itself.
Guess this one is no different. What I tried to do is change the licence agreement dialog to check to see if there was a previous version of the software before it moved onto the licence page.
I added a condition to the next button and then this cropped up, I removed the said change and still this is cropping up. So it may not have been my change at all.
What I was trying to do is detect if a previous version of the software existed on the users machine, if it did then I would attempt to uninstall it from their machine.
I would call this function FindPreviousVersion(HWND) from a custom action and then depending on whether or not it removed would determine if it moved on or not to the next dialog.
Any help would be appreciated. Thanks.
This is the code I was trying to use
//////////////////////////////////////////////////////////////////////////////
//
// Function : FindPreviousVersion(HWND)
//
// Purpose : Checks to see if the previous version of the application is already
// installed on the users machine.
// Author :
// Date : 11/26/2007 (Created)
// Notes :
///////////////////////////////////////////////////////////////////////////////
function FindPreviousVersion(hMSI)
STRING szString, szMsg, svResults, svString, szDir;
NUMBER nResult, nReturn;
BOOL bDir, bSearch;
begin
//Set the search path
szString = "C:\\Program Files\\JD Maker Exp;C:\\Program Files\\JD Maker JD;C:\\Program Files\\JD Maker JD - Mag;";
//Place the search path into the path buffer
if (PathSet(szString) < 0) then
//Report error
MessageBox ("PathSet failed.", SEVERE);
abort;
else
szMsg = "PathSEt set the path buffer to: %s";
SprintfBox (INFORMATION,"PathSet ID Maker",szMsg,szString);
endif;
//Set default value for nReturn to 0 for nothing found
nReturn = 0;
//Set the path find variables
szDir = "ID Maker Express";
//Search the path buff for paths that include ID Maker folder.
nResult = PathFind(szDir,svResults,PARTIAL,RESTART);
//Error check on PathFind
if (nResult = 0) then
nReturn = 1; //Express
else
szDir = "ID Maker Pro - Mag";
nResult = PathFind(szDir,svResults,PARTIAL,CONTINUE);
if (nResult = 0) then
nReturn = 3; //Pro-Mag
else
szDir = "ID Maker Pro - Mag";
nResult = PathFind(szDir,svResults,PARTIAL,CONTINUE);
if (nResult = 0) then
nReturn = 2; //Pro
endif;
endif;
endif;
if (nReturn > 0) then
MessageBox("Uninstalling previous version",INFORMATION);
//Some stuff still needed here
nReturn = LaunchUninstallPreviousVersion(hMSI,nReturn);
switch(nReturn)
case 0: MsiSetProperty(hMSI, "PREVIOUSVERSION", "1");
default: //Issue uninstalling software
MessageBox("Could not remove the previous version of the software",SEVERE);
abort;
endswitch;
else
MessageBox("No previous version found",INFORMATION);
MsiSetProperty(hMSI, "PREVIOUSVERSION", "1");
endif;
end;
//////////////////////////////////////////////////////////////////////////////
//
// Function : LaunchUninstallPreviousVersion(HWND)
//
// Purpose : Uninstall the previous version of the application
// Author :
// Date : 11/26/2007 (Created)
// Notes :
///////////////////////////////////////////////////////////////////////////////
function LaunchUninstallPreviousVersion(hMSI, nVersion)
STRING szProgram, szCmdLine, szMsg;
BOOL bLaunchAndWait, bExit;
NUMBER nWait;
begin
//Set default values
bLaunchAndWait = TRUE;
nWait = WAIT;
switch(nVersion)
case 1: //Express
szProgram = PROGRAMFILES^"JD Exp\unwise.exe";
case 2: //Pro
szProgram = PROGRAMFILES^"JD Maker JD\unwise.exe";
case 3: //Pro-Mag
szProgram = PROGRAMFILES^"JD Maker JD-Mag\unwise.exe";
endswitch;
//Run the installation in a normal window
Enable (BACKGROUND);
Enable (DEFWINDOWMODE);
//Disable the back button in the installation dialogs
Disable (BACKBUTTON);
//Launch uninstall
if (LaunchAppAndWait(szProgram,"",nWait) < 0) then
MessageBox ("Unable to uninstall previous version " + szProgram + ". Set up will now exit.",SEVERE);
abort;
endif;
end;
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 27, 2007
08:41 AM
What's the error message?
And you mention a custom action, which is used in MSIs, but this is InstallScript code. So are you running InstallScript CAs from an MSI?
And you mention a custom action, which is used in MSIs, but this is InstallScript code. So are you running InstallScript CAs from an MSI?
![](/skins/images/8C9D13A71C7F7695F3262372C0172D68/responsive_peak/images/icon_anonymous_message.png)