Skip to main content

All Questions

Tagged with
4 votes
2 answers
1k views

Add backslash if a string doesn't have it

I'm developing a command line Batch file on Windows 7. I'm trying to add \ to a dir if it hasn't. This is only a test: @echo off set solutionDir=%CD%\ echo %solutionDir% if [%solutionDir:~-1%] ...
3 votes
1 answer
769 views

Windows 7 command promt number of buffers and buffer size

In Windows 7, the Command Prompt has two configuration options called Buffer Size and Number of Buffers found in the Options tab. Following these instructions, I've tweaked these two values to ...
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
70 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
161k 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
748k 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-...
801 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\...

15 30 50 per page
1
2 3 4 5
37