How can i get an MSI to call a BAT file when installation complete?

Posted on 2011-10-06
Last Modified: 2012-08-14

I never really do any packeting but we got a small app we need to send out, and to register the application we need to run a bat file.

How can i get Wise8 to run a BAT when installation is complete? I know wise can execute a VBS but im terrible with VBscripts so i havnt really got a chance rewriting this.
Question by:Reubenwelsh
    LVL 6

    Author Comment

    To clearify: The installation completes without any problems in my test environment, but i need to run this BAT files manualy to register the application every time, I would like to skip this part.
    LVL 20

    Expert Comment

    Add this to your WISE script:

    C:\WINDOWS\System32\cmd.exe /c "%TestDIR%\abc.bat"

    change "%TestDIR%\abc.bat" to YOUR bat file!
    LVL 6

    Author Comment

    I dont need anything else in the wise script? I thought i would need a load of headers etc like you do in VBS...
    This is why i hate when our packeting guy goes on holiday :)...

    Thanks ill try it out tomorrow and get back to you!
    LVL 20

    Accepted Solution

    No... That should do it!  (Don't like simple answers?)...

    You MIGHT consider the following:
    + If C:\WINDOWS\SYSTEM32 is already in the path, you could TRY just cmd.exe /c
    + If it is a strong possibilty that the WINDOWS path might be in a different place, consider using the variable %WINDIR% as in:   %WINDIR%\system32\cmd.exe /c "{batfile.bat}"

    Other than that, should work for you!

    Good luck!

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now