Code highlighting

Thursday, January 14, 2010

Run AX as a different user from Windows Explorer

This is something useful for people who have already switched to Windows Server 2008 or Windows Vista / Windows 7.
As you have probably noticed, the Run as... command is not available in these versions of Windows any longer (it's still available from command line, of course, but that's not as user friendly).

As AX users/developers/etc., we all ofter have to log into AX as a different user, for example to verify security settings for a particular AX role being setup.
Having Run as... command in the context menu really saves time here.

So, Microsoft, namely Mark Russinovich, provided a way to return this useful command back into the standard context menu.

You can download and install ShellRunas from technet.

Now, to install it, simply follow the easy instructions below:
  1. Download and unzip ShellRunas by following the link above
  2. Copy ShellRunas.exe to your Windows\System32 folder
  3. Open a Command Line and run the following command: shellrunas /reg
  4. A message box confirming successfull installation should pop up. Click OK
  5. Now, holding down the SHIFT key, right-click the AX icon. You will see a Run as different user... item in the context menu


To uninstall the Shellrunas utility, simply execute the following command from a command prompt: shellrunas /unreg

9 comments:

  1. Hi
    Actually, the "SHIFT/Run as" functionality is built-in in WIndows 7. Not in Windows Server 2008, though.

    http://www.winhelponline.com/blog/run-as-different-user-option-inbuilt-windows-7/

    /Jonas

    ReplyDelete
  2. Cool! Thanks for pointing that out.
    We all use Win Server 2008 at work, so I made an assumption about Win 7. Wrong assumption, I guess :)

    ReplyDelete
  3. where exactly can i do the step 5?
    i mean where is that AX icon?
    thanks in advance:)

    ReplyDelete
  4. Well, the icon for the AX application, of course.
    For example, under Start\All programs\Microsoft Dynamics AX 2009.
    See an image following the below link:
    Microsoft Dynamics AX icon

    ReplyDelete
  5. This is great thanks! Chet

    ReplyDelete
  6. Hi

    I need to execute and open ax 2009 from another s/w. Of cause I can create axc file and just call this file but I have another problem here is that how can I pass in the ax user login credentials? I don't want to login using the current domain user.

    Thanks very much !

    ReplyDelete
  7. I think the simplest way would be to use

    runas /user:myUser@myDomain ax32

    I am not sure you can pass in the password though, as that is not secure...

    ReplyDelete
  8. Thanks Ivan, Excellent work, save a lot of time..

    ReplyDelete
  9. You can save even more time if you do it with savecred switch in the command and put the command in batch file. This way you'll have to type the password for the particular user only the first time. So the command line from the previous post would look like this: runas /user:myUser@myDomain /savecred ax32

    Regards,
    Viktor

    ReplyDelete

Please don't forget to leave your contact details if you expect a reply from me. Thank you