Install Dotnet after installing own package in ins

2019-07-17 01:16发布

问题:

I have problem with Install-Shield. I create package to install my project and then use JS (JavaScript in Install-Shield) for checking Dotnet frame work and if it isn't exist install Dotnet. so that JS work perfectly and checking registry and then go for Donet Setup.

Here is HS:

function RunDotNetEXE(hMSI)   

STRING svPath; 

begin     
svPath = SRCDIR^"\\Req";
RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);    

if (RegDBKeyExist ("SOFTWARE\\Microsoft\\.NETFramework\\v3.0")!=1) then    
  if (svPath!="") then            
    SdShowMsg ( " file not found ", TRUE );   
        if (LaunchAppAndWait (svPath+"\\net frame work 3.5  sp1\\dotnetfx35.exe","",WAIT) < 0) then
         MessageBox ("error in installing DotNet", SEVERE);
        endif;                                            
    SdShowMsg ( " Some message ", FALSE );   
  endif;  
endif;

end;

Problem :
But problem is Windows Installer. WI can't run two or more Setup package on same time.

So What I must to do, In order resolve my problem!!! ?

回答1:

The solution is to add .NET Framework as a prerequisite: http://kb.flexerasoftware.com/doc/Helpnet/installshield15helplib/IHelpMergeModules.htm



回答2:

You shouldn't be using any scripts to check for the .NET framework. Installshield allows you to add the .NET framework as a prerequisite. This will check whether the framework is installed and install it if necessary.

I have this in one of my packages and it works fine.

In general, avoid scripts and custom actions wherever possible because these may require certain permissions that you won't always get on your target machine.