3

I need to run a command to uninstall forefront on some of our workstations and am having a bit of trouble formatting the command.

Here's what needs to happen (in multiple commands)

xcopy \\serverpath\Installer.exe C:\Windows Install.exe /u /s Del C:\Windows\Install.exe

I'm using psexec with a computer list but keep running into errors. This is what my command looks like as of right now.

psexec @ComputerList.txt -u domain\administrator cmd /c (xcopy "\\NetworkPath\Forefront Software\Install.exe" "C:\Windows" && Install.exe /u /s && del C:\Windows\Install.exe)

I think the spaces in the path name and quotes are messing things up...

EDIT:

Tried running it with a script with no luck. It looks like scepinstall.exe just hangs on the remote machine. I also tried using the exe that can be found in C:\Windows\ccmsetup\

Thanks for the help

2 Answers2

6

I don't think those parentheses are valid. I think the /s switch in cmd.exe should preserve everything between the first and last ". Does this work?

psexec @ComputerList.txt -u domain\administrator cmd /s /c "xcopy "\\NetworkPath\Forefront Software\Install.exe" "C:\Windows" && Install.exe /u /s && del C:\Windows\Install.exe"

I tested with the following simplified command and it worked (modified to /k so I could view output).

psexec \\remotemachine cmd /s /k "dir "c:\temp" && echo "hello""
pk.
  • 6,541
0

Got it. The installer didn't like the path being hard coded in the script,

Changed from

C:\ccmsetup\scepinstall.exe /u /s

%windir%\ccmsetup\scepinstall.exe /u /s