First, we need a little more information on the setup.
I don't think you will get the desired results that way.
Usually you use a connection from the UPS to the PC to shut down the PC when the battery gets too low.
If it is a laptop, and you are using the PC to read the laptop battery, so when the power dies, the UPS takes over,
then when it dies, the laptop takes over, it would probably work, but not a good setup.
If it is a desktop you need the connection to the UPS.
Set up the PC to automatically turn on when power returns.