Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Why is running a macro giving me the error "This launch file is invalid"?

(0) ShareShare
ReportReport
Posted on by 45

I've run a macro in Microsoft Dynamics GP for a few years. Yesterday it ran fine. Today it started showing the error "This launch file is invalid." Neither the macro nor the Dynamics.set file have changed in years. IT says there gave been no recent updates to GP. I've tried running the macro on an installation on a local server and on my local PC and now get the same error. I've found nothing online about this error when running a macro. What is causing this and how do I fix it?

Here is the error I'm getting:

pastedimage1598636737951v1.jpeg

Here is an example of the call to the macro:

pastedimage1598636737952v2.png

Here's the macro (I removed the logins and passwords):

# DEXVERSION=14.00.0084.000 2 2
Logging file ':c:/MOGenerator/NFS_delete_mogenlog.txt'
CheckActiveWin dictionary 'default'  form Login window Login 
  TypeTo field 'User ID' , 'XXX'
  MoveTo field Password 
  TypeTo field Password , 'XXX'
  MoveTo field 'OK Button' 
  ClickHit field 'OK Button' 
NewActiveWin dictionary 'default'  form sheLL window sheLL 
NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company' 
  ClickHit field '(L) Company Names' item 3  # 'National Filter Sales' 
  MoveTo field 'OK Button' 
  ClickHit field 'OK Button' 
# User ID NFS_MOGen is already logged in to company National Filter Sales. Would you like to view your current logins?
NewActiveWin dictionary 'default'  form DiaLog window DiaLog 
  ClickHit field OK 
NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company' 
NewActiveWin dictionary 'default'  form 'Switch Company' window UserActivity 
  MoveTo field 'Delete Button' 
  ClickHit field 'Delete Button' 
NewActiveWin dictionary 'default'  form 'Switch Company' window 'Switch Company' 
  ClickHit field 'OK Button' 
NewActiveWin dictionary 'default'  form sheLL window sheLL 
NewActiveWin dictionary 'default'  form sheLL window sheLL 
# Your current copy of Mekorma Products Manager 14.00.0020 is incompatible. You need to upgrade to version 14.00.0155 or greater.
NewActiveWin dictionary 'Mekorma Products Manager'  form DiaLog window DiaLog 
  ClickHit field OK 
NewActiveWin dictionary 'default'  form sheLL window sheLL 
NewActiveWin dictionary 'default'  form syReminders window syReminders 
  MoveTo field '(L) btnClose' 
  ClickHit field '(L) btnClose' 
NewActiveWin dictionary 'default'  form sheLL window sheLL 
ShellCommand 'Navigate to \cmdNavigationPane\ManufacturingButton\ManufacturingAreaPage' # Manufacturing
ClickHitIE , 'dexterity/.../' # http://dexterity will be pre-pended
NewActiveWin dictionary 'MOGenerator'  form wMOGen window MOGen 
  MoveTo field '(L) pbImport' 
  ClickHit field '(L) pbImport' 
# Are you ready to run MOGen?
NewActiveWin dictionary 'MOGenerator'  form DiaLog window DiaLog 
  ClickHit field OK 
NewActiveWin dictionary 'MOGenerator'  form wMOGen window MOGen 
CloseWindow dictionary 'MOGenerator'  form wMOGen window MOGen 
NewActiveWin dictionary 'default'  form sheLL window sheLL 
  CommandExec form BuiLtin command cmdQuitApplication 

Here's the Dynamics.set file:

