sharepointsharepoint-2007sharepoint-deployment

STSADM.exe - "Operation completed successfully" - Twice?


For a command such as this:

C:\>stsadm -o upgradeSolution -name zzz.wsp -filename zzz.wsp -allowGacDeployment -local

I receive two outputs of the success statement rather than just one:

Operation completed successfully.

Operation completed successfully.

It seems to be related to the -local flag, so my guess would be that it successfully creates the Timer Job then runs execadmsvcjobs under the hood.

stsadm -o execadmsvcjobs

Thoughts on this?


Solution

  • Unfortunately I don't think this is nearly as exciting as it seems...

    Within STSADM, if you deploy a local solution (immediate), the following happens (crack open Reflector):

        base.DeployRetractSolution(solution, urls, userTypedIn, lcid, gacInstallWPPackDlls, true, force);
        base.OutputSucceedMessage();
    

    However, if you deploy a solution across the farm (timer job), this happens:

    base.CreateSolnDeployTimerJob(strTime, immediate, solution, urls, userTypedIn, SPSolutionDeploymentJobType.Deploy, lcid, gacInstallWPPackDlls, force);
    

    base.OutputSucceedMessage(); just writes the localized language version of "Operation Completed Successfully" to the console.

    Both of these do things under the hood that generate a STSADM SPOperation (and a "Operation Completed Successfully" console message), but the immediate one just has another base.OutputSucceedMessage(); on it.