Skip to main content

All Questions

Tagged with
2 votes
2 answers
6k views

cmd.exe error windows 7 the application was unable to start correctly (0xc0000142). Click ok to close the application

when i try to open the cmd.exe. a box pops up with the message of cmd.exe error windows 7 the application was unable to start correctly (0xc0000142). Click ok to close the application. my pc was ...
11 votes
4 answers
14k views

Notepad++ open cmd in current file's directory

Is there a way (probably a macro) how to open cmd in current file's directory? Say I am editting a file D:\foo\bar.txt and would like to open cmd in D:\foo\. It would really help running various ...
0 votes
1 answer
4k views

Unable to output to lpt1: from cmd

I am running Windows 7 32-bit on an old laptop with an onboard parallel port. I have an Okidata Microline 320 printer connected to that port; the printer has been tested to work fine when printing ...
0 votes
1 answer
69 views

What privilege is required by the caller to invoke the -ExecutionPolicy parameter of Powershell 7.x

When invoking Powershell directly by invoking PWSH.EXE, it accepts an -ExecutionPolicy parameter for essentially a "one time/this-instance-only" invocation with something other than the ...
39 votes
7 answers
160k views

How to Execute ShortCut From Command line in Windows 7

We came with a scenario where we have to use Shortcut file (.lnk), which is on the desktop, to execute an application for a headless device (i.e, without manual intervention). Is there any way to ...
0 votes
1 answer
7k views

UAC problems with msiexec silent mode

I have a msi package which I want to install to some computers, which aren't necessary on the same domain neither network. The way I spread the msi package it doesn't matter. We can expect that file ...
0 votes
1 answer
10k views

Running a program from network location on Windows 7 from cmd

I have to run a configuration script on a number of computers that is stored on a network location. I run CMD as administrator and then run the command which looks something like this: \\server\...
29 votes
6 answers
35k views

How to list installed font families?

How can I list the family names of installed fonts on Windows? Any command line utility or any registry paths?
2 votes
1 answer
6k views

Changing Visual Effects settings through command line

Is there a way to change/modify the Visual Effects settings via command line? For example, I want to control (enabling and disabling) on Animate windows while minimizing and maximizing option from ...
8 votes
2 answers
27k views

How to start on-screen-keyboard when installing windows

How do I start the on-screen-keyboard during the windows installation process? I need to install Windows 7 and I don't have keyboard, I only have a mouse.
0 votes
1 answer
4k views

How can I verify that CNTLM works correctly?

I had installed and configured CNTLM on my Windows 7 machine. CNTLM is running and I can see it in Process. I have problems with a development tool that points to http://localhost:3128, I have doubts ...
3 votes
3 answers
3k views

Is it possible to get ONLY the Drive Label using WMIC?

Using WMIC, I want to get only the drive label based on the drive letter: for /f "skip=1" %a in ('wmic volume where "Driveletter like '%C%'" get label') do echo %a Now, those of you who understand ...
4 votes
1 answer
11k views

Batch execution error "not recognised as an internal or external command"

D:\temp\copyTXT.bat is a simple script containing: XCOPY /v D:\temp\MyFile.txt D:\Documents\ Executing the script fails, flashing a window for ~100ms, then does nothing (no copy at all), but if I ...
98 votes
22 answers
745k views

How can I delete all files/subfolders in a given folder via the command prompt?

I would like to delete all files and subfolders using a batch file in Windows 7 and keep the top folder. Basically emptying the folder.
1 vote
1 answer
5k views

Environment Variable ORACLE_UNQNAME not defined

I'm trying to install Oracle 11gR2 Enterprise Edition but during database creation, I got this error : Environment Variable ORACLE_UNQNAME not defined And when I tried to launch emctl.bat From cmd ...
4 votes
2 answers
5k views

Windows: Remove the wallpaper using the command line

Is there a command to remove the desktop wallpaper and use a solid color?
1 vote
1 answer
6k views

Dynamically search and delete multiple registry entries(both key and value) by batch script

I have uninstalled a recent game called "Wolfenstein 2009", but somehow I had to do it manually. I was able to delete files very easily, but here comes the tricky part. I have following command to ...
3 votes
3 answers
4k views

Batch file won't run as administrator unless via cmd prompt

