Connecting to the Enterprise Data Warehouse - Using the RunAs Command


Connecting to the EDW: Using the "RunAs" Command

Are you attempting to connect to connect to the EDW remotely and having difficulty? If so, continue reading this section. If you log into your computer using your UW NetID credentials in a native UW environment and are looking for instructions on connecting via specific program, please review the specific connection guides outlined in: Help: Enterprise Data Warehouse.

If you're trying to connect to the EDW remotely (i.e. from an off-campus computer), you must log on to the UW network using the Husky OnNet VPN software. Note: In general, UW Medicine locations are considered "off-campus" and require Husky OnNet.

Regardless of what query tool you use with the EDW, you must connect with your UW NetID credentials. If you do not log into your computer in a native UW NetID environment, you will need to use a special command to open your query tool with your NetID credentials.

Using the "RunAs" Command 

The "RunAs" command allows you to open and operate programs using different credentials than the credentials you use to log in to your computer. Instructions to create your "RunAs" command vary depending on the operating system, the program you want to use, and the program's path. These examples work for standard Managed Workstation Service computers. If your computer is not managed by MWS, check with your department’s IT staff to modify these instructions for your computing environment.

To open your query tool using UW NetID credentials via RunAs, you'll follow two steps:

  1. Build the RunAs command
  2. Execute the RunAs command

Step 1: Build the RunAs command

In this step, you'll build a RunAs command specific to you and the query tool you will be running.

The "RunAs" command has two basic parts, as shown below:

Example:

RunAs /netonly /user:yournetid@netid.washington.edu "C:\Your\Program\File\Location.exe"

 

  1. The first part of the RunAs command is as follows (replacing yournetid with your UW NetID):
RunAs /netonly /user:yournetid@netid.washington.edu

Note: we suggest you copy and paste this string, so you have the included spaces.

  1. Create the second part of the command by finding the path for the program you want to run:
    • Click Start > All Programs, and navigate to the program you want to open
    • Right click on the program icon and choose Properties
    • If the contents of the Target field resemble the image on the left below, you now have the program path. If the contents resemble the image on the right, skip to Step 3 below.
    • Copy the contents of the Target field on the Shortcut tab, including the double quotes. Add this to the first part of the command, to get a full command that looks similar to this:
RunAs /netonly /user:yournetid@netid.washington.edu "c:\program files\microsoft office\office15\excel.exe"

 

"EXCEL.EXE Properties" dialog box showing a usable target"EXCEL.EXE Properties" dialog box showing unusable target

  1. (Optional) If the contents of the Target field resemble the "Unusable Target" image on the right above, you will need to create the target by hand by finding the path of the program's .exe file.
    • Search your computer for the appropriate file name (see the table for examples)

Program

File Name

Access

msaccess.exe

Excel

excel.exe

Tableau

tableau.exe

SQL Data Tools*

devenv.exe

SSMS** 2012

ssms.exe

* Formerly known as BIDS – Business Intelligence Development Studio, aka Visual Studio

**SSMS – SQL Server Management Studio

    • Create the program path to get to the original executable file

Step 2: Execute the RunAs command

Now that you've built your RunAs command, there are two recommended ways to execute it:

  1. Issue the "RunAs" command through the Run dialog box
  2. Script the "RunAs" command in a batch file

Option 1: Issue the "RunAs" command through the Run dialog box

  1. Bring up the Run dialog box by pressing the Windows and R keys together
  2. To the right of Open: in the Run dialog box, paste the command for your query tool and click OK "Run" dialog box
  3. When prompted, enter your UW NetID password

Option 2: Script the "RunAs" command in a batch file

Another way to use the RunAs command is through a batch file with the extension .bat. You can double click the .bat file icon and supply your password to open the tool you would like to use.

To create a .bat file:

  1. Open Notepad
  2. Paste in the command that we created above:
    1. RunAs /netonly /user:yournetid@netid.washington.edu "C:\Your\Program\File\Location.exe"
  3. Hit Enter, and type in the word pause without quotes
  4. Click File > Save As and save the batch file
  5. Change Save as type to All Files
  6. Name the file with a .bat extension. Do not save the file with a .txt extension. The example below is named Excel.bat
  7. Repeat the batch file creation process for each tool you use

Notepad application with a file named "Excel.bat" with two lines of text. The first line is: [RunAs /netonly /user:yournetid@netid.washington.edu "C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"] The second line is: pause