How Best to Deploy a 32- and 64-bit App in a Single Task

Back in the days before the SWD Wizard, when we would hand build our deployments, we would easily have an Action script that would deploy the 64-bit version of the app or the 32-bit version of the app. As I’m now trying to use the SWD Wizard for everything and not build by hand, I’m getting this error when I try to save the Task.

The simplified version of the Action script is:

if {x64 of operating system}

begin prefetch block
_ add prefetch item name=123 sha1=123 size=456 url=SWDProtocol://127.0.0.1:52311/Uploads/123/64-Bit-App.msi.bfswd sha256=789_
end prefetch block

else

begin prefetch block
_ add prefetch item name=ABC sha1=ABC size=DEF url=SWDProtocol://127.0.0.1:52311/Uploads/ABC/32-BitApp.msi.bfswd sha256=GHI_
end prefetch block

endif

What’s the best practices approach in this case? I hate to have two Tasks when a single one will do.

I feel silly… I just figured it out (haven’t tested it yet though):

begin prefetch block
if {x64 of operating system}
add prefetch item name=123 sha1=123 size=456 url=SWDProtocol://127.0.0.1:52311/Uploads/123/64-Bit-App.msi.bfswd sha256=789_
else
add prefetch item name=ABC sha1=ABC size=DEF url=SWDProtocol://127.0.0.1:52311/Uploads/ABC/32-BitApp.msi.bfswd sha256=GHI_
end prefetch block
endif

That should work, the error is because it’s considering the first prefetch block ended. You can not have any command before a prefetch block.