Instructions
Open "Notepad." You can access it by clicking on "Start," "Programs," "Accessories" and then "Notepad."
Type "-Windowed" into the text editor, omitting the quotation marks.
Click "File" and then "Save." Name the file "commandline.txt." Again, omit the quotation marks.
Navigate to your "Grand Theft Auto IV" directory. By default, it's located in "/Program Files/Rockstar Game/Grand Theft Auto IV."
Click the "Save" button to save the file "commandline.txt" in this location.
Start the game. It will be in windowed mode.