The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
20 views

don't see usb drive on cmd [on hold]

I'd like to delete the mbr on my usb key in order to make it a bootable usb. I try to use the recommended steps - go on cmd -> type DISKPART -> list disk but on my list disk I DON'T see the usb key ...
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, ...
1
vote
2answers
699 views

.cmd in Windows Server 2008 task scheduler w/o highest privileges

Is it possible to run CMD script in task scheduler as a particular user without checkin option "Run with highest privileges"? Simple test: Create D:\Admin\Scripts\TestScripts\testscript.cmd ...
3
votes
4answers
7k views

How can I get the path to a Windows service executable WITHOUT using sc qc?

I need to query a windows service for the path to it's executable via the command prompt. I think the way I would do this is:sc qc myServiceName, but when I do that, I get the following error: ...
79
votes
8answers
121k 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 ...
2
votes
3answers
1k 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 ...
12
votes
7answers
19k 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 ...
0
votes
0answers
47 views

Windows 7 CMD tracert gives totally different final IP to online traceroute

So, i'm pretty damn rusty with this stuff, and been up all night for client emergency, so excuse me if i'm typing gibberish and didn't find related search results./ I'm suddenly taking over a clients ...
2
votes
4answers
6k views

How to run an elevated command prompt from the command prompt?

I have remotely connected to a Windows 7 computer via psexec and am running a remote command prompt on the Windows 7 computer. The command I am trying to execute requires that it be run in an elevated ...
0
votes
1answer
30 views

cmd /c behaves differently on server 2012

Tried writing a batch file to shutdown my 2012 server, but ran into a weird issue. For example on 2008 a batch file like the following runs as expected: cmd /c shutdown -s -t 0 On server 2012 when ...
2
votes
0answers
31 views

DNS Boot Method throuth dnscmd

Through the command line on Windows Server 2008 R2, dnscmd SERVER /Config BootMethod … the source from which the DNS server gets its configuration information (is determined) [→ ...
0
votes
0answers
5 views

understanding dnscmd /statistics values

On Windows Server 2008 (R2, 32-Bit) I have some problems in understanding the output of the following dnscmd \\SERVER /Statistics StatIDs: 00010000 → Memory: RAM? HDD? On my test server here I ...
2
votes
1answer
3k 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
1k 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
16 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
40 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 ...
2
votes
1answer
58 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
42 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
105 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
34 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 – ...
1
vote
1answer
88 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
17 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 ...
1
vote
2answers
1k 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
45 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
212 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
42 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
648 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
73 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 ...
-1
votes
2answers
88 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
702 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
529 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
128 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
85 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
60 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
203 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
144 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
20 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
64 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
252 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
99 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
841 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
50 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 ...
19
votes
4answers
60k 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
59k 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
88 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
37 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
135 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. ...