Skip to main content

All Questions

Tagged with
-3 votes
3 answers
15k views

Cmd Calculator loop command [closed]

Im still in school and want to troll my friends. Every time we are on the pc's people are spamming de calculator key so they get a screen full of calculators. Now I want to make a command with cmd to ...
-1 votes
3 answers
10k views

Remotely identify currently loaded user Registry branch

I know that HKCU is a reference to the HKU\<SID> of the currently logged-on user. How can I determine which user profile has been referenced by the current instance of HKCU? Can I determine ...
34 votes
3 answers
28k views

How to create batch file that delete all the folders named `bin` or `obj` recursively?

I have the need of deleting all bin & obj folders in a folder on my PC. So, I'm thinking of a batch file to do that but I'm not famaliar with batching file in Windows. Please help. [Edit] After ...
0 votes
1 answer
9k views

Get Extended Properties of a file

What's the fastest way to output the 'Title' property of all files in a directory in Windows 7? I tried dir in command line but that only prints the filename, not the Title found in the extended ...
3 votes
1 answer
3k views

How to use command prompt to delete file with special characters?

I found this answer on Server Fault, but it is nearly 10 years old and doesn't work anyway I have files with names like: AlchBagSquare_Black°.nif League-of-Legends-фэндомы-1759411.jpeg When I ...
0 votes
1 answer
851 views

Remotely run Windows 10 command line from Windows Server 2016

I have Jenkins running a batch file on a Windows Server 2016 PC. The batch file that Jenkins runs needs to execute a program, via command line, on a Windows 7 PC. This is part of an automated ...
8 votes
3 answers
18k views

FINDSTR: Line is too long

Windows FINDSTR command is useful for sifting through large amounts of data; it filters out lines of text that match or don't match a specified pattern or string (like GNU/BSD grep). But it refuses ...
76 votes
6 answers
19k views

How can I permanently change the Command Prompt in Windows 7?

I would like to change the prompt to $p$g$_$f permanently, but it resets itself every time I reopen the command window. How can I get it to stay the same forever?
1 vote
1 answer
19k views

Can't run command prompt "Run as Admin"

I'm not able to open an elevated command prompt in Windows 7 Ultimate. Previously I was able to open such a command prompt in one of the following ways: Start > type "cmd" then hit Ctrl + Shift + ...
8 votes
1 answer
8k views

Block a registry key to prevent rewriting or deleting accidentally or intentionally using the command line

I see the post in superuser and I have a similar case, but with a small difference. I created a reg key. "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\wscript.exe" ...
22 votes
6 answers
205k views

Change Windows 7 file permissions from command prompt

How can I change Windows 7 file permissions using the command prompt? I want to change permissions in program files, but cacls is not working for me.
0 votes
2 answers
97 views

Different behaviour of cmd depending on the form of the path string

In cmd window I can't cd to a directory if it is set by a user environment variable. The variable content is OK. If I cd to the directory set by the content of the variable, it works OK, too. Could ...
3 votes
2 answers
2k views

BSD fortune for Windows command prompt or DOS

This is probably a stupid question, but I was just wondering if the following is doable: If I should just forget about it and go the VM/ full GNU-Linux OS route, that's fine.After mucking about with ...
0 votes
1 answer
1k views

What is the name of the font that the Windows 7 Command Line uses? [duplicate]

I'd like to know the name of the font that is referred to as the "Raster 8x12" font in the Windows 7 command line, does anyone know?
2 votes
3 answers
35k views

/forceit in Command Prompt Gives error: unknown command

I am trying to run a BIOS update using /forceit command after the file name on a Dell Inspiron with a 'faulty' battery (BIOS update on Dell requires 10% battery, hence why I cannot perform this) . I ...
1 vote
2 answers
6k views

How to enable USB device manager in Windows 10 from command-line or Registry?

I have disabled one of the USB device drivers from windows 10 Device manager in my tablet (to check something). It was the main USB device driver of Windows. This caused all USB devices to stop ...
4 votes
1 answer
14k views

