Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need a little help with a batch file that I will run from my Windows XP computer.
I plan to use this simple PSKill line:
pskill -t \\CS1 -u administrator -p password gmw6.exe
to remotely close the gmw6.exe program when it is problematic.
What I'd like to be able to do is have the script prompt me for the computer name (CS1 in the above example), insert what I enter and then run. I think I do that with the 1% (variable is it?) but I could use some guidance.
In the end, when I get a call that gmw6.exe is acting up I won't have to go to the PC, or access it remotely, I will just be able to enter the name of the computer when my script prompts me and it will do the rest of the work.
Thanks for the help.
Po

You could do it like this:
pskill -t \\%1 -u administrator -p password gmw6.exe
But the program will not "prompt" you for the input. The computer name should be provided in the command line, so if your batch is called "problem.bat" you should run it like this (from the Prompt)
problem CS1
But this is for bare DOS. In Windows XP you can also do this:
SET /P COMPNAME=Enter the computer name
pskill -t \\%COMPNAME% -u administrator -p password gmw6.exe
SET COMPNAME=This would actually prompt you to enter the name, so you could just put the BAT in the desktop and double click whenever necessary.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |