The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
2answers
64 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 ...
1
vote
2answers
1k 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, ...
3
votes
0answers
627 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
463 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
48 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
2answers
699 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
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 ...
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 ...
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
88 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
101 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
64 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
656 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
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 ...
15
votes
4answers
52k 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 :- ...
18
votes
7answers
54k 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
964 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
36 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
79 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
15k 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 ...
15
votes
13answers
41k 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
65 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
27 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
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
381 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
59 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 ...
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 ...
4
votes
1answer
3k views

Windows: redirect stdout and stderror to nothing

I have a command I am running produces a ton of output, I want to silence the output without writing to a file. I have used the following to send all output to a file, but again I don't want any file ...
0
votes
3answers
465 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 ...
0
votes
1answer
52 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
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?
1
vote
2answers
356 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
6answers
10k 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 ...
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 ...
67
votes
8answers
103k 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
1answer
2k views

Get error code of last shell command

Using bash, the exit code of the last thing that executed is stored in the $? shell variable: foo bar echo $? # prints exit code of `bar` baz echo $? # prints exit code of `baz` Is there an ...
0
votes
1answer
105 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 ...
8
votes
6answers
14k 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
1answer
636 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?
8
votes
4answers
15k views

System error 1219 has occurred

I am trying to connect to a remote server and deploy a service there, through a deploy script. I start by stating "Net use" and send the credentials for the server. But here I get system 1219 error: ...
1
vote
2answers
687 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
804 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 ...