|You are not going to do it with a simple script, you are going to need a proper installation package and all that entails.|
To install an application remotely require a little more than just copying files, you are going to need access to the registry on the remote machine and that can be rather difficult, impossible even if the remote computer has any kind of security implemented.
Why must it be done while the user is logged off? Are you trying to do something you don't want the user to know about. If so then that comes into the realms of hacking and you will get no help for that here.