Automate Login To Microsoft Dynamics GP 10

Microsoft Dynamics GPClients who have upgraded to Microsoft Dynamics GP 2010 can use the new remember user and password functionality, but what about those who have not yet upgraded?

Well, in Microsoft Dynamics GP 10, and before, you can use a login macro to automate the login process. A macro can be created by pressing Alt + F8 on the login screen and following the normal login process before pressing Alt + F8 again to stop recording.

Alternatively you can save the code below, changing {username} and {password} to the required values. If you’re working in a Terminal Services, or Citri, environment the file can be saved to the users roaming profile so it is accessible from any client machine based on the users domain login.

In this example the following macro file, configured to log the user automatically into the Fabrikam, Inc. company, was saved to %userprofile%\AppData\Roaming\Microsoft\Microsoft Dynamics\GP;


# DEXVERSION=11.00.0349.000 2 2
Logging file 'LOGIN.LOG'
CheckActiveWin dictionary 'default' form Login window Login
MoveTo field 'User ID'
TypeTo field 'User ID' , '{username}'
MoveTo field Password
TypeTo field Password , '{password}'
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 1 # 'Fabrikam, Inc.'
MoveTo field 'OK Button'
ClickHit field 'OK Button'

After changing the {username} and {password} I amended the GP shortcut’s Target to “C:\Program Files\Microsoft Dynamics\GP2010\Dynamics.exe” Dynamics.set “%userprofile%\AppData\Roaming\Microsoft\Microsoft Dynamics\GP\login.mac” and could login without having to do more than double click the shortcut.

If you want the user to select a company when they login then sinply use the first part of the macro;


# DEXVERSION=11.00.0349.000 2 2
Logging file 'LOGIN.LOG'
CheckActiveWin dictionary 'default' form Login window Login
MoveTo field 'User ID'
TypeTo field 'User ID' , '{username}'
MoveTo field Password
TypeTo field Password , '{password}'
MoveTo field 'OK Button'
ClickHit field 'OK Button'

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Looking for support or consultancy with Microsoft Dynamics GP?

I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.

3 thoughts on “Automate Login To Microsoft Dynamics GP 10

  1. Not a good method as passwords are stored in clear text. Exposes the system and the accounting data if users happen to have elevated roles and privileges within Microsoft Dynamics GP.

  2. Hi Ian

    This method works, but does leave the password in plain text.

    I would recommend using the Omni Login feature of Omni Tools (now Dynamics Toolbox) which I developed and is now sold by Rockton Software.

    David
    http://blogs.msdn.com/DevelopingForDynamicsGP/

  3. Ian Grieve says:

    Hi guys,

    To be entirely honest, I think any automatic login for a finance, or any other business, system is a bad idea; this includes Windows Authentication and the new Remember Username and Password functionality of Microsoft Dynamics GP 2010.

    However, we get occasional requests from clients about automatic login or Windows Authentication and in GP 10 there is no other native way of doing it. I do try to discourage them; both from a security perspective but also because any unexpected error message and the macro fails. The one client site who uses this method has the macro files stored in folders with the security permissions locked down so only the user in question has access to the files within.

    David, I’ll check out the Dynamics Toolbox; thanks for the tip.

    I know lots of people who never lock their PCs when leaving their desks, which is just as big a security problem when they’ve left GP open. I’ve mentioned this to a few clients and, while they agree locking the PC is a good idea from a security perspective, they never do.

Leave a Reply to Mariano Gomez Cancel reply

Your email address will not be published. Required fields are marked *