MSG.EXE User on Domain (User disconnected or doesn't exist)

So I am trying to use msg.exe on the command prompt on a domain named district. I can successfully call the method msg myUsername test message and receive a message to myself but whenever I do msg ...
0 votes
1 answer
230 views

Why Copying CMD commands from OneNote to CMD adds folder name starts with "."?

When I copy CMD command within OneNote Table and pasted into Command Prompt in Windows 7. It automatically adds first folder within current directory starts with ".". This is the command in OneNote: ...
1 vote
2 answers
316 views

Launch Chrome from cmd, group icons

I can launch 2 Chrome windows as apps as follows: start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="C:/app1" --app="http://yahoo.com" start "" "C:\Program Files (...
1 vote
2 answers
5k views

How to run the awk command in Windows 7?

I have the following adb + awk command which will work fine in Linux environment [Ref]. adb shell dumpsys package | awk -v RS='\n +Package' '/android\.permission\.CAMERA/{print $1}' But I need to ...
0 votes
0 answers
352 views

Start command keeps command window open

I have a batch file which looks like start "Java" "C:\Program Files\Java\jdk-12.0.1/bin/java.exe" <various classpaths and parameters> Until recently it started up the Java executable and the ...
0 votes
0 answers
778 views

Is it possible to perform a complete backup of the Users folder with Robocopy?

This is a more specific version of a broader question I posted a few weeks ago, I have my Users folder - B:\Users - on a separate drive to my Windows 7 system. I want to copy the contents of this ...
7 votes
1 answer
7k views

Pipe not working in cmd.exe on Windows 7

I have started seeing some very strange issues with the pipe command not working on Windows 7 64-bit on my machine. Commands like this: echo test | more used to work without a problem, but now ...
1 vote
1 answer
416 views

My Windows 7 Home Premium 32-bit OS put password itself

I sat in my chair to use my computer, and when I started Windows OS, I noticed that Windows set a password by itself and I'm sure that I have not set any password before. Okay, let's have a look the ...
2 votes
1 answer
31k views

Access denied when using net stop/start via CLI on Windows 7

I have a Windows service that needs to be stopped and restarted when switching to a different development server (I'm a web developer.) If I go into the Services GUI, I can stop and restart the ...
6 votes
3 answers
2k views

How can I run msiexec from cygwin to unpack a msi?

I need to unpack (not execute, unpack) a msi in a cygwin makefile. If I invoke from the windows command prompt the following msiexec /a package.msi /qn TARGETDIR=C:\foo The package is correctly ...
8 votes
1 answer
60k views

"No Instance(s) Available" error with the wmic command

I'm getting a "No Instance(s) Available" error with the wmic command. The command I'm running (from an elevated/administrator cmd.exe window) is: G:\>wmic datafile where name="file.txt" get ...
20 votes
2 answers
92k views

How start PowerShell from cmd by specific path

I want to start PowerShell (C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe) from windows 7 default command line (cmd) and go to the specific path. I used the command: start C:\WINDOWS\...
71 votes
4 answers
40k views

Which special variables are available when writing a shell command for a context menu

When extending the Windows' shell context menu (e.g. for adding an 'Open command here' prompt on directories), a 'command' key needs to be created in the registry. The value of this 'command' key ...
0 votes
1 answer
373 views

List and count directories that don't contain a specific file

I have a folder with many subfolders in it. Each of these subfolders may or may not contain a file named "George.txt". This command (in a batch file) for /d %%A in (*) do @if not exist "%%~fA\George....
0 votes
2 answers
8k views

Windows 7 Command Line Add Group "Users" To File

I need to change permissions on a file/folder through the command line. I can do this manually by: Right-click on any file/folder Properties Security (tab) Edit... Add... Enter the object names to ...
35 votes
2 answers
156k views

Error in command line "The system cannot find the path specified."

Not sure what I did but since past 5 weeks but I am getting this error The system cannot find the path specified. when I run any command or start cmd. Here is what I get when I start command line: ...
7 votes
1 answer
27k views

get antivirus windows commandline

I was wondering if it is possible to get the name of the currently running anti-virus within windows (xp/7/8) commandline? I could use the tasklist commando to view all running processes, but it would ...
3 votes
1 answer
70k views

How to update Registry with REG ADD command

I need to do set this registry value from command line: [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation] "AllowSavedCredentialsWhenNTLMOnly"=dword:00000001 "...
11 votes
6 answers
46k views

Runas command for user without password

I want to use the runas command in CMD and from Batch files to gain elevated permissions, but I don't have an admin password on my PC because it's my home computer and I'm the only user. Every time I ...
0 votes
1 answer
177 views

Why does the cd command occasionally take several seconds to complete?

Sometimes, when using the command prompt, the cd command finishes quickly, but often it takes several seconds. What does it indicate? What's the bottleneck?
14 votes
8 answers
131k views

How to disable sleep mode via CMD?

With only the command prompt, is it possible to disable sleep mode when closing the lid of a laptop?
0 votes
1 answer
310 views

Windows 7: Cipher or Format console program to wipe (write 0) across a hard drive

How good of a job does Windows 7 cipher do in wiping a hard drives contents? I have cmd elevated with administrator privileges and I'm running cipher with /w on a designated 1TB Seagate hard drive. ...
3 votes
1 answer
5k views

How to create Policy-based QoS on Windows 7 through CLI?

I am trying to add ToS (QoS) support to a SIP client (taken from open-source Linphone) as so: retval = setsockopt(session->rtp.socket, proto, value_type, (SOCKET_OPTION_VALUE)&tos, sizeof(tos))...
9 votes
3 answers
40k views

How to redirect the output of a FTP recursive listing to a local file with Windows 7 FTP client?

When using the DOS command FTP in Windows 7, I can use this FTP command to list recursively all files of the remote directory: ftp> ls -R I cannot get the output of ls -R to a local file, FTP ...
11 votes
2 answers
54k views

Change registry permissions via command line (batch file)

I found an awesome Reg Hack for Windows 7, that renames the 'Computer' icon to something like %username% on %computername%. Unfortunately, in the tutorial, it says to change permissions of the ...
1 vote
1 answer
1k views

robocopy using parent folder name

I have a small batch file that uses robocopy to backup a folder. The intended action is for it to copy C:/users/public/ into D:/Backups/YYYY-MM-DDTHHMM/ At present, it copies the files into a folder, ...
0 votes
1 answer
524 views

Equivalent to gpresult for local security policy

I just wonder how I can show the currently applied Security-Policy (not Group-Policy) from a machine from the command-line. i know i can show the current applied Group-Policy with gpresult using ...
6 votes
6 answers
32k views

Using Bluestacks to run an android app directly from Windows command line or Desktop Shortcut

After installing Bluestacks is there a way of launching an android app without going through the Bluestacks interface? Is there an API or something that would allow this? Actually I found where it ...
3 votes
3 answers
12k views

Automatically extract and rename extracted file according to archive's name

I have a bunch of zip files in a folder. Each zip file has a file in it named exp_1.txt. I would like to unzip each zip file and rename the extracted file from each zip file to what the zip file was ...
2 votes
1 answer
50 views

Windows 7, Can't execute commands without their extension anymore

Since a recent update of Windows 7, I'm facing a weird probleme which I never faced before. All my environment variables are up to date, but, all my commands need the extension to execute. For ...
0 votes
1 answer
5k views

python.exe is 0kb and cmd gives "This app can't run on your PC. To find a version check with the software publisher."

I'm using windows 10 64-bit. I had python 2.7 (python-2.7.15.amd64.msi) running normally on my PC from October 2018. Suddenly, when I execute python in cmd, I get the message: "This app can't run on ...
0 votes
2 answers
724 views

Force PERL script to use portable perl

I have been developing my scripts using Strawberry perl installed in C: drive (5.20.11) I've now installed the portable version on my USB stick. (5.28.xx) Whatever I try, it ALWAYS reverts to the ...
1 vote
1 answer
195 views

What am I doing wrong with this Windows 7 FTP script?

I am trying to create a text file (commands.txt) for FTP in Windows 7. The file looks like this... open 10.10.10.12 9999 USER anonymous anonymous GET file1.txt bye I then jump to a Command Prompt(...
0 votes
1 answer
10k views

How to know if someone else is logged to a remote shared PC?

In the company I work for, there are some shared PCs where people can log to remotely. It's boring to ask first who is logged in before login to it yourself, just not to disrupt others work. With ...

15 30 50 per page
1
3 4
5
6 7
22