Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Command Prompt shortcut

15 Jun 2014   #1

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 System SpecsSystem Spec
15 Jun 2014   #2

windows 8 x64

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 System SpecsSystem Spec
15 Jun 2014   #3
Microsoft MVP

Windows 7 Ultimate X64 SP1

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


 Command Prompt shortcut

Thread Tools

Similar help and support threads
Thread Forum
Command Prompt command <ipconfig> not working
when I open up my command prompt and type 'ipconfig' without the ' and press enter it returns the line: 'ipconfig' is nto recognized as an internal or external command, operable program, or batch file I am trying to find out the information I need in order to set up a static IP Address for port...
Network & Sharing
Elevated Command Prompt Shortcut
How to Create an "Elevated Command Prompt" Shortcut in Windows 7 and Windows 8 This tutorial will show you how to create a shortcut that will open an elevated command prompt with administrator rights in Windows 7 and Windows 8. When you use the elevated command prompt shortcut, you may be...
Command Prompt: Repeat del command continuosly
Hi All, I'm running a program that parses .csv files and then changes them into ._OK files. This process takes longer when there are a large number of *.OK files in the folder where the files being converted are located. To remedy this I occasionally manually run this command: del *._OK ...
General Discussion
"Copy" command in command prompt generates 0x1a artifact?
Hello Everybody! I don't know if this is a real issue, or just one of those "What the . . . .!!" situations. You judge. Situation: I was working on a batch file that combines two .txt (ASCII?) files created in Notepad to create a composite file, and I noticed something really interesting. ...
Run administrative command prompt from command prompt
Ok So I got myself into a unique bind here. I was trying to install some custom system files (for a theme) and I did it wrong and now I cant open explorer.exe . I dont want to goto a backup because this is a easy fix. (in my view). So I need to know how to run command prompt with administrative...
General Discussion

Our Sites

Site Links

About Us

Find 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 09:02.
Twitter Facebook Google+