开发者

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

开发者 https://www.devze.com 2022-12-08 00:17 出处:网络
For a command such as this: C:\\开发者_运维百科>stsadm -o upgradeSolution -name zzz.wsp -filename zzz.wsp -allowGacDeployment -local

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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消