Decision Support

Gain access to local folders when logged in with your UW NetID credentials

When you connect to the Enterprise Data Warehouse (EDW) with the tool of your choice, you use your UW NetID credentials to log in. If you then wish to save a file from that tool (e.g. a query or report) to your file system, you may encounter a permissions problem. This is because your file system access is controlled by a different domain account (e.g. your Nebula account). The tool that you want to save the file from is running under your UW NetId credentials, which is not the same account that has access to your local hard drive and network file shares.

The following instructions will show you how to make your shared drive(s) available from within the tool. There are four steps involved in the process:

  1. Write a batch file to map the shared drives so they are recognized in the UW NetID domain
  2. Create a shortcut to the command prompt.
  3. Edit the shortcut properties
  4. Run the batch file

1. Write a Batch File

The batch file contains commands to mount (map) the shared drives with local domain credentials such as "NEBULA2\username", launch the query tool that connects to the EDW, and unmount the shared drives after the query tool is closed.

  1. Open a text editor (Notepad, Wordpad, etc.)
  2. Copy and paste the following into your file:
     ------------------------------------------------------------------------
    # (This example is written for Nebula users. If you are
    # not in the Nebula domain, substitute your network domain and drive -ask
    # your network support person for assistance with this.)
    # Step 1. Mount the I:\drive
    #
    net use /u:nebula2\username I: \\nebula2.washington.edu\uw
    #
    # Mount the Nebula Home directory (Replace "username" with your Nebula user id below)
    net use /u:nebula2\username H: \\username.homedir.nebula.washington.edu\homes
    #
    # Step 2. Examples for Excel and Access are shown below. Select your query tool below by removing the # in front of the command line.
    # Paths to the specific products may vary. Use the correct path for your computer.  

    #
    # For Office 2013 EXCEL
    # "C:\Program Files\Microsoft Office\Office15\EXCEL.EXE"
    #
    # For Office 2013 ACCESS
    # "C:\Program Files\Microsoft Office\Office15\MSACCESS.EXE"
    #
    # Step 3. After the query tool has closed, the batch file unmounts network file system(s), removes the "pointer"
    # to the local file system and closes the command prompt.
    #
    net use I: /delete
    net use H: /delete
    subst X: /d
    exit

------------------------------------------------------------------------

  1. Save your file as access.bat to C:\
  2. You may need to add NETID\username account to the list of accounts that have permissions to read and write to the folder where the batch file is stored.

2. Create a Shortcut to the Command Prompt

  • Right-click on the desktop.
  • Select New -> Shortcut.  
  • Enter cmd.exe for location of the item:

               shortcut

  • Enter edw-access for the shortcut name.
                                                       
               edw-access

  • Press Finish to create the shortcut.


3. Edit the Shortcut Properties

  • Right-click the shortcut on the desktop and select "Properties".
  • Open the "Shortcut" tab.
  • Append /k C:\access.bat to Target resulting in: %windir%\system32\cmd.exe   /k C:\access.bat

     shortcut3

  • Switch /k is needed to pass the string that follows as a command and not as a parameter. The data following the switch /k defines the path to the batch file you plan to use.
  • Press "Advanced" button and check the box "Run with different credentials".

     shortcut4

  •  Press OK until all configuration windows are closed.

    NOTE:  Anytime you edit the shortcut properties, check the option to "run with different credentials". That option is "prone" to reset.