TS6.5Sp2 in Windows.I am in an assumtion that "Preview" is same anywhere, either it being in the top right of the DCR or across the html file attached in the workflow while viewed from an email.
for (my $i=0; $i<@ARGV; $i++){ if ($ARGV[$i] =~ /iw_pt-preview/) { $mode = "preview"; }}