The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
2k views

how open a new cmd console on a windows 2012 server core after closing the last one?

On my new test server (windows server 2012 core) i've closed with the "exit" command the last cmd prompt. And now? how can i open another prompt? must i reboot the machine?
0
votes
1answer
1k views

How to escalate to administrative token in Windows 7 using only CMD.exe [duplicate]

If I am not able to right click on CMD and run as administrator, or CTRL + Shift + Enter to run CMD, but I am using an administrative user account in a non-admin shell (CMD.exe); How in the world do I ...
0
votes
2answers
368 views

Chkdsk and PSEXEC

I run maintenance for a lot of offices and use chkdsk as a part of the maintenance. I've recently been using PSEXEC to start a batch file that simply runs chkdsk and then pauses to keep the command ...
0
votes
0answers
72 views

Batch script terminates too soon

I need some help with Windows batch/CMD scripting. I wrote a script to record mic-in to a MP3 for 12 hours. It runs ok when running it manually. It will run with task scheduler too - just that, ...
2
votes
1answer
212 views

Is there a cmd/certutils to copy a certificate from one store to another?

I would like to know if there is a cmd to copy an existing certificate from one store to another. I am trying to copy a certificate from the Users Intermediate Certification Authorities store ...
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 ...
7
votes
2answers
7k views

How to display the first N lines of a command output in Windows? (the equivalent of Unix command “head”)

I need to display the first N lines of the output of a command (any command). In other words, I esentially want an equivalent of the Unix "head" command. After discovering a few tricks from some other ...
2
votes
1answer
804 views

Batch - how to copy file by minimum size and date modification?

I have this simple batch script which copies the newest file in some dir to another place. I want this script to also ignore all files (in the DIR command section) under 1GB of size. FOR /F ...
2
votes
0answers
127 views

Windows 7 File Associations .mov [closed]

I created a new windows 7 SP1 base image. Everything is all fine and dandy with that. So i am now installing standard applications The only problem is WMP (Windows Media Player) won't give up the ...
5
votes
2answers
4k views

Windows: How do I add a program to the system's path environmental variable from the command line?

I'm looking to permanently add a directory to the %PATH% environmental available on a large number of Windows machines. Is there any way to do this from a command line (cmd) so I can script up a ...
1
vote
2answers
293 views

batch file, delete line by number

i have this: set myvar = ^J | FIND /N /I "texttolookfor" %WINDIR%\system32\drivers\etc\hosts now i have the lines it fined the text in how can i delete these line from the file? i know i can run ...
3
votes
1answer
464 views

Save output and exit code of command to files on windows

I want to run a command and save its output and its exit code, in different files. Here's what i am doing: cmd.exe /C command 1> %TEMP%\output.log 2> %TEMP%\error.log && echo ...
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 ...
0
votes
2answers
3k views

Server 2012 Core (no GUI): Remote Server manager not working

I am trying cmd --> MMC --> Server Manager and then connecting to my Server 2012 no GUI but i keep getting the following error The WinRM client cannot process the request I am unable to upload ...
0
votes
1answer
319 views

Clearing cmd.exe memory or cache

The main question is how do I clear the command prompts memory or cache. I ran this on cmd.exe svn info <URL> Which prompted me a for a username and password which I entered. I then logged ...
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
2answers
51 views

Files and their headers? [closed]

