Subscribe to Windows IT Pro

Forums

Welcome to the Windows IT Pro community forums! The forums are designed to give Microsoft Windows IT professionals and system administrators a gathering place to ask technical questions, get answers to problems, and provide solutions for forum posters. We have forum areas dedicated to popular topics like Microsoft Exchange and Outlook, Windows Server 8, virtualization, security, and Windows 8, as well as many more.

We'd encourage you to register so you can become an active forum participant by contributing your own questions and answers.

Our forums are moderated and maintained by our Forum Pros, who are all veteran IT professionals with extensive hands-on, real-world IT experience. Please visit our Meet the Forum Pros page to learn more about these IT experts. We also have community forums dedicated to Microsoft SharePoint and Microsoft SQL Server topics as well.

Parameters not passing to psexec

Last Post 20 Jan 2012 08:14 AM by Rob. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
shineon450
Rookie
Rookie
Posts:1

--
24 Dec 2011 08:12 AM

Below is the contents of a simple .cmd file I am using.  It is being triggered by another system, and I am passing my remote machine name as %1.  For some reason it will not execute when being triggered from the remote system.  If I go to the server and manually click the .cmd, it works fine.  It seems like the parameter is not being passed correctly.  Any ideas?

cd c:\
psexec \\%1 -u user -p password -c c:\scripts\mapprinter2.cmd

Rob
Forum Pro
Windows IT Pro - Forum Pro
Windows IT Pro - Forum Pro
Posts:310

--
20 Jan 2012 08:14 AM
What do you get if you manually run the psexec from your own workstation rather than having it called from another system, i.e.:
psexec \\MACHINENAME -u user -p password -c c:\scripts\mapprinter2.cmd
You are not authorized to post a reply.

Acceptable Use Policy

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.