The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
38 views

Admin CMD through SSH [migrated]

I have freeSSHD set up on my Windows computer, and I use my Linux laptop to connect through SSH. However, when I SSH into my Windows computer and try to run a custom Batch script that requires admin ...
6
votes
2answers
372 views

Determine if C drive has 2 GB of free disk space

I am trying to determine if a target pc has atleast 2 GB of free space. Here is what I have so far: @echo off for /f "usebackq delims== tokens=2" %%x in (`wmic logicaldisk where "DeviceID='C:'" get ...
0
votes
2answers
29 views

Assign DNS settings on client via elevated script in GPO

i have installed windows 2012 as a member server in my existing windows 2008 DC. now i want to assign secondary DNS on my windows 7/8 client PCs. I do not have DHCP in my environment. I tried to find ...
1
vote
3answers
41 views

cmd.exe, nested for loop, the variable cannot be use in option like skip=

I have many archive folder which stores the backup files. each folder increases daily. I need to delete all files except for recent N copies in each of them, N was defined by a variable from the ...
2
votes
1answer
38 views

NET USE - How to get list of all shares (elevated, non-elevated)

The command: NET USE Will display open connections by any process of current user. But, if command prompt (cmd.exe, or any shell) is non-elevated, it would display only connections opened by ...
2
votes
1answer
43 views

Provide Administrator credentials within script

I am writing a script that runs from a user account. The script needs to execute another script as the Administrator account. Tried AutoIt's RunAs - didn't work. Tried PsExec - the same. Tried ...
2
votes
1answer
142 views

dsadd run from batch file fails with “The specified account already exists” when there is no existing account with the same dn

I am programmatically creating thousands of test users from a txt file containing First Name, Last Name, Username, and Password using the following command (saved as a batch file, run in cmd, modified ...
1
vote
1answer
23 views

How can I know where and how a security group is triggering a logon script for some users?

The organization I work for has implemented application access and scripts via Security Groups. This is, if a person needs to access some applications or have a script run when he logs on, we add ...
2
votes
1answer
99 views

How to remove directories using wildcards by reading a file using batch?

Batch file for /f "delims=" %%f in (7profiledeletelist.txt) do rd /s /q "%%f" PAUSE exit 7profiledeletelist.txt C:\Users\1* C:\Users\2* C:\Users\3* C:\Users\4* C:\Users\5* C:\Users\6* C:\Users\7* ...
0
votes
2answers
119 views

How to run batch file without a window in ONE file

I know how to run batch files without a window thanks to this question here: Run a .bat file in a scheduled task without a window. The first answer is the one I am using. It states that to run a ...
0
votes
1answer
707 views

sqlcmd is not recognised as an internal or external command, operable program or batch file SQL2014

I have written an installer that is supposed to install SQL Server Express 2014, create an instance, and then use sqlcmd to connect to the instance and build the database from a schema. It works by, ...
0
votes
3answers
43 views

Add a command into an existent remote console application

I manage to open a console application in a remote computer by using PSTools using PsExec.exe. C:\PsExec.exe -i 2 -s -d \128.168.500.500 -u username -p password "D:\myApp.exe" That will open a ...
0
votes
2answers
48 views

Quit remote process and start it later

I have a console application running remotely in multiple computers. I was wondering if there's any way to quit from it remotely and then start it again. I saw the use of taskkill to quit the ...
0
votes
0answers
22 views

When changing the Win display lang, will builtin CLI tools params / stdout|stderr messages also change?

I need to write a CMD script (other shells are not allowed / available) that will execute on multiple servers with different display languages. When looking at an Windows built in tool, such as ...
0
votes
0answers
73 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 ...
0
votes
1answer
42 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
94 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
17 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 ...
1
vote
0answers
23 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
82 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
94 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
48 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
2k views

How to run multiple commands with psexec? [duplicate]

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
97 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 – ...
0
votes
0answers
24 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
1answer
95 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
1answer
104 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
664 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
60 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
4k 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
733 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
172 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
votes
2answers
96 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
287 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
211 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
27 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
75 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 ...
2
votes
1answer
688 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
148 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
52 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
130 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
43 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
189 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
113 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 ...
-1
votes
1answer
55 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
122 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 ...
1
vote
1answer
2k 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
93 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
2k 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
272 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 ...