The tag has no wiki summary.

learn more… | top users | synonyms

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
412 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
605 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
431 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
140 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
178 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
277 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 ...
0
votes
0answers
186 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
502 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
225 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
2k 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
480 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
2k 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?
0
votes
0answers
187 views

Run net use in the service desktop

What is the easiest way to run a process in the service desktop? I'm trying to run net use. I've tried PsExec but I'm not entirely sure it is doing what I want it to. psexec -s net use ...
1
vote
1answer
448 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 ...
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 ...
3
votes
6answers
9k 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)
2
votes
3answers
12k 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
214 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.
0
votes
0answers
118 views

.cmd files as cgi on iis7 - Not enough storage is available to process this command.

I set up cmd files to be used as cgi, but when running a simple script, it states that there is not enough storage is available to process this command. Other places have suggested setting irp size ...
0
votes
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
9k 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
393 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 ...
2
votes
3answers
5k 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: ...
0
votes
3answers
989 views

Transferring files from ftp to local system

I want to copy a file from FTP and paste it to my local system. I want to run this through a batch file. I am trying this for a week. But I couldn't find the solution. Anyone help me please.... This ...
1
vote
1answer
593 views

Delete all files' prefixes with windows cmd

I have a bunch of files with the same prefix "prefix_filename.txt". I want to remove this prefix and underscore from all filenames, how can I do this?
1
vote
1answer
1k views

BAT/CMD to launch a exe multiple times with different parameters without extra bat files

Have a bat that calls a single exe for say 5-10 functions. Is there a way to make the executable run in multiple processes from a bat or cmd? for example: start cmd /k cd Program ...
1
vote
2answers
286 views

Need to sort files by extension and distribute to folders with CMD, VBS, BAT [closed]

Have a Exec that likes to download the internet. Free files and such. Of course its all mixed and in a download directory. I know that one of the admins before me had a script written but took it with ...
0
votes
3answers
459 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 ...
2
votes
1answer
508 views

get windows file modification time

Under Windows, running 'DIR' in the command prompt shows a file's last modified time to the nearest minute. For example: 17.10.2011 14:55 115 638 pgstat.stat How do I get more accurate ...
5
votes
2answers
653 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 ...
1
vote
1answer
38 views

What's the command-line equivalent of creating a new Partition through MS Windows Server?

For example, When I connect LUNs to a given server, I go into Windows Management, right click on a new disk, and click New Partition. Given Windows CMD prompt, how can I accomplish the same thing ...
2
votes
2answers
4k views

Passing CMD via PSEXEC to a remote computer via .BAT file

Using PSEXEC to call CMD for a DEL command on a remote computer through a batch script. PSEXEC \\hostname -u username -p password CMD /C DEL /Q /F C:\Folder\File.txt The script pauses with a new ...
0
votes
1answer
2k views

How to set env variables and run multiple commands with PsExec?

How can I run multiple commands with PsExec, and how can I export environment variables? I can run two commands by doing the below, but when I try to export an environment variable the second command ...
0
votes
1answer
143 views

Security settings * differences between cmd.exe window and IE

I plan to retrieve an rss file (xml format) with url http://alerts.weather.gov/cap/ma.php?x=0 from a web site periodically with a scheduled task. I have a php script to do that. When I access the ...
4
votes
6answers
2k views

How do I monitor who's logged in?

We in our department are implementing a new admin policy: everyone in a department which we support will receive admin access to their computers. We need to know (while we are performing this "pilot ...
0
votes
1answer
207 views

How to re-save web.config using command prompt

I'm using a simple cmd batch file to deploy my Asp.net MVC web application to server network share. The problem I'm having is that my DLLs can't be simply replaced by new files since existing ones ...
0
votes
2answers
349 views

batch file to strip numbers from filename and pad to two digits

I have a text file with a list of server names (servers.txt) that looks something like this: server1 server2 server3 I have a feeling this can be done with the FOR command as I use that to perform ...
1
vote
2answers
129 views

Unable to issue commands to a remote server when using IP address

I know this is going to sound crazy and I hope that I may just be missing something simple. I am trying to use psexec to restart IIS on a cluster of remote servers. The dept that actually uses the ...
0
votes
1answer
115 views

PowerShell - type no inside every directory and open up notepad2

Do you know the notepad command in PowerShell or cmd.exe? I would like to do the same for NotePad2 I would like to type the following command inside PowerShell and open up the me.txt file; PS ...
3
votes
0answers
623 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 ...
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, ...
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 :- ...
0
votes
1answer
142 views

How to create a windows user from the command line, using a password from a file

Im in a somewhat unique situation. I am trying to create a windows user, using the command line or a batch file. I know how to do that in the basic case: net user username password /add The ...
0
votes
2answers
2k views

Windows Command SC, how to check errorlevel

I'm looking for a way to check the returncode / errorlevel of the SC command in a DOS script. How can I get this information ?
2
votes
1answer
2k views

using git on DOS command line asks for password - but not when using TortoiseGit or gitBash

I would like to use the DOS command line to enter the command: git clone "git_path.git" myDir It asks me to enter a password which I would like to avoid. I usually use TortoiseGit to do all git ...
2
votes
1answer
2k 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 ...