Hi
You can probably install it but...
40 gb is a pretty small hard drive, unless you have additional hard drives you're not mentioning.
My Windows folder is 24 Gigs and that's not counting the Programs files or Program Files (x86) folders.
You're only going to end up with about 10 to 15 Gigs of free space (less than a lot of games use).
If I had to guess I'd say that if it will run, it won't run very well.
If you have to pay for a copy to put on the computer, I would save my money.
If you can try it for free, then go for it.
Just make sure you backup anything important.
Mike