Power window repair on 1997 Pontiac Sunfire

I am trying to replace the window lift motor on my 97 sunfire gt (2 door). I have the door panel off, the plastic removed and the window taped in the up position. I can't figure out what to do next, it looks like everything is riveted in place. I have the tools to drill and install new rivets (or screws), but which ones do I drill? Any tips would be greatly appreciated!

Asked by for the 1997 Pontiac Sunfire
i hope you have the regulator/motor assemby. we have had very little sucess with repalcing just the motor.
there are 4 rivets that hold the regulator. unplug the motor. remove the bolts attaching the regulator to the window.
carefully remove the assembly from the door.

Thanks for the info!! figured before I started ripping things apart further, I plugged the power plug into the new motor, tested with ignition on with up/down switch and no go. I checked the big fuse with a meter and it is fine, I tested the up/down switches with the meter and they seem to be ok. Is the regulator the half moon gear that is driven by the lift motor? The gears all seem to be in decent shape.
you said you checked the switch for power. one of the commands is not working. there is power and ground supplied from the master switch. you need more testing on that, it may be the culprit. get a shop to verify since you have it to this point. you may not need the motor after all.
the big gear is part of the regulator.

I really appreciate your help and fast responses! Heading down to the auto shop now to check out the switch. I will keep you posted. Thanks again
good luck
1 more answer , 1 more comment
If you have the replacement motor with you, Hold it up in position to figure out which rivets need drilling. These motors are held in place by hardened steel rivets and they use a huge rivet gun to install, You might need the help of your local body shop as they do this all the time But maybe you can rent this size rivet gun at your local tool rental
Thanks for the tip also! Those are pretty huge rivets, If I end up tearing this thing apart that is great advice!