Do academic integrity pledges work?
There is some research on this, with inconclusive results. Some problems with the existing literature:


These studies typically rely on student reports of cheating (i.e. students fill out an anonymous survey asking if they have cheated and if they have observed cheating)
The effectiveness of such a pledge seems to vary tremendously with context (big school vs small school, online vs traditional class, field of study, how much emphasis is placed on the honor code), and it is difficult or impossible to control for all of this
Many of these studies compare schools with a pledge and unproctored exams to schools with no such pledge and regular exams, which is not exactly the comparison you ask about.


See:

McCabe, Donald L., and Linda Klebe Trevino. "Academic dishonesty: Honor codes and other contextual influences." Journal of higher education (1993): 522-538.

Hall, Teresa L., and George D. Kuh. "Honor among students: Academic integrity and honor codes at state-assisted universities." NASPA Journal 36.1 (1998): 2-18.

McCabe, Donald L., Linda Klebe Trevino, and Kenneth D. Butterfield. "Academic integrity in honor code and non-honor code environments: A qualitative investigation." Journal of Higher Education (1999): 211-234.

McCabe, Donald L., Linda Klebe Trevino, and Kenneth D. Butterfield. "Honor codes and other contextual influences on academic integrity: A replication and extension to modified honor code settings." Research in higher Education 43.3 (2002): 357-378.

Roig, Miguel, and Amanda Marks. "Attitudes toward cheating before and after the implementation of a modified honor code: A case study." Ethics &amp; Behavior 16.2 (2006): 163-171.

Vandehey, Michael, George Diekhoff, and Emily LaBeff. "College cheating: A twenty-year follow-up and the addition of an honor code." Journal of College Student Development 48.4 (2007): 468-480.

Konheim-Kalkstein, Yasmine L., Mark A. Stellmack, and Margaret L. Shilkey. "Comparison of honor code and non-honor code classrooms at a non-honor code university." Journal of College and Character 9.3 (2008).

LoSchiavo, Frank M., and Mark A. Shatz. "The impact of an honor code on cheating in online courses." Journal of Online Learning and Teaching 7.2 (2011): 179.