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

1.3k views Asked by At

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?

2

There are 2 answers

0
Brandon On BEST ANSWER

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.

1
Anders Rask On

You should use upgradesolution with care, since it does not support adding new features to a solution package.

Also be warned that if you use -local you only deploy on your local WFE. For consistency i always use -immediate and after i have finished adding timer jobs i run stsadm -o execadmsvcjobs

Im not sure about the two messages, but since upgradesolution is a two stage operation that first adds the new version of the old solution and then adds it, it would make sense that this was why you got two messages.