I'm trying to write a batch file that will turn Apache off and copy some files. This is all I have in the script at the moment: "C:\Apache24\bin\httpd.exe" -k stop If I either run the batch file ...
1 vote
1 answer
5k views

schtask Activate task when specific user login

I want to create a batch file that creates a scheduled task to run a .cmd file when a specific user logons. So far I've come up with this: @echo off schtasks /CREATE /RU %username% /TN "TaskName" /TR ...
0 votes
2 answers
4k views

I can't change any system files from CMD

In my previous question: I forgot the Windows 7 password on my own computer, I used the trick described in Resetting Your Forgotten Windows Password (http://www.howtogeek.com/96630/how-to-reset-...
799 votes
8 answers
2.6m views

How can I display the contents of an environment variable from the command prompt in Windows 7?

In Windows 7, when I start the Command prompt, is there any command to display the contents of an environment variable (such as the JAVA_HOME or PATH variables)? I have tried with echo $PATH, echo ...
6 votes
2 answers
2k views

Open and Select a file in an existing Explorer window

I'd like to open and select a file in an existing Explorer window from the command line. Opens a new window: explorer.exe /select, "FILE_PATH" Runs the file: cmd.exe /c start "" &...
0 votes
1 answer
4k views

net use to connect a shared printer

I have a Windows 7 machine connected to a printer. I use another PC (in the same group) running Vista to connect this shared printer via COMMAND: net use lpt2 \\Win7NAME\SHAREDPRINTERNAME /...
2 votes
2 answers
2k views

ipconfig from the CMD opens and closes another CMD

I tried running ipconfig from CMD, both elevated and not, but instead of displaying it's output inline, it opens another CMD and closes it immediately after the output is listed. I've tried running ...
1 vote
4 answers
8k views

How can I bring calc.exe to the front?

I have the following code assigned to a VAIO button: C:\Windows\System32\calc.exe But each time I press the VAIO button, I get a new instance of the calculator in a new window. What would be the ...
1 vote
2 answers
1k views

Why don't Libre Office command line options seem to work on Windows?

This is LO 6.0.7.3 on Windows 7 Enterprise. All other instances of LO have been shut down (I discovered in Linux that this was vital.) Here is example non-output: C:\Users\[snip]>"C:\Program ...
86 votes
14 answers
223k views

Hibernate computer with a timeout from command line on Windows 7

I am trying to hibernate my computer from the command. I was using shutdown /s /t 20 to shutdown the the computer. I change /s to /h to hibernate and now it just returns the usage text as if it doesn'...
2 votes
2 answers
8k views

how to use space within pathname for Window's Robocopy

When my path for robocopy has a space, I surround it with " but get the weird error below... My .bat file contains: rem Backup scans ROBOCOPY "C:\Users\doug\Documents\My Scans\" "B:\BACKUP\My Scans\...
26 votes
5 answers
44k views

Windows 7 equivalent for ntrights.exe

What is an equivalent for ntrights.exe on Windows 7? I need it to be able to be run from the command line.
1 vote
1 answer
1k views

Taskkill command running multiple times when executed from batch file

I need to automate a process where i want to close a program. When running, taskkill /IM notepad.exe from CMD it works fine. But when i create a batch file in order to do the same thing, it ...
1 vote
1 answer
498 views

Why PATH environment variable value is different if we open command prompt from different locations?

I have a package which adds and removes an entry (say C:\my_entry) to PATH environment variable during installation and uninstallation respectively. I am able to see that entry is being added/removed ...
15 votes
2 answers
51k views

How to rename files located on a network path (UNC path) in Windows 7 command prompt?

In the command prompt, I need a way up rename a file on a remote server. Conceptually, this is what I am looking for: ren \\servername\folder\file.txt \\servername\folder\file2.txt Aside from using ...
43 votes
6 answers
107k views

How to run a VirtualBox VM from command line?

I want to know how to start a VirtualBox Virtual Machine (VM) from the command line (using Windows 7) as well as shut it down with the operating system. What is an easy way to achieve this?
98 votes
10 answers
330k views

How to check if a directory exists in Windows?

I would like to translate this Linux/Bash script to Windows shell: if test -d myDirName; then echo "ok"; else mkdir myDirName; fi It tests if a directory exists, and if it doesn't it creates it.
5 votes
1 answer
6k views

How to add files to specified folder in archive with 7zip command line

I have folders and files on my disk C:\builds\main.exe D:\components\a\testa.exe D:\components\b\testb.exe D:\components\c\testc.exe D:\dependencies\abc.dll Can I create an archive with 7z command ...
29 votes
4 answers
84k views

Excluding files of particular extension using DIR command on windows command line

if i want to see e.g. files of a particular extension only using dir listing, i can do that using the command: DIR *.txt And it shows all files with .txt extension. Now i want to know is there any ...
6 votes
2 answers
13k views

Is it possible to toggle disabled/enabled devices from Command Line, simlar to Device Manager?

I like to play Fallout 3 which is very buggy normally, and even more so once I've added some mods. Needless to say, it crashes a lot. I can deal with the crashes, the only problem is when it does my ...
7 votes
3 answers
13k views

Set environment variable containing at symbol

I would like to set an environment variable containing the URL of my proxy server with my credentials, as in this blog post. The problem I'm having is that my password contains an at symbol and I am ...
7 votes
4 answers
11k views

Convert UTF-16 LE to UTF-8 in windows via command line

(question re-written to be more useful) I have a batch script which will interact with command line programs, take their output, and then perform decisions based on that output. One of the programs I ...
2 votes
3 answers
3k views

Windows 7's compatibility mode set to Windows XP SP3 for an executable from the command line and bypass User Account Control Prompt

I'm trying to package an application called Boss and it's intended to be deployed through SCCM 2012 and seems that it's an old Windows 2K application so it doesn't has all the properties I wish it ...
0 votes
1 answer
3k views

Error download mysqlclient on Windows

After type this code in Terminal pip install mysqlclient I recieve this error message: ERROR: Command errored out with exit status 1: command: 'f:\pycharm\python\python.exe' -u -c 'import sys, ...
2 votes
3 answers
6k views

Windows 7 - How to locate a list of files by filename and copy them into a folder

I have a list of 200 filenames. I need to find these files, which are located in different subfolders, by their filename and copy them into one separate folder. I'm using Windows 7. How do I do that? ...
61 votes
12 answers
199k views

How to make the PC speaker beep from the Windows 7 command prompt?

I'm running some lengthy video encodes using the Handbrake command line interface. After all my encodes are done, I would like to have the PC speaker beep, as I usually turn my large external speakers ...
160 votes
16 answers
736k views

How can I find out when Windows was last restarted?

How can I know when my computer running Windows 7 was last restarted? I prefer a solution that doesn't involve searching the event log, but something like wmic or maybe cmd commands.
17 votes
4 answers
48k views

How can I access volume levels from the command line on Windows 7?

What I need I'm looking for a tool or a script that allows me to access the Windows volume levels from the command line. Ideally it would allow me to get and set all volumes including application ...
2 votes
4 answers
10k views

Auto rotate scanned text image (OCR via command line?)

Can I auto-rotate an image that contains mainly text? Maybe via OCR? The algorithm or whatever needs to scan the image and decide if it has to rotate it 90°, 180° or 270° I want to include this ...
3 votes
1 answer
15k views

Repairing a specific file or folder in windows 7 with chkdsk or alternative program

I have a 500 GB NTFS partition on which there is a folder that I know contains some bad sectors.So to save time and resources, Is there any possible way to run chkdsk or alternative program to repair ...
71 votes
3 answers
64k views

Command prompt hangs until keypress?

Problem: For some reason once in a while my command prompt would hang until I press a random key, and it would continue operation as if nothing happened. Occurrence: This happens when I am running a ...
18 votes
5 answers
38k views

prevent sleep in scripts

Is there a way to prevent Windows from going into sleep mode while running a program on the command line or with cygwin? Ideally, I'm hoping for something that could be used like: nosleep myscript....
0 votes
4 answers
11k views

Windows 7 command script to mount VHD disk with assigned drive letter via DiskPart

I use VHD disk for storing my Dropbox files on my office PC. I need the .vhd to be loaded automatically when booted i.e. I will just have to enter decode password instead of going all the way with ...

15 30 50 per page
1
2 3 4 5
22