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
- :
- Executing different .bat files
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
Jan 28, 2010
04:39 PM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 28, 2010
11:04 PM
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.
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.