Command Prompt shortcut

  1. Posts : 143
    windows 8 x64

    Command Prompt shortcut

    Hello I am 100% new to command prompt so I am asking for a little guidance.
    I am lost on part two I simply have no idea what it is asking, do you? I know the /K keeps the command prompt window open after the script is finished. But thats about it.
    1 Create a new Windows shell initialization script that automatically adds to the path variable the name and path of the folder where you plan to store your Windows shell scripts.
    the script bellow is saved in C:\scripts\PathMod.bat
    @ECHO off
    PATH C:\scripts;%path%

    2 Create a new Command Prompt shortcut and configure it to automatically execute your new Windows shell initialization script. Hint: Use the /K switch and specify the complete path of the folder where the scripts reside.
    I know I can create a short cut for the command prompt and have it start in C:\scripts but I have no idea how to use the /k switch to execute the shell initialization script.
      My Computer

  2. Posts : 143
    windows 8 x64
    Thread Starter

    I think I have figured out how to do it by modifying the short cut's target: C:\Windows\System32\cmd.exe cmd /K C:\Scripts\PathMod.bat
    I am not sure it is correctly done but it works.
    I added the cmd /K C:\Scripts\PathMod.bat to the target.
      My Computer

  3. Posts : 24,479
    Windows 7 Ultimate X64 SP1

    Brink has one for an elevated cmd prompt.
    Elevated Program Shortcut - Create for Standard User
      My Computer


  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 01:07.
Find Us