I'd try this (from the PC Gaming Wiki, GTA IV article):
There is an issue in which the Steam Version of the game (And possibly
non-steam) will fail to start. The Rockstar Social club login pops up,
but after you sign in, or go offline, the game fails to start. This is
caused by an out of date Games for Windows Live Client. You can
download the client here. You may have to start run this program each
time you want to play.
Unfortunately, however, updating the client may not be the only issue
preventing you from logging in to Games for Windows Live. It could
also be a problem with your MTU size. To determine what your MTU size
is, open a cmd window (click Start, type cmd, press enter). Once in
the cmd window, enter the following command:
C:\>netsh interface ipv4 show interfaces
This will show you the MTU size currently set for all of your network
interfaces. For your account to be able to log in, the MTU size must
be set to 1500. If it is not, a quick fix is to just force the change
C:\>netsh interface ipv4 set subinterface "Local Area Connection"
Assuming, of course, that "Local Area Connection" is the name of your
network interface. Note that even though we set "store=persistent",
this change will not be permanent and will be lost on reboot.
If the game loads as a process under Task Manager, but disappears
after a while, run GTAIV.exe under compatibility mode for Windows XP
SP3 or higher. In Windows 7, this can be found under the Programs tab
of the Control Panel.
I'd also try installing XLiveLess, if the above doesn't work.