Recent work has highlighted a number of compounds that target bacterial virulence by affecting gene regulation. In this work, we show that small-molecule inhibitors affect the expression of the type III secretion system (T3SS) of Escherichia coli O157:H7 in liquid culture and when this bacterium is attached to bovine epithelial cells. Inhibition of T3SS expression resulted in a reduction in the capacity of the bacteria to form attaching and effacing lesions. Our results show that there is marked variation in the abilities of four structurally related compounds to inhibit the T3SS of a panel of isolates. Using transcriptomics, we performed a comprehensive analysis of the conserved and inhibitor-specific transcriptional responses to these four compounds. These analyses of gene expression show that numerous virulence genes, located on horizontally acquired DNA elements, are affected by the compounds, but the number of genes significantly affected varied markedly for the different compounds. Overall, we highlight the importance of assessing the effect of such "antivirulence" agents on a range of isolates and discuss the possible mechanisms which may lead to the coordinate downregulation of horizontally acquired virulence genes.