Hi,

I am trying to write a custom action to cal the batch file.

I have written it but problem is that it only launches the black screen ( command screen ) for a while but doesn't execute the command written in batch file.

command written in batch file is as follow, a single line:

NwSAPSetup.exe /Silent /Pakcage="SAP_GUI_7.10_b01"


When this batch file is executed by double click, it works pefectly but from a msi custom action it is not working.

Please help...[&:]
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
very simple task but just wondering why do you want to exeucte the .bat file

have a look at https://kb.altiris.com/ type in comspec and look for article id 2505

job done

regarding the vb script with the custom action how is it sequenced and what are your conditions are you using the binary table
Answered 03/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
Hi Cygan,

I did as per article.

I get an error as "There is a problem with this windows installer package. A program run as part of the setup didn't finish as expected."

Am i doing somthing wrong? please advise
Answered 03/25/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
For vbscript, i am using custom action 50 and sequence immediate execute sequence after install finalize

and I get the same error.[&:]
Answered 03/25/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
as per the error number what is it

I need to first understand the logic behind the batch file
are you running the .bat after the msi installs?
Answered 03/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
seems to me you have not included "NwSAPSetup.exe" in your package

where is the ref to the <path> ie C:\foldername\NwSAPSetup.exe in your batch file
have you added the batch file to your package
if you are running NwSAPSetup.exe after the msi installs then sequence after innstallfinalize with condition Not Installed
Answered 03/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
For vbscript, i am using custom action 50 and sequence immediate execute sequence after install finalize
and I get the same error.
Hardly surprising, since Type 50 wants to run an EXE, not a VBS :)

Refer to your other post for detail on how to proceed with your SAP install.
Answered 03/25/2009 by: VBScab
Red Belt

Please log in to comment
0
Yes you are correct this NwSAPSetup.exe is not included in msi package.

there is nothing in my msi package...just nothing...I have created a msi wrapper to call this NwSAPSetup.exe as msi installation is required for Landesk deployment...

I just have to install this exe using the msi....thats it

Yes, I run the .bat file after the installfinalize...

.bat file contains a single line which is : NwSAPSetup.exe /Silent /Pakcage="SAP_GUI_7.10_b01"

problem i have is...when this bat file is run..it install SAP 7.10 and a desktop shortcut ... which launch perfectly..


I have used the msi custom action to call this command...first set a property to poing path of this exe and then call another custom actioin to provide /Silent /Pakcage="SAP_GUI_7.10_b01" command.

This also install SAP on target machine. Now the issue is that shortcut doesn't launch.

So, I thought if bat file install it fine then I should call the bat file from my package.

I have used the set property custom action with InstallAction property with value of [SourceDir]setup\NwSAPsetup.exe

and then used the custom action execute program from path where i have passed the following command to installaction property /Silent /Package="SAP_GUI_7.10_b01"
Answered 03/25/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
hi djain3

lets tick some boxes here then we can know where we are

that bat file runs outside the msi and you have verified that it installs

do us a favour created a log file and search for the custom action name and post the error just the lines with the CA
Answered 03/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
ok will give you a TIP here hope this might help.
this is by no means a packaging standard for removing folders
will create a folder on programfilesfolder called "myfolder" and I will delete this folder on installing my msi

I will create a folder "c:\program files\myfolder"
will create a .bat file called mybat.bat
mybat.bat contains RD /S /Q "C:\program files\MyFolder" <note path>
add .bat to the msi < note path>

custom action type : execute program from path
property : %COMSPEC
command line : "/c "c\<note path>"\"mybat.bat""
location : Normal Execute Immediate/deferred. After InstallValidate
condition : REMOVE= "ALL"
processing option : synchronous, ignore exit code


in your case sequence after installfinalize with condition Not Installed
if your setup.exe has other files in the folder you will have to include them as well
forget about using properties to define the path for now just hard code it and see if your batch file works
Answered 03/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
Dear cygan,

Thanks for all your suggestion..

Path to my .bat file is [SourceDir]setup\SAP.bat

because I run the bat file within the source directory..I have used the same way you have suggested for custom action...but it fails.. :(
Answered 03/25/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
I have not included bat file in my msi.

Why do I need to ? please advise...as I simply run bat from soure diretory

is it mandatory to include .bat file in package to work? where should I install it and what is the use when it has to run from source directory
Answered 03/25/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
did you use the option

processing option : synchronous, ignore exit code
Answered 03/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
Why do I need to ? please advise...as I simply run bat from soure diretory ORIGINAL: djain3

I have not included bat file in my msi.

Why do I need to ? please advise...as I simply run bat from soure diretory

is it mandatory to include .bat file in package to work? where should I install it and what is the use when it has to run from source directory


seems your bat file is not been read from the soucre dir hence 1722
try the tip that i gave
Answered 03/25/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
Dear cygan....if I use sychronous ignore exit code...it will not give error for sure but it doesn't mean that it will execute the command given in custom action :) custom action still fails

yes, bat file is not running from souredir....that i wanted to know ...why


I finally got the root of the problem..

My original CA type 50 worked...the problem was that batch file was installing preprequisites (MSXML and VC++ 2005 redist)

and the custom action I used to call the command to call SAP executable was not installing the prerequisites.

So, finally I am getting prerequisites installed separately and SAP separately.

All look ok at the moment.
Answered 03/26/2009 by: djain3
Second Degree Blue Belt

Please log in to comment
0
all that starts well ends well

cheers
Answered 03/26/2009 by: cygan
Fifth Degree Brown Belt

Please log in to comment
0
I, too, wondered about your advice to ignore the exit code but figured someone else would pick you up on it. If an MSI is doing is calling an EXE to perform the actual install, I'd want an returned error to be handled rather than ignored!
Answered 03/26/2009 by: VBScab
Red Belt

Please log in to comment
0
last i checked SAP was already MSI based called by an external EXE wrapper.

As such wrapping your EXE file with an MSI is likely to fail due to this

MSI for landesk calls EXE

EXE calls MSI for SAP

duplicate session existance will cause the EXE to fail deployment as you already have a session in progress from your wrapper.

;-)
Answered 03/26/2009 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
Hey folks,



