Windows 7 Tasklist hanging when trying to access remote computer

Ed Mullen

Senior Member
Joined
Feb 4, 2010
Messages
3
I have a batch file I periodically run to sync my calendar from my desktop PC to my laptop. I last ran it several weeks ago. Went to run it the other day and it hangs on the tasklist command. The following checks to see if the calendar program is running on the laptop, if it is it uses taskkill to kill the process, then copies the file.

tasklist /S Dell /FI "IMAGENAME eq csde.exe" 2>NUL | find /I /N "csde.exe" > NUL
if "%ERRORLEVEL%"=="0" goto kill

I've been Googling and wracking my brain and I can't figure out why this suddenly quit working.

Send machine is Windows 7 Professional, target PC is Windows 7 Home Premium.

I can ping. I can access the remote PC with Windows Explorer.

I can read/write to the remote using Explorer. I can even control the remote using TeamViewer.

I've tried adding the user and password. Nothing works.

Any help greatly appreciated.


Ed
 


Solution
It seems like you are encountering an issue with your batch file that synchronizes your calendar program between your desktop PC and laptop. The problem specifically arises with the tasklist command hanging when trying to check if the calendar program is running on the laptop. Given that you can ping the laptop, access it through Windows Explorer, and perform actions using TeamViewer, it appears that network connectivity and basic access are functioning correctly. The issue may be related to how the tasklist command is interacting with the remote system. Here are a few troubleshooting steps you can try: 1. Run Batch File with Administrator Privileges: - Right-click on the batch file and select "Run as administrator" to...
It seems like you are encountering an issue with your batch file that synchronizes your calendar program between your desktop PC and laptop. The problem specifically arises with the tasklist command hanging when trying to check if the calendar program is running on the laptop. Given that you can ping the laptop, access it through Windows Explorer, and perform actions using TeamViewer, it appears that network connectivity and basic access are functioning correctly. The issue may be related to how the tasklist command is interacting with the remote system. Here are a few troubleshooting steps you can try: 1. Run Batch File with Administrator Privileges: - Right-click on the batch file and select "Run as administrator" to ensure it has the necessary permissions. 2. Check Remote Execution Policies: - Ensure that the remote execution policies on the Windows 7 Home Premium laptop allow remote commands to be executed. 3. Modify Tasklist Command: - You can try modifying the tasklist command to include the /U and /P parameters to provide a username and password for remote authentication.
Code:
batch tasklist /S Dell /U username /P password /FI "IMAGENAME eq csde.exe" 2>NUL | find /I /N "csde.exe" > NUL
4. Test Connection: - To validate the connection, you can try running a simple command remotely using psexec from Sysinternals Suite or a similar tool to see if remote execution works outside of the batch file. 5. Firewall and Antivirus: - Check if the firewall or antivirus software on the laptop is blocking the tasklist command. Temporarily disabling them for testing can help identify if they are causing the issue. 6. Update Windows: - Ensure that both systems are up to date with their Windows Updates as outdated software can sometimes cause compatibility issues. 7. Use Scheduled Task: - Consider using a scheduled task instead of a batch file for this synchronization process as it provides more options for handling remote tasks. Try these steps and see if they help resolve the issue with your batch file. If the problem persists, feel free to provide more details for further assistance.
 


Solution
Back
Top