25
0
Microsoft Dynamics GP
309
Fixed Assets
346
Manufacturing
414
Human Resources
949
FieldService
1042
Interfund Management
1235
Safe Pay
1428
Electronic Reconcile
1493
SmartList
1632
Cash Flow Management
1838
Technical Service Tools
1878
Excel-Based Budgeting
2277
Purchase Order Enhancements
2416
Control Account Management
2547
Enhanced Commitment Management
2992
CopierSeries
3104
Advanced Security
3180
Analytical Accounting
3278
Report Scheduler
3830
SmartList Builder
5597
HITB Report
6499
Dynamics Online Services
7156
Mekorma Products Manager
2404
Mekorma MICR
7158
MOGenerator
Windows
:F:GP2015/Dynamics.dic
:F:Dynshare/Main/Dictionaries/FORMS.DIC
:F:Dynshare/Main/Dictionaries/REPORTS.DIC
:F:GP2015/fam.dic
:F:Dynshare/Main/Dictionaries/F309.DIC
:F:Dynshare/Main/Dictionaries/R309.DIC
:F:GP2015/ICONMFG.DIC
:F:Dynshare/Main/Dictionaries/ICONFRMS.DIC
:F:Dynshare/Main/Dictionaries/ICONRPTS.DIC
:F:GP2015/HR.DIC
:F:Dynshare/Main/Dictionaries/HRPFRMS.DIC
:F:Dynshare/Main/Dictionaries/HRPRPTS.DIC
:F:GP2015/SrvcAdv.DIC
:F:Dynshare/Main/Dictionaries/FRMS949.DIC
:F:Dynshare/Main/Dictionaries/RPTS949.DIC
:F:GP2015/IFund.dic
:F:Dynshare/Main/Dictionaries/1042FORM.DIC
:F:Dynshare/Main/Dictionaries/1042RPTS.DIC
:F:GP2015/SFPAY.dic
:F:Dynshare/Main/Dictionaries/SPAYFRM.DIC
:F:Dynshare/Main/Dictionaries/SPAYRPT.DIC
:F:GP2015/AREC.dic
:F:Dynshare/Main/Dictionaries/ARECFRM.DIC
:F:Dynshare/Main/Dictionaries/ARECRPT.DIC
:F:GP2015/EXP1493.dic
:F:Dynshare/Main/Dictionaries/EXP1493F.DIC
:F:Dynshare/Main/Dictionaries/EXP1493R.DIC
:F:GP2015/CFM.DIC
:F:Dynshare/Main/Dictionaries/CFMFORM.DIC
:F:Dynshare/Main/Dictionaries/CFMRPTS.DIC
:F:GP2015/TAUTIL.DIC
:F:GP2015/Data/F1838.DIC
:F:GP2015/Data/R1838.DIC
:F:GP2015/XLBudget.dic
:F:Dynshare/Main/Dictionaries/XL1878F.DIC
:F:Dynshare/Main/Dictionaries/XL1878R.DIC
:F:GP2015/POE2277.DIC
:F:Dynshare/Main/Dictionaries/POE2277F.DIC
:F:Dynshare/Main/Dictionaries/POE2277R.DIC
:F:GP2015/CAM2416.dic
:F:Dynshare/Main/Dictionaries/CAMFORM.DIC
:F:Dynshare/Main/Dictionaries/CAMRPTS.DIC
:F:GP2015/ECM2547.DIC
:F:Dynshare/Main/Dictionaries/ECM2547F.DIC
:F:Dynshare/Main/Dictionaries/ECM2547R.DIC
:F:GP2015/QK2992.DIC
:F:Dynshare/Main/Dictionaries/QDF2992.DIC
:F:Dynshare/Main/Dictionaries/QKR2992.DIC
:F:GP2015/AdvSecur.dic
:F:Dynshare/Main/Dictionaries/ADVS_FRM.DIC
:F:Dynshare/Main/Dictionaries/ADVS_RPT.DIC
:F:GP2015/AA.dic
:F:Dynshare/Main/Dictionaries/AA3180F.DIC
:F:Dynshare/Main/Dictionaries/AA3180R.DIC
:F:GP2015/RPTSCHED.dic
:F:Dynshare/Main/Dictionaries/F3278.DIC
:F:Dynshare/Main/Dictionaries/R3278.DIC
:F:GP2015/SLBUILD.DIC
:F:Dynshare/Main/Dictionaries/F3830.DIC
:F:Dynshare/Main/Dictionaries/R3830.DIC
:F:GP2015/HTB5597.DIC
:F:Dynshare/Main/Dictionaries/HTBF5597.DIC
:F:Dynshare/Main/Dictionaries/HTBR5597.DIC
:F:GP2015/DO6499.DIC
:F:Dynshare/Main/Dictionaries/DO6499F.DIC
:F:Dynshare/Main/Dictionaries/DO6499R.DIC
:F:GP2015/MEP7156.DIC
:F:GP2015/Data/MEP7156F.DIC
:F:GP2015/Data/MEP7156R.DIC
:F:GP2015/MICR.DIC
:F:GP2015/Data/MICRFRM.DIC
:F:GP2015/Data/MICRRPT.DIC
:F:GP2015/7158W.DIC
:F:GP2015/Data/7158FRMS.DIC
:F:GP2015/Data/7158RPTS.DIC
Categories:
  • Suggested answer
    Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,054 Super User 2024 Season 1 on at
    RE: Why is running a macro giving me the error "This launch file is invalid"?

    just to throw in my 2cts..

    how is the macro called in real life (aside of the example you showed above) ?

    If it's within  a batch file (which is most of the time used when starting a macro from the command line), then you may want to make sure that the F: drive is available to that user account at the time it's called.

    I've seen typical cases where users are mounting network drives in Windows, but then launch an app with 'Admin' privileges, at which point the mounted drive no longer works, as the 'Admin' context doesn't sees it.

    I'm not a fan of mounted drives and prefer the more robust UNC method with \\yourserver\yourshare\folder\file

    That almost works every time (with exception of some very old apps).

    PS: this is especially true for the DYNAMICS.SET launch file, as many times the mounted drive (if it's not local) isn't available to all users within a same computer. Windows is also known to be prone to lose mounted drives randomly. 

    PPS: Have you tried to open the GP client in a regular way and then try to open the macro file to run it within GP ? :

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    David Musgrave MVP ... 13,957 Most Valuable Professional on at
    RE: Why is running a macro giving me the error "This launch file is invalid"?

    I was going to suggest that the path for the launch file itself is included in the command line, but Craig beat me to it. Good job.

    David

  • Suggested answer
    Craig Fuller Profile Picture
    Craig Fuller 409 on at
    RE: Why is running a macro giving me the error "This launch file is invalid"?

    I know this is a late response but I haven't been on in some time. What happens when you fully qualify the path to the set file as well? If your set file is in the same location then the command line would be as follows:

    F:\GP2015\Dynamics.exe F:\GP2015\DYNAMICS.SET "Test.mac"

    You can also test the set file by using File Explorer, navigating to the F drive - GP2015 folder and dragging the DYNAMICS.SET file onto the Dynamics.exe file.

  • DiscountFilters Profile Picture
    DiscountFilters 45 on at
    RE: Why is running a macro giving me the error "This launch file is invalid"?

    Thanks for the reply.  I've tried running the macro of various servers and PC with their own installs.  I've also tried various logins.  Also tried running different macros.  Nothing seems to work anymore.  My guesses are that something is missing/added to the dynamics.set file or something updated in Windows or GP that changed something in the syntax of running macros.  This macro (and ones like it) has run for a couple years so the macro syntax should be correct, unless something in GP has changed. Any ideas on what to check?

  • Suggested answer
    Terry R Heley Profile Picture
    Terry R Heley Microsoft Employee on at
    RE: Why is running a macro giving me the error "This launch file is invalid"?

    At a quick glance, it looks OK and it seems to have worked at one point as you indicated.

    You could try it on another code install to see if anything changed? Or if the macro will run on that code.

    he GP Support team does not really assist with Macros as they are inherently customizations/ something you created and any little thing/ change can go wrong with them.

    When the macro is played, it repeats the exact steps as recorded. The way I typically explain this to clients, is to say that the macro pretends to be them typing very quickly. Which is a fair description of what the macro does; it records any typing and then plays back the typing; depending on what actions were recorded in the macro, you will see windows open and close and fields typed into.

    This means that when a macro is being played back, Microsoft Dynamics GP must retain cursor focus or the macro will crash.

    A macro plays back the exact steps as recorded and does not tolerate any deviation; this means that if the macro plays back and encounters a difference, such as a popup message dialog, the macro will crash and stop running. Any data updated will remain updated, so restarting the macro will likely require updated data to be removed from the macro file.

    Since maybe it is just the login, you could create a new macro with just the login piece, get that macro to work at login, then you could copy and paste it over to the rest of this macro to then see if it works again, it is almost like something changed, but it would not take too long to just record that piece of the macro.

    Thanks

    Terry Heley

    Microsoft

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans