How to create a vbscript to copy a file based on User Input?
Posted on 2008-10-10
How are you doing, I am extreemly new to creating scripts, I need to be able to create a script that will copy a file based on the user input. Reason, we have a tunnel to our parent company and when in the corporate office we need to use a Host file to access certian hosts, but when outside of the corporate office the Local Host file prevents accessing the same hosts that are also available over the Internet.
I would like to simply have the user double click on the Script, have it ask if you are in the Coporate Office or Remote?
If answer is "Corporate" - Copy C:\Windows\system32\Drivers\etc\Hosts.loc to C:\Windows\system32\Drivers\etc\Hosts
If answer is "Remote" - Copy C:\Windows\system32\Drivers\etc\Hosts.rem to C:\Windows\system32\Drivers\etc\Hosts
It would over write the Hosts File each time with the correct version.
Any help in point me to in the right direction would be appreciated, sorry for the lack of knowledge.