Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
When I open CMD, display "This should not be &."
I tried to look for "&" in the environment variable, but nothing here
How can I solve it?
The problem, based upon the answers you've supplied in your comments, is that you have a rogue entry in your registry. Your response to my initial comment is not really a permanent fix, for anything, I only used that to determine what your issue was.
As you've not yet replied to second comment I have not been able to determine the exact location of that entry. For that reason I will offer two possible solutions.
If when you open a new Command Prompt window, cmd, using the Run as administrator option, the issue is not there, then copy and paste the following, then press the ENTER key.
%SystemRoot%\System32\reg.exe Delete "HKCU\SOFTWARE\Microsoft\Command Processor" /V AutoRun /F >NUL
If the issue still exists when you opened using the Run as administrator option, copy and paste the following, then press the ENTER key.
%SystemRoot%\System32\reg.exe Delete "HKLM\SOFTWARE\Microsoft\Command Processor" /V AutoRun /F >NUL
Your issue should now be permanently resolved.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I was trying automate modifing some files on another drive (boot files for raspberry pi). I want to add couple lines of text to config.txt and cmdline.txt but windows alwas mounts the boot drive with diffrent drive letter (label stays the same: "boot"). I need to change directory (in batch file) to rpi's boot drive (label: "boot"). Can you help?
On a regular Windows computer, you can use wmic for getting Windows configuration information, like this here:
wmic logicaldisk get description,caption
You might also use:
wmic logicaldisk list
In case this does not help, you might try the following:
wmic volume get label, name
In order to determine the drive letter associated with the label boot, and change the current directory to the root of it, I would expect that a command such as this would perform the expected task:
#For /F "Tokens=2 Delims==:" %%G In ('%__APPDIR__%wbem\WMIC.exe Volume Where "Label='boot'" Get DriveLetter /Value 2^>NUL') Do #CD /D %%G:\
Please note that, there is no functionality built into this single line batch-file code, to cater for the possibility that you may have more than one attached volume, with the same label.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
ı want to listen cmd.exe with my own application. I want to this. my application is running someone write cmd.exe and press enter button, my application realize that and take this command. Please someone answer me.
#echo off
:loop
Set /p Input=%CD%^>
rem do what you want, here we execute it
%input%
Goto loop
Mimics a command prompt. See set /? and goto /?.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm running Windows 8.1 Pro and would like to know if it's possible to have a keyboard shortcut to run
taskkill /F /FI "STATUS eq NOT RESPONDING"
using CTRL + ALT + X
SIDE NOTE:
I have currently have a work-around where I have a batch file (KillTask.bat) with the command and a desktop shortcut to KillTask.bat with the shortcut key set to CTRL + ALT + X.
Screenshot
(Here's a link explaining the work-around)
Is there a more direct method of doing this by way of a keyboard shortcut without the use of desktop shortcuts and batch file?
You dont need the .bat. You can do the following:
1. Create a shortcut and add the path:
C:\Windows\System32\cmd.exe /c taskkill /F /FI "STATUS eq NOT RESPONDING"
2. Got to the shortcut properties and put the shorctus key you want: CTRL + ALT + X.
And that's all. The only file you need is the shortcut.
The important thing here is that you execute cmd.exe with /c to specify the command you want to run.
EDIT:
Thanks to eryksun!
Even better, we can just call taskkill directly:
C:\Windows\System32\taskkill.exe /F /FI "STATUS eq NOT RESPONDING"
But still, you need a shortcut file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am working on windows 7 and I found that "notepad" was set as the default program for opening my .bat files. So when I try to execute the batch file by double clicking, it is opened by notepad.
I have tried setting cmd.exe as the default program, which didn't work.
What is the default program I should set for executing .bat files?
Click on "Start"->"Run" and type in "REGEDT32" and press Enter to start the Registry Editor.
Find the following key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.BAT\UserChoice
and delete the key named "UserChoice".
Check the output of the following commands:
C:\>
C:\>assoc .bat
.bat=batfile
C:\>ftype batfile
batfile="%1" %*
C:\>
If your output is different, you have to correct the settings
(see assoc /? and ftype /? for help)
Right click a bat file and select open with - and navigate to system32\cmd.exe
If it fails to apply the setting then security software may be blocking the registry changes.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I changed my icons using 'IcoPackager' to Mac theme and then I uninstalled the IcoPackager, and when I installed it to remove those icons, it says my trial has expired, can you help me out?
Every single icon in my Windows 7 Ultimate, 32-bit laptop is now fked up with Mac Icons.
Yes try system restore but if you don't want to i'm pretty sure there are programs out there that will help you get your files back. you could try a program called Icon Cache Re-builder.
another way to do it is with cmd, here are some step by step instructions i made to fix it.
Close and save anything that you are working on. This command will kill explorer and restart the computer when completed.
Open a command prompt in Windows 7 or Windows 8.
In the command prompt, Copy and paste each command line below exactly as is one at a time and press enter after each command.
ie4uinit.exe -ClearIconCache
taskkill /IM explorer.exe /F
DEL "%localappdata%\IconCache.db" /A
shutdown /r /f /t 00
The IconCache.db file has now been rebuilt and your computer should all be back to normal
Nothing above worked, I just copied the C:\Windows\system32\imageres.dll from my fathers 64bit PC to my 32bit Laptop, and I replaced it with mine and rebooted my computer and everything worked fine!