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

|
| Microsoft Windows xp error all errors and bugs related to Microsoft winxp error |
![]() |
|
batch script
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 18,715
Join Date: Jan 2006
Rep Power: 10
IM:
|
Thanks for /f "tokens=1" %%1 in ('c:\machine.txt') do (psexec=%%1 cmd kill ntp.exe kill app.exe ) end |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Administrator
Posts: 18,715
Join Date: Jan 2006
Rep Power: 10
IM:
|
In your for loop you are using %%1 ... this is a command line argument variable. For looping uses letter variables ... change your %%1 to %%a (or any other letter). You'll need to get this corrected before the rest will work. If that is working and you are still having problems then check your syntax and the abilities of the commands you are running. If you are using psexec to execute a remote app ... check to see if you have to specifiy a full path with the executable name ... I don't know if a remote session is going to parse the local path variable to find the command. You can test this by placing a batch file in the same location and then remotely calling the btch file ... have the batch file write to a log file of some sort so that you can tell if it is executing. Get the syntax down for your command line that way and then just change the command you are calling. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|