Monthly Archives: January 2014

Fixing Error “Word Cannot Publish This Post” When Publishing from Word

Published by:

I recently had to troubleshoot an issue where a number of people were unable to publish to their blog from Microsoft Word 2010. They would get the error Word cannot publish this post, and pressing CTRL+SHIFT+I revealed error 701797 in the dialog box. The same error occurred on both SharePoint 2010 and WordPress. There are a number of posts online which attempt to identify solutions for this problem; however none of them worked for me. I also found that there was no one place where all of the possible solutions are together, and I had to find many of the links in the Wayback Machine. So, this is my attempt at consolidating the solutions, as well as including my own.

Continue reading

Running a Command Against a List of Machines in Limited Parallel

Published by:

I’ve often had the need to take a list of computers or servers and run the same command against all of them, and then take some result from that command to report back on. For example, I may want to ping a list of machines and log the response times, or perhaps check the status of BitLocker using manage-bde. Typically, I would have two ways to do this:

The serial batch file method
In this method, you would create a batch file that did what you wanted and the command would get run against each machine one at a time. Maybe I generated the list using Excel and had a file filled with “ping ComputerA >> ComputerA.txt” (and so on for each computer), or maybe I put the list in a text file and used a FOR loop to loop over each one. The pro of this approach is that it’s easy, but the con is that if it’s a long list, it’s going to take a long time doing one computer at a time.

The Start.exe No-Wait Method
Using this method, you’re doing the same this as above, but I’m calling something like “start cmd.exe /c ping ComputerA” (without the /wait switch). The pro of this method is that it will run as many processes as my computer can handle at once, but the huge con is that I now have potentially hundreds of processes spawning at once, over and over again, and this often leads to either really poor performance, or a crash.

Now… Slowing Down the Start.exe No-Wait Method
Because I want to still take the action on as many systems as I can at a time, but I don’t want to flood my process list, I wrote this recently to help slow it all down. This batch file uses ping.exe as an example, but it could be anything else you’d like. It looks at the number of times a process already exists before starting a new one, and if it meets a preset count, we use the ping-localhost trick to delay the start of the next process.

Continue reading