cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
s3594753
Level 4

Executing different .bat files

Hi guys,

I am new to IS and trying to find the best possible way to execute different files when installing our pruduct.
i.e.
IF previous version of the product is found, run UPDATE.bat

ELSE IF previous version of the product is not found, run NEW.bat

I woulld appreciate if you could provide me with some sample CA, InstallScript or so.

Thanks in advance and appreciate your time...

Kind Regards,
s3594753
Labels (1)
0 Kudos
(1) Reply
azad_khan
Level 4

Hi u can use this below function.


function CheckForDotNet2(hMSI)
STRING szSupportDir,SETUP, SETUP_ARGS, szKey;
NUMBER nBytes;
begin
nBytes=256;
MsiGetProperty(hMSI,"SUPPORTDIR",szSupportDir,nBytes);
SETUP = szSupportDir^"dotnetfx2.0.exe";
SETUP_ARGS = "";

RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
szKey="SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727";
if (RegDBKeyExist (szKey) < 0) then
if(LaunchAppAndWait(SETUP,SETUP_ARGS,LAAW_OPTION_WAIT|LAAW_OPTION_HIDDEN) < 0)then
//MessageBox("dotnetfx2 installation NOT sucessfull.",INFORMATION);
else
//MessageBox("dotnetfx2 installation sucessfull.",INFORMATION);
endif;
endif;
end;


Add ur batch files to supportfiles. Then u can execute it based on regisrty checking.

Hope this will resolve ur problem.
0 Kudos