The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
2k views

What happens when you type Exit in the CMD window on Server Core in an RDP session

I'm getting used to Server Core and I know at some point I am going to type "Exit" in the command window while connected through a remote desktop session. I know that if this is done while connected ...
2
votes
1answer
991 views

Force “net user” command to set password longer than 14 characters

I'm issuing some "net user" commands to setup a local user on my desktop for some testing purposes and require setting a password longer than 14 characters. In doing so Windows barks back a propmt to ...
1
vote
0answers
11 views

SED returning error 2 when launched by Wpkg

Case I am deploying a software product using Wpkg over Windows workstations. I need to disable product's faulty automatic update and the best solution in this case is to modify one configuration file ...
0
votes
1answer
33 views

cmd: create dhcp superscope

On Windows Server 2008 (R1, 32-Bit) I've got that far to create a superscope on the command line via cmd, not PowerShell (yay!) through netsh dhcp server \\SERVER scope IP.ADD.RE.SS set superscope ...
1
vote
2answers
2k views

net use mapping not working in batch files but works in cmd

Ok so here's the problem : I've got users using logon script in the domain (username.bat). The script simply lists 4 or 5 (net use letter: \\SERVER\directory\). However, when they open their session, ...
2
votes
1answer
50 views

set unlimited lease duration throuth CMD

