The established controls for the squash vine borer are somewhat deficient. The gardener who goes on the offensive for controlling this pest will: A. Inject Bt into the hollow stems near the base. B. Slit open the stem, remove the borers, then cover the infected stem with soil in order to grow additional roots. C. Cover the plant base with shaving cream or some other barrier. D. Cover the plant with a row cover; then pollinate by hand. These procedures seldom work well because the borers from previous seasons have entered your soil and pupated. In fact, following the above prescriptions will insure that you continue year after year to cultivate the squash vine borer as though they were your pets. The Bt does not work, because the borers work in the solid portion of the plant base, and some always seem to escape. The slitting operation does not work because you always miss one or two borers, and the plant is too weak to save at that point anyway. The barriers and row covers don't work because your pets are already in place, despite your crop rotation efforts. The above are mostly anecdotal remedies, similar to those for slugs and snails; a real waste of time and effort.
With this pest, it is better to operate with defensive tactics. First, minimize your plantings of hollow stemmed cucurbits. Instead of pumpkins or winter squash, grow butternut squash. Limit your summer squash to a single variety or grow a solid stemmed variety such as Zucchetta rampicante (Pinetree Seeds Co.) As soon as your hollow stem summer squash starts to lay down from the weight of the plant, place aluminum foil on the ground underneath the stem at the base to disorient arriving moths. This will result in minimizing the attraction of your garden to the moth from adjacent and removed properties. Second, minimize the number of moths originating on your own property, by not allowing any larvae to reach the ground, ever. We'll discuss how to do that in the next paragraph. The result of this procedure, is that over time you will eliminate the number of moths hatching on your own property. And, in a few years you will have no moths except for the stray one that was blown to your property by the wind. Since you have minimized your hollow stem plantings, the outside incursions will be small, infrequent, and occur in random years if your immediate neighbors are not also growing hollow stemmed cucurbits. If they are, then you need to act in concert. If you live near to commercial growers of cucurbits, the problem may well be insurmountable. You would have to follow all of these suggestions in addition to protecting your plants with row covers. In addition, there may be some sections of the country where the squash vine borer moth is found in great numbers.
As to procedure, here is where I suggest you start: First, plan on succession plantings. Pretend that your zucchini is lettuce or any other veggie that we are accustomed to replant several times. Harvest as much fruit as you can before the stems are invaded. Inspect every day that you harvest, and guess when it is about one week before first leaf wilt, based on the amount of frass and the number of holes in the stem, then pull the entire plant out of the ground. Cut off the lower section containing the larvae, and place in a bucket of water, or soapy water, or no water - whatever it takes to destroy existing larvae, or at least prevent them from ever reaching any soil, so that they can never pupate, or wrap in plastic wrap and send to the landfill with your trash. Put the rest of the plant in your compost pile. Plant one or two (or more, depending upon family size) zucchini seeds every 14 to 21 days, so you will always have fruit all summer. Over the years, your squash vine borer problem will slowly disappear (again, depending upon your immediate neighbors.)
If you minimize the attraction, gradually destroy all those moths originating on your property, and plant successively, you will enjoy plenty of summer squash, and eliminate the need for chemicals on one more garden challenge. If you have but little space for summer squash, then your succession starts will have to be in containers. As you throw each infected plant away, another good sized one will be ready to take its place. Instead of having a continuous supply of squash, you might have to go without squash for a week or two between plants. That will not be hard to take, compared to the alternative.