(I'm a dos guy , I always liked to view files in norton commander and see inside stuff etc) however over the years I've noticed that each file(well , most of) ( binary files ) has header : For ...
1
vote
1answer
7k views

How to change the secondary DNS server entries on a network device via cmd? [closed]

In Windows XP, how do you change the secondary DNS server on a network adapter via the command line?
0
votes
1answer
84 views

cmd.exe version comparison?

When using batch files or console applications on Windows servers the window in question can allow text to be hightlighted (marked) for copying and pasting. Doing this pauses the batch/application and ...
2
votes
5answers
8k views

command line - switch to administrator mode

Is it possible to switch from normal mode to administrator mode in command line? I don't want to open command line by right clicking and selecting "run as administrator". Thanks
0
votes
4answers
2k views

Restart a Windows service from a script?

I know there are several similar posts on the subject, but what I would like to know is how to re-start a service that has already been stopped. Is there a .bat or .vbs script that would check if the ...
2
votes
1answer
525 views

Checking .BATs exit code with NAGIOS?

I currently have the following script on a Windows Server: @echo off set path=%PATH%;C:\UnxUtils\usr\local\wbin cd /D Z:\videos forfiles /M *_1.mkv /D +%date% > C:\mkv.txt >NUL 2>&1 ...
1
vote
7answers
7k 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 ...
1
vote
1answer
952 views

Windows cmd stderr redirection to stdout while keeping output to stderr?

Is there a way in Windows 7 cmd shell to redirect the stderr to stdout while keeping the stderr stream intact? For example, I have a program that outputs to stderr and stdout the following message ...
1
vote
1answer
3k views

How to allow IIS website user to execute .cmd program

I have a situation where I need to execute a .cmd program on my IIS website. It's a 3rd party program to validate and transfer files, so I'm not able to choose otherwise. I do this by starting the ...
1
vote
1answer
2k views

Detecting a registry key with a space in the path from the CLI (or .bat file)?

I've run into a problem in which my experience (and Google-fu) have let me down. Basically, I need to push out KB968730 to a couple hundred clients or so. Naturally, would like to check for the ...
-3
votes
2answers
703 views

Find Current user of a machine that is available in a LAN [duplicate]

Possible Duplicate: Error Opening HKEY_USERS for [COMPUTER NAME] PsLoggedon We have a LAN that in which there is a Windows Server 2003R2 with some clients. We have not set up an Active ...
2
votes
3answers
700 views

Using a for loop in Microsoft cmd.exe, how can I process only the files with a certain extension?

I have a the folder c:\test\ and two files in it a.txt and b.txtv. I would like to process just the files with extension equal to .txt. If I write this commands cd c:\test for %f in (*.txt) do echo ...
3
votes
1answer
573 views

Why powershell runs executables in separate window?

On one of my servers (2008 R2) powershell refuses to run executables without extension, so typing cmd (or &cmd) in command prompt results in folowing error message: The term 'cmd' is not ...
1
vote
1answer
147 views

for loop windows cmd

I'am using Windows cmd to calculate some variables. The command works fine: gut adapt_gf -InFile sla1.nc -OutFile sla_grid1.nc However, I have many sla values (sla1.nc,sla2, sla3, etc). Is there ...
-1
votes
3answers
216 views

creating a bat file or cmd

I wish to create a bat file to create some basic task. When i run this it closes the window. I'm guessing it errors. How can i stop the bat closing the window so i can view the error. mybat.bat: ...
1
vote
1answer
281 views

What application is used to run cmd scripts?

I am creating an application whitelist in a local group policy and need to be able to run cmd script files. Simply adding cmd.exe, wscript.exe, or cscript.exe to the whitelist does not effect ...
-1
votes
0answers
210 views

Windows Group Policy CMD scripting problems, XP

I am creating a local group policy to lockdown an XP work station. I have used "Run only allowed Windows applications" to create a whitelist of aproved apps. CMD.exe is on that list but I want to use ...
0
votes
2answers
751 views

XAMPP/PHP on Windows [closed]

I am running XAMPP on Windows Vista. XAMPP is a ~one year old install with all default options. I wrote a script in PHP that will do a web crawl and place data in mysql. I placed ...
2
votes
2answers
2k views

CMD - Rename Local Computer, Join Domain, Join Specific OU

Alright so not sure if this is entirely possible all in one. Situation: Brand new computer not on the domain, just a local workgroup. Want to change that computers name, join a domain, and put the ...
0
votes
2answers
268 views

Add time to Windows script

I have this mini Windows Script which is execute every hour it basically create a file every hour but I need to rename the file using date (which is already done) but I am not able to add the time ...
0
votes
1answer
1k views

How to start scheduled task in minimized cmd window? [duplicate]

Possible Duplicate: Run a .bat file in a scheduled task without a window In Windows 7, I have a scheduled task running a console application in a CMD window. It runs every day at 12 ...
0
votes
4answers
3k views

Disable remote desktop through CMD or script in Windows 2008

I'm looking for a way to disable Remote Desktop login for Windows 2008 for a specific user (a local administrator account), either using the command line or a script (such as VBS) in Windows 2008. I ...
1
vote
1answer
643 views

How to find out the .exe running behind a service with cmd.exe?

If I see svchost.exe having the PID 840, how do I get the information which .exe runs behind the service with cmd.exe on Windows Server 2003? If possible without Sysinternals tools.
0
votes
1answer
3k views

How to check which roles are installed on a Windows Server 2003 with cmd.exe?

If I log into a Windows Server 2003 and I want to check with cmd.exe which roles are installed, how to do that?
1
vote
1answer
788 views

Using “sc” command to control services with whitespace in name

I need to stop service on remote machine. The problem is that service name contains whitespaces, and I get a message, that such service does not exist. sc \\machine stop "service name" How can I ...
5
votes
6answers
14k views

How do I set an environmental variable from a powershell command?

I want to have a environment variable that contains the day of week in cmd.exe. When I run this command I get the result I want. C:\Users\tisc>powershell (get-date).dayofweek Friday Here I'm ...
3
votes
6answers
13k views

remotely check amount of RAM on a computer using command line

How would I remotely check the amount of RAM on a computer using command line? (Windows XP and/or windows server 2003)
3
votes
3answers
15k views

How to Run multiple command remotely using PSEXEC?

I am try to use multiple command with psexec tools but i am only remotely entered in that computer but it won't be perform another command psexec -i \\192.168.30.135 -u username -p password cmd ...
1
vote
3answers
253 views

Equivalent linux command of “net start” command in windows

On Windows a command like net start mysql will try to start the MySQL service. I am looking for equivalent Linux command to do that - to change the status of services through Linux commands.
1
vote
1answer
2k views

Ping returns “ip no resources”

One of my clients networks keeps losing connectivity, either the network or the PC they are trying to connect to. I am running a ping from the PC to the router which runs fine most of the time and ...
2
votes
1answer
10k views

Zip for Windows Server 2008 command line?

I know that this has been asked before, but I have not found an answer for Windows Server 2008. Most references I found are with the Windows Server 2003 Resource Kit, but not for 2008. I know that ...
0
votes
2answers
2k views

how can i switch to another user in mysql via cmd

hello everyone i'm try very hard to switch to other user created by me with password but i am not able to switch it, i've searched on google but i don't know what type of error is it it says access ...
-1
votes
1answer
502 views

Copying a set of local files to ftp

I want to copy a set of local files to ftp://124.30.124.230 (it will ask for a username and password). I want to do this work on 400 systems so I have planned to do this work by creating a batch file ...
3
votes
4answers
8k 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: ...