On Windows Server 2008 (R2, 32-Bit, I found the following way to set the lease duration for, say, 3600 Seconds (1 Hour). netsh dhcp server scope 10.0.0.0 set optionvalue 51 DWORD 3600 [→ source] ...
-2
votes
3answers
34 views

How to Restore Win Drive Permissions [closed]

I've been playing with my C: drive permissions and I have managed to mess them up. Now when I log in nothing appears and I can't launch anything. I tried safe mode and the same thing happens with ...
0
votes
2answers
55 views

How to run multiple commands with psexec?

I need to run a command to uninstall forefront on some of our workstations and am having a bit of trouble formatting the command. Here's what needs to happen (in multiple commands) xcopy ...
0
votes
1answer
27 views

ping TOS values

Windows Server® 2008 offers ping -v TOS Type Of Service (IPv4-only) Trying to figure out what they mean I came that far that this has to do with IPv4's "Type of Service" Field – ...
12
votes
6answers
17k views

Is there a global, persistent CMD history?

Sometimes I forget how the exact syntax of a CMD command looks and then I would like to search my own CMD history. Clearly, within the same session, you can browse it with the up and down arrow keys ...
1
vote
1answer
85 views

can't delete Resource Records through CMD in Windows Sever 2008

Final Update Problem erased in the least acceptable way: After re-installing the DNS-Server lead to even more problems, I re-installed the whole Operating System and - up to now - everything works ...
0
votes
0answers
14 views

(de)activate “Fail on Load if Bad Zone Data” through Command Line

One can (de)activate "Fail on Load if Bad Zone Data" Option in Windows Server 2008 (R2) through → DNS-Server → Properties → Advanced → (un)check this option. Question: Is ...
75
votes
8answers
113k views

Run a .bat file in a scheduled task without a window

I have a scheduled task that starts a batch script that runs robocopy every hour. Every time it runs a window pops up on the desktop with robocopy's output, which I don't really want to see. I ...
1
vote
2answers
953 views

How to “ignore” username and password prompt in net use

I have at the moment a logon.cmd script, that I'm using to map network drives to the users profile. It looks like this: ::Onboarding net use m: /delete net use m: \\BOB\onboarding ::Bookings net use ...
0
votes
1answer
30 views

cmd - delete IP from rule (Windows Server 2008)

I'm banning IPs using the Windows Firewall with these commands in cmd (actually in C# but using the cmd): pushd advfirewall firewall set rule name="BlockedIPs" new remoteip="1.2.3.4" action=block ...
-3
votes
3answers
117 views

How to check if internet IP address is currently taken? [closed]

Usually I check with ping {ip.address} and that kind of confirms someone has the ip, but when when I ping my Amazon server the message is Request timed out. However I know it's there and I can ...
1
vote
1answer
35 views

For in batch has weird behavior while reading folders

Im trying to do a simple batch (it is not the whole thing, but that's the part that is making everything fail) @echo off for /f "tokens=*" %%G in ('dir /s /b /a:d "e:\tmp\*"') do ( echo %%G ...
3
votes
2answers
199 views

How to run x64 bit version of registry from cmd.exe located under c:\windows\sysWow64

I have a 32 bit application which has to add a value to x64 bit portion of the registry. I want to do it through utilization of regedit.exe -s fileWithKeys.reg, However when I try to span regedit ...
0
votes
2answers
65 views

Properly escaping a path with spaces in CMD shell

I have the following path: "d:\workspace\Server trunk - CI\make\make & publish.bat" However, when I try to execute this from a cmd shell, I get the error: 'd:\workspace\Server' is not ...
2
votes
2answers
974 views

Export Windows Server configuration to powershell script?

I'm looking for a way to export role/feature configuration to a scriptfile, like powershell. Lets say you've installed the DHCP-Role. You configure the scopes, reservations and all that stuff you ...
-1
votes
2answers
82 views

Desktop backups maintenance on a network share

I have configured Windows Backup and Restore function on Windows 7 Professional desktops to make daily backup on a network share placed on a Windows Server 2012. (BTW It's a pity that this utility ...
3
votes
0answers
673 views

DSGET escapes hash signs (#) in outputted Distinguished Names (DN)s but expects unescaped hash signs for input

Lets say I want to do the very simple query in AD dsquery user -name "John Smith" | dsget user -memberof -expand This will output the DNs of the AD groups that this user belongs to. I can make it ...
0
votes
3answers
504 views

How to make the task scheduler display the cmd shell when invoking a batch file?

I am using Windows 2008 R2, and I am trying to schedule my application in the Task Scheduler. I have created a batch with the right settings. The problem I have is: I need to display the Cmd shell ...
-1
votes
2answers
89 views

Show Protected OS files using cmd.exe [closed]

I'm trying to deploy shortcuts from xcopy using a batch script to c:\users\all users\desktop But this is a hidden folder with Hide Protected operating System files tick box under Folder options. I ...
1
vote
5answers
84 views

Copying a chunk of output in Windows 7

I'm wondering how to copy a chunk of output in the command prompt in Windows 7. What I'm ultimately trying to accomplish is when I type "route print" I want to copy the IPs listed under IPv4 Route ...
0
votes
1answer
5k views

Application Error. The application failed to initialize properly (0xC0000142)

We are constantly seeing this error message on our Windows Server 2003: cmd.exe - Application Error The application failed to initialize properly (0xC0000142). Click on OK to terminate the ...
1
vote
7answers
5k views

how to get MAC address of remote computer

I have specific situation. I want to get MAC address from a remote computer, which is not in domain. I know the hostname and IP address of the remote computer. The IP Address of my computer is ...
0
votes
1answer
44 views

Problems with cscript.exe and Windows Server 2008

I was executing this command without any problem: cscript.exe C:\search.vbs D:/myfolder/ When suddenly, after closing and opening the console again, this error appears in a popup when trying to ...
2
votes
0answers
175 views

Access Denied error when running xcopy in jenkins on windows 2008 r2

I have installed Jenkins on a Windows Server 2008 R2 and in the build script i use xcopy to copy the generated war file to a specific folder The problem I am having is that every so often the build ...
0
votes
1answer
128 views

Batch script works on Windows 7 but not Windows Server 2008

Good Day Al I have the following batch script that loops through a folder containing .sql files. When it finds a .sql file that has today's date timestamp on it, it copies that file to a new ...
0
votes
0answers
19 views

fsutil does not give me any output

I have an exchange 2007 server (win2003) over a vmware cluster. I want see the blocksize of some disks. But looks that fsutil does not work properly because it does not give me any output. ...
0
votes
1answer
59 views

Escape variables in command prompt cmd

I set my variable like this: SET Ant="%HOMEDRIVE%%HOMEPATH%\Downloads\apache-ant-1.9.0-bin\apache-ant-1.9.0\bin" :: Set Path variable setx PATH "%Ant%" /m Then, the result for the path variable ...
1
vote
1answer
191 views

Networking ARP table in windows cmd

I am reading the book practical packet analysis and I have just learned the fundamentals of the ARP protocol. They also added something about the arp -a cmd command. I'm curious about some of the ...
0
votes
1answer
87 views

Need to send keystrokes to DOS app from Windows at idle logout

I am supporting a legacy Paradox 4.5 for DOS system. Our users connect to a single terminal server (Windows Server 2003) to run Paradox. We frequently need to boot everyone out of the system. Our ...
5
votes
2answers
742 views

Is there a Windows CMD equivalent of Unix shell's exec?

Is there any equivalent in Windows to Unix Shell's "exec"? Basically, I need to avoid forking a new process, so that input/output pipes are preserved, as well as process id. Edit: So, here's my ...
2
votes
1answer
48 views

Command Line Script Issue

I've been working on a batchfile script for a few weeks now that should automate certain routine tasks I need to perform during my work. However, I've stumbled upon a problem which I haven't been able ...
17
votes
4answers
57k views

Get directory containing the currently executed batch script

I use %0 in batch file to get the containing directory of the batch file but the result is :- c:\folder1\folder2\batch.bat I want just directory, without batch file name, like this :- ...
19
votes
7answers
57k views

How do I restart a Windows service from a script?

I have a batch script that looks like: sc stop myservice sc start myservice it errors out because sc doesn't wait till the service is stopped. How do I restart a service with a script?
2
votes
3answers
1k views

Executing a long command at the windows xp command prompt

Im using WindowsXP and i want to run the following command: tomcat6 //IS//AlfrescoTomcat --DisplayName="Alfresco Community Edition" \ --Description="Alfresco Tomcat Bundle - Repository and Share" \ ...
0
votes
0answers
60 views

Print documents to PDF files via command line in Wine

I have a task to use Wine on Linux distributive for work with MS Office files doc[x] / xls[x] / ppt[x] and pdf via virtual printer. Output formats I need are png or jpg. This is for converter of ...
0
votes
0answers
33 views

Is it possible to reconnect to a remote cmd.exe shell?

I am using freesshd.com to run an ssh server on my machine. I need to be able to execute .bat files in their normal environemt so I am using the cmd.exe shell, the only shell I know of that can ...
1
vote
0answers
116 views

Trying to run a netsh batch with foreign characters

I am trying to run a batch file with the following content: netsh interface ip>set dns "Połączenie lokalne" source=dhcp The file is saved as ANSI. My Windows codepage is 1250, the OEM one 852. ...
2
votes
4answers
16k views

Unlock AD User Account using DSMOD (command line)

Just a quick question. I need to be able to unlock user accounts from the command line, NOT using NET USER loginname /DOMAIN /ACTIVE:YES This is because our corporation lives across 4 domains, and ...
16
votes
13answers
43k views

How to get a list of drive letters on a system through a windows shell (bat, cmd)?

How do I get a list of drive letters and their associated labels on a windows system through a bat file?
0
votes
2answers
1k views

Change/Force CMD properties like Window size & Screen Buffer size via GPO, or other ways

Is it possible to control CMD properties like Window size & Screen Buffer size via GPO? (or a VBS script that can be pushed using GPO :) I have Windows 7 / Windows Server 2008. Many thanks for ...
3
votes
1answer
75 views

Redirect command line into its own output?

Windows CMD shell - any easy way of redirecting the command itself into the output? If I do net localgroup administrators > %computername%-admins.txt, I'd like the output file to contain the net ...
0
votes
0answers
32 views

Need to understand output of sqlcmd.exe

I was advised to make another question, from here - http://stackoverflow.com/questions/19674045/need-help-to-make-sqlcmd-run-as-per-requirements My sqlcmd.exe is invoked with a command of the form - ...
7
votes
7answers
5k views

How to remove 'Administrator:' from the command promt title

In Windows Vista, is there a way to remove the word 'Administrator:' from the title of a command prompt window? The 'title' command just updates the part after 'Administrator:', so that will not do.
-1
votes
1answer
49 views

creating a drive (letter) that is a link to a folder [closed]

on my home pc I want to simplify things when it falls to accessing my home folder, so I would like to make my c:\Users\myusername folder pointing to a virtual drive created ad-hoc, such as Y:. In this ...
1
vote
1answer
91 views

Weird issue with .bat script

I have a .bat script which instals 3 pieces of software. When i open an elevated Command promt , browse to the file and run it everything works fine. When i run the .cmd directly ( using the 'run as ...