I have the same issue, need to deploy VC++ 2005 redist before installing an application (or the app install doesn't finish if it isn't present).



Trying to get a custom action going to run the PreReq first, then install the app, but it keeps installing it afterwards and returns an error about having another install running.


Any quick tips?


Thanks.
Answered 04/15/2009 by: Blue_Demon
Orange Senior Belt

Please log in to comment
0
Forget using a CA. Besides anything else, nested MSIs are actively discouraged (notwithstanding WI v4.5's chained MSI functionality).

Use whatever deployment mechanism you have to install the VCRTs first, then have your Desktop boys include it in the next build!
Answered 04/16/2009 by: VBScab
Red Belt

Please log in to comment
0
Yeah, I'll suggest that. MSI and MST are working perfectly, it just needs this exe run beforehand. They might need to get it out to the users before doing the group memberships for this application (deploying with GPO).




Thanks mate.
Answered 04/16/2009 by: Blue_Demon
Orange Senior Belt

Please log in to comment
0
(deploying with GPO).That makes it easy, then. You can create a deployment package with the VCRTs and deploy it to 'Authorised Users' on a per-machine basis.
Answered 04/17/2009 by: VBScab
Red Belt

Please log in to comment
0
ORIGINAL: VBScab

(deploying with GPO).That makes it easy, then. You can create a deployment package with the VCRTs and deploy it to 'Authorised Users' on a per-machine basis.



[font="tms rmn"]
Cool. So just do up an MSI running this exe?

How does GPO handle the sequence of installs, as I need the merge module exe to run before the application install. (Coming from a Netware background, so not 100% on GPO)
Answered 04/19/2009 by: Blue_Demon
Orange Senior Belt

Please log in to comment
0
blue your still missing the point here.

you cannot run 2 msi's together.

VC 2005 is an MSI wrapped inside an EXE. Therefore your method of wrapping the exe in an msi will not work.

As your initial msi will run, call the exe which in turn will call the MSI which will clash with your already present msi session.

if you want to deploy VC 2005 with GPO you need to extract the MSI from the EXE and deploy that.
Answered 04/19/2009 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
OK. I get what you're saying now. As it's an EXE, that was what was throwing me. I've tried running uniextract16.exe on the vcredist_sp1_x86.exe file but it cannot extract anything. The install runs through so quickly, I can't grab anything from the %TEMP% folder.


Any other possible way?
Answered 04/19/2009 by: Blue_Demon
Orange Senior Belt

Please log in to comment
0
ORIGINAL: Blue_Demon

OK. I get what you're saying now. As it's an EXE, that was what was throwing me. I've tried running uniextract16.exe on the vcredist_sp1_x86.exe file but it cannot extract anything. The install runs through so quickly, I can't grab anything from the %TEMP% folder.


Any other possible way?






Try opening vcredist_sp1_x86.exe in WinZip. This should allow you to extract the file VCREDI~3.EXE. Then open the extracted VCREDI~3.EXE in WinZip and you should see the MSI and CAB files vcredist.msi and vcredis1.cab respectively.

Regards,

Spartacus
Answered 04/20/2009 by: spartacus
Black Belt

Please log in to comment
0
[font="tms rmn"]How does GPO handle the sequence of installs, Add the MSI (and don't forget the MST - use the 'Modifications' tab) to the GPO in the order in which they should be installed. Better yet, why not create a machine-based GPO for the VCRTs and assign it to 'Authorised Users'? That way, machines get the machine deployment before users log in.Oops! I already said that...
Answered 04/20/2009 by: VBScab
Red Belt

Please log in to comment
0
Guys, thanks for the help on this.

Got Univeral Extractor to extract the MSI and CAB file (no idea why it didn't work the other day). Have depolyed this pre-req and then followed up with the application install.


Works a treat on a machine install, is giving an error on a file as a user install, but I'll google the issue and work it out.


Unfortunately, this client doesn't have a conflict management database, or any other conflict management tools/procedures, so I think we might have some issues in pilot. Have to see how this one works out.
Answered 04/20/2009 by: Blue_Demon
Orange Senior Belt

Please log in to comment
Answer this question or Comment on this question for clarity