Open Forum

Expand all | Collapse all

GP Utilities Login using a macro

Jump to Best Answer
  • 1.  GP Utilities Login using a macro

    Posted Jan 15, 2020 04:26 AM
    ​​Hi,

    I have a client who are trying to automate their GP client installs (2015 r2) using SCCM. They have asked me to automate the launching and log in to GP Utilities (and then GP). I have recorded 2 macros, 1 for the GP login and the other for GP Utilities login. Both work fine if I run them manually (Ctril+F8, browse to macro). However, when I try and call the GP Utilities one from a batch file it just does nothing. Doing the same with the GP one works fine.

    Can anyone assist please?

    Thanks
    Tim.

    ------------------------------
    Tim Duncan

    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: GP Utilities Login using a macro

    GPUG ALL STAR
    Posted Jan 16, 2020 02:43 AM
    Record a macro of the login process. Use the keyboard shortcuts to start recording as you will not be able to access the menus while a modal dialog is displayed.

    If you still have issues, I could probably help you manually craft the macro commands.

    Good luck

    David

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: GP Utilities Login using a macro

    Posted Jan 16, 2020 03:35 AM
    ​Hi David,

    Thats what Ive tried so far. It works fine if I use CTRL+F8 to select the macro. However, I want to be able to launch and login to GP Utilities automatically. Im trying to use a batch file (which works fine for GP itself) but the macro just never runs. It just stops at the login page. Below is my batch code and macro code...

    "C:\Program Files (x86)\Microsoft Dynamics\GP2015\DynUtils.exe" "C:\Program Files (x86)\Microsoft Dynamics\GP2015\DynUtils.set" C:\Program Files (x86)\Microsoft Dynamics\GP2015\2_LogInUtilities.mac


    # DEXVERSION=14.00.0084.000 2 2
    Logging file 'macro.log'
    CheckActiveWin dictionary 'Dynutils'  form duInit window sqlLoginWindow
      MoveTo field '(L) sqlLogin'
      TypeTo field '(L) sqlLogin' , ''
      MoveTo field '(L) sqlPassword'
      MoveTo field 'OK Button NONE'
      MoveTo field '(L) sqlDataSources' item 1  # 'Dynamics GP 2015'
      ClickHit field '(L) sqlDataSources' item 1  # 'Dynamics GP 2015'
      ClickHit field '(L) sqlDataSources' item 1  # 'Dynamics GP 2015'
      MoveTo field '(L) sqlLogin'
      TypeTo field '(L) sqlLogin' , 'sa'
      MoveTo field '(L) sqlPassword'
      TypeTo field '(L) sqlPassword' , 'XXXXXXXXX'
      MoveTo field 'OK Button NONE'
      ClickHit field 'OK Button NONE'
    NewActiveWin dictionary 'Dynutils'  form duInit window welcomeWindow
      ClickHit field NextButton
    NewActiveWin dictionary 'Dynutils'  form duSQLInstall window upgradeSystemWindow
      ClickHit field NextButton
    NewActiveWin dictionary 'Dynutils'  form duMain window duTasksNew
      MoveTo field '(L) launchDynCS+BTN'
      ClickHit field '(L) launchDynCS+BTN'


    Many Thanks
    Tim

    ------------------------------
    Tim Duncan
    MIT Consulting Services Ltd
    Chester-Le-Street
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: GP Utilities Login using a macro
    Best Answer

    TOP CONTRIBUTOR
    Posted Jan 16, 2020 10:25 AM
    Tim,

    Here is what I have used to get my Utilities to run.  Basically changed the DynUtils.exe to Dynamics.exe and put the quotes around the macro.   This allows my macro to run and go through utilities.  I have attached my macro  and batch file, although I didn't have it launching GP at the end like you did, but you could edit that.  Didn't seem that I needed to add the logging file for this to work.

    "C:\Program Files (x86)\Microsoft Dynamics\GP$GP TEST\Dynamics.exe" "C:\Program Files (x86)\Microsoft Dynamics\GP$GP TEST\DynUtils.set" "C:\Program Files (x86)\Microsoft Dynamics\GP$GP TEST\utils.mac"

    Hope this works for you as well.


    ------------------------------
    Nicole Albertson
    Product Manager
    eOne Solutions
    ------------------------------

    Attachment(s)

    zip
    launch gp.zip   210B 1 version
    zip
    Utils.zip   403B 1 version
    Academy - Online Interactive Learning from Experts


  • 5.  RE: GP Utilities Login using a macro

    Posted Jan 17, 2020 07:12 AM
    Thank you sooooo much Nicole​, thats worked a treat.

    ------------------------------
    Tim Duncan
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role