@Bobert M. It all depends on what it is. Different assets will have different depreciable lives depending on what they are, where they are and how they're installed plus a bunch of special rules. For rentals the cost of the property and improvements would be split between the 27.5 year rental property (everything structural or necessary for the general operation and maintenance of the building), 15 year land improvements (basically everything outside the building not attached to the building), 5 or 7 year personal property (anything inside that isn't 27.5 year, this is the tricky part as a number of factors determine if an asset qualifies as personal property) and non depreciable land.
As for your other question your basis for the improvement has to be the actual cost, so no you can't say those $2,000 windows cost $5,000 because that's what the labor cost would've been but you did it yourself for free. If you actually got them done for $5,000 you can add $5,000 to your basis. If you got them for $2,000 and installed them at no cost you can add $2,000 to your basis. In either case with the windows it's a 27.5 year asset since it's part of the structure.
Some thing you can expense vs capitalize if it's under $2,500 it can fall under de minimus rules. All this means you need to talk to a professional to get advice on your particular situation. Find a good real estate CPA and go through it with them. My firm figures depreciation from an engineering standpoint and it's pretty complex. The thing with replacing assets such as windows is you need to remove the cost of the old windows from the basis before adding the cost of the new windows. You have no way of doing that without talking to an engineer or having the original construction invoices for the old assets.
All the rules on this are several hundred pages of tax code. You can read it yourself but it's very dense, very boring, often doesn't make sense and the info you want is buried in a bunch of stuff that doesn't apply to you. That's why there are CPAs and specialists like myself (I'm not a CPA) to help people figure all this stuff out.
Hope this helps, let me know if you have other questions. Feel free to PM me.