[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1927
  • Last Modified:

Using PSEXEC to run an application on a remote computer

Hello Experts,

Here is the situation.  We have switched from Norton Antivirus to Sophos Antivirus.  To make the switch, we had to uninstall Norton and then proceed with the Sophos install.  For the most part Sophos technicians were able to automate this process.  Every once in awhile we run across a PC (running XP Pro) where the uninstall of Norton was not as clean as we would have liked it to be and various Symantec windows pop up when the user logs on.  To take care of this, we run a utility called Nonav.  It finishes the uninstall very nicely.

Here is what I would like to do.  I would like to use psexec to run the Nonav utility on remote computers, but Im running into a few problems.  Please take a look at the following command:

Psexec \\ cmd.exe c nonav.exe

The psexec command above gets me to the remote PC and should copy the Nonav utility to the remote PC.  Here are my questions/problems:

1.      Were would the command copy the nonav.exe utility to on the remote PC?  Is there a way I can specify the location I want the file copied to on the remote PC
2.      When I launch Nonav.exe locally, a window comes up asking me to extract the application.  Once the application is extracted, it runs without any other user interaction.  Is there a way to force the application to run in a non-interactive mode via psexe?

Your help (as always) will be greatly appreciated.

  • 4
  • 3
1 Solution

Read the comments from 'sirbounty' - he is the one who actually solved that one - not me.

If he checks in on this question - make sure you give him the points.

"Two seperate routes posted actually...

If you have a list of computers, then use:

for /f %a in (C:\Computers.txt) do psexec \\%a c:\pathtofile\file.exe

That's just a command-line command.
If you need to add it to a batch file, change %a to %%a (both instances).

Otherwise, just using psexec's builtin 'loop' method:
psexec @C:\computers.txt c:\pathtofile\file.exe

and both will use your current logged in credentials.
-u 'username' -p 'password'
(added to psexec parameters) allows you to change the user credentials)"
Place nonav.exe into the directory you are running psexec from.....

Also, need to use the -c switch to copy the file to the destination....

TRy this....

psexec \\ -c nonav.exe /switches....

Try running Nonav.exe at a command line with "nonav.exe /?" and see if it lists silent switches...

Or look in the task manager to see what other processes are spawned....
Hey jb -
I was trying to find that post you made on PSEXEC a couple of weeks ago.
Have to figure out some way to save my favorites from you and sirbounty.

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

No, they are copyrighted.....


Havent seen him around in forever....

Dont you use your Knowledge base?
<Dont you use your Knowledge base?>

Sure I do - on the rare occasions when my brain actually functions.

I started using it more and more,  kinda tired of typing the same things over and over....

> Is there a way to force the application to run in a non-interactive mode via psexe?

Good idea since those two programs are not that dependable. My preference is to dump unnecessary tasks, trim out all its files (clean disk), then trash all the registry entries. The process can be simplified of course through use of a command file that can be reused for each computer. Chances are that you have no idea at what point the application is currently installed to, how functional it might be, how many versions installed, how stable, functions & features etc.
We were able to use NoNav and PSEXEC to wipe out a wide variety of NAV/SAV versions from three different 2,000+ computer networks.

One of them was after a moron Second Lieutenant (redundant term) tried to 'hack' the SAV server password and locked up/crashed the server.

We were using NoNav 2.48, but there are newer versions out there now.

PSEXEC is a wonderfully stable little application and I've used it for many thousands of installs/uninstalls.


Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now