Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

"Consolidated" Macro File

Posted on by Microsoft Employee

Hello:

I have successfully created two separate .bat files for (a) launching GP and (b) running the integrations in Integration Manager. 

These two .bat files work fine, when run individually.

But, when I run the two .bat files “together” in one .bat file, GP launches but does not run Integration Manager. 

Below is the syntax for this .bat file.  What am I doing wrong?

"D:\Installs\GP Free Add-Ons\Integrations Macros\GP.bat"

"D:\Installs\GP Free Add-Ons\Integrations Macros\IM.bat"

Thank you!

John

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: "Consolidated" Macro File

    Thank you, Kirk!!!  :)

    John

  • Suggested answer
    KirkLivermont Profile Picture
    KirkLivermont 5,985 on at
    RE: "Consolidated" Macro File

    Hi John,

    Mariano is correct however you can misuse a ping command to introduce the delay.

    ping 127.0.0.1 -n 6 > nul

    Will give you a 5 second delay before the next command in the batch file executes. ping 127.0.0.1 -n 181 > nul will introduce a 1 minute and 30 second delay.

    stackoverflow.com/.../how-to-sleep-for-5-seconds-in-windowss-command-prompt-or-dos

    Regards,

    Kirk

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: "Consolidated" Macro File

    Thank you, Mariano, for setting me on the correct path!  Much appreciated!  :)

    John

  • Verified answer
    Mariano Gomez Profile Picture
    Mariano Gomez 26,225 on at
    RE: "Consolidated" Macro File

    The issue is, DOS does not have a way of waiting for one process to complete before launching the other one. In order to get through this, you have to create a PowerShell script.

  • Suggested answer
    JamesLyn Profile Picture
    JamesLyn 360 on at
    RE: "Consolidated" Macro File

    To run multiple bats within a bat I think you need to use the call function:

    call "D:\Installs\GP Free Add-Ons\Integrations Macros\GP.bat"

    call "D:\Installs\GP Free Add-Ons\Integrations Macros\IM.bat"

    ~James

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans