The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
2answers
47 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 ...
-2
votes
1answer
56 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 ...
0
votes
1answer
32 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 ...
0
votes
1answer
87 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
12 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
45 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
98 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
61 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 ...
2
votes
1answer
42 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 ...
0
votes
0answers
34 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
30 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
77 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. ...
3
votes
1answer
63 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
26 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 - ...
-1
votes
1answer
47 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
69 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 ...
0
votes
1answer
370 views

Checking if shared folder exists using CMD

How I could check if network folder shared exists using batch script? Example: \\10.10.10.1\folder1\folder2\shared_folder
0
votes
1answer
58 views

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

I need to display the first 50 lines of the output of a command (any command). In other words, I essentially want an equivalent of the Unix "head" command. but I dont have permission to create file ...
0
votes
3answers
452 views

How to diagnose RDP with commandline?

I have a server with 1and1 and they have given up trying to restore RDP access (not trying at all) and told me to re-image the server. As this is a production machine, I'd like to avoid this since it ...
2
votes
0answers
144 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
50 views

Parsing access.log squid proxy

I have logs files, access.log-*, and I need exclude the 'TCP-DENY' (or include only the 'TCP-MISS'). How I parsing, like grep command on linux, access.log file on windows? On linux it is work fine. ...
1
vote
2answers
347 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 ...
2
votes
2answers
159 views

How Can I Create Multiple Files of a single file in multiple Directories?

Hello I am trying to create multiple copies of a single file in multiple directories? for example I have 6 folders with a single file in each folder named lp.html, How can I run a batch to create 100 ...
0
votes
1answer
101 views

Can I stop Hyper-V from the command line without powershell?

I have Hyper-V and one VM running on a dedicated server at 1and1.com. I did not realize it was against their policy to "spoof mac addresses" which is apparently what Hyper-V does when you boot up a VM ...
0
votes
1answer
611 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
796 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
235 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
63 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, ...
0
votes
0answers
44 views

Windows Server automated backup date in file name

Basicly all I'm trying to do is insert the current date into the Run command, so the final bkf filename should be 01-04-2013_backup_full.bkf I tried putting in %date% but this didn't work.
2
votes
1answer
139 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 ...
1
vote
2answers
690 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
4k 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
491 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
98 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
2k 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
219 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
268 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 ...
-1
votes
1answer
743 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
2k 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
211 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
680 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
49 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
5k views

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

In Windows XP, how do you change the secondary DNS server on a network adapter via the command line?
0
votes
1answer
79 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
3k 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
413 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
4k 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
780 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
1k 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 ...