Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Batch file within msi package

Posted on 2010-11-24
7
Medium Priority
?
1,598 Views
Last Modified: 2013-12-09
want to run few commands on client end using startup script or logon script. but running batch files has been denied by antivirus software. how can I package batch file and deploy it to client using AD.

If I can find a solution to packge with msi using Microsoft tool I can complete other things.

Thank You.
Janaka.
0
Comment
Question by:Support_Brandix
7 Comments
 
LVL 4

Expert Comment

by:tmwest
ID: 34207210
Can you run other types of files; .vbs, .cmd, .exe?  Can you just add an exception to your virus scan application to allow this bat file to run?
0
 

Author Comment

by:Support_Brandix
ID: 34210273
no can't modify policy right now. so only option is making a msi and deploy. let me know how can I make a msi including a bat file.
0
 
LVL 4

Expert Comment

by:fr0nk
ID: 34211557
Use MakeMSI from http://www.softpedia.com/get/Authoring-tools/Setup-creators/MAKEMSI.shtml

After that I'm pretty sure your AntiVir will still abort the execution of the bat, since it uses a file system driver (which you can view by invoking fltmc in a cmd window).
So don't put the .bat inside the MSI but a compiled .exe of the bat.
You can compile the .bat with http://www.abyssmedia.com/quickbfc/

Hope that helps.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Support_Brandix
ID: 34213724
I am thinking not to go with bat file and instead use existing setup.exe file and do a msi package.

I installed makemsi software but I have no Idea how I can package setup.exe in to a msi file using this tool. also I want to pass a parameter to same exe.
0
 
LVL 4

Accepted Solution

by:
Sajen Jose earned 2000 total points
ID: 34217001
You can execute tasks using the Custom Actions in MSI or MST.

You can find more details about Custom Actions here -> http://msdn.microsoft.com/en-us/library/aa368066%28v=VS.85%29.aspx
0
 

Author Comment

by:Support_Brandix
ID: 34225548
@Sajen Jose
I've gone through the msdn that you have provided but it was very difficult task for me to find exat sytax to set custom action for my msi file.
my MSI file contains 3 files (x,y,z) and it will be exracted to program files\company\product folder at the execution. What I want to do is execute one of extracted file with parameter. below is sample how it works when run from command prompt.
 file x /parameter1=file y

please let me how I can modify msi table to acheive above task.

Thank you,
Janaka
0
 
LVL 4

Expert Comment

by:Sajen Jose
ID: 34229489
Hi ,

The following two videos should give you some pointers on how to create a Custom Action using Wise or Installsheild.

Using Wise:
http://www.appdeploy.com/video/ca-wps.asp

Using Installsheild
http://www.appdeploy.com/video/ca-ias.asp

Custom Actions can also be created using Orca which is freely available. A tutorial on the same is given here - http://bonemanblog.blogspot.com/2005/10/custom-action-tutorial-part-i-custom.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are like me and like multiple layers of protection, read on!
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
how to add IIS SMTP to handle application/Scanner relays into office 365.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question