Yes, the user name and password are right.
I can map to the path in the script (\\10.1.0.100\c$) but when the authentication windows pops up it has the \\computer name\guest inserted in the username and it's grayed out so i can't change it.
Since there is no password on the guest account and you can't leave the authentication password field empty when mapping, i can't open the c:\. Hence why i use an admin account, both of the machines that I'm using are mine, so i have full access to all accounts.
As to your question about weather i'm using wscript or cscript, thb i don't know!!!!
I have installed Microsoft visual basic 2005 SP1, I opened it up and then opened a new project. (if there's a way of telling let me know and I'll check for you.)
I have this code inserted under a handle of button4 (click)
Dim fso, WshNetwork
Const OverwriteExisting = True
WshNetwork = CreateObject("wscript.network")
Set fso = CreateObject("scripting.filesystemobject")
WshNetwork.mapnetworkdrive "x:", "\\10.1.0.100\c$", , "username", "password"
fso.CopyFile "C:\batch\remote.bat", "x:\remote.bat", OverwriteExisting
MessageBox.Show("Transfer Complete")
The set that you refer to keeps disappearing after i put it in. (i have copied your code and replaced it for mine, But i still get strange errors like, "access denied" and "path not found".
I have tried subbing the c:\ on the remote machine for a newly made e:\ thats shared, but it made no difference. (also tried to map to the e:\ but still got the guest username inserted in the user field)
I have also tried to use the computer name instead of the ip but as I'm on a LAN VPN extension from work, (where there is another Pc with the same name) it keeps saying "access denied"
As i said yesturday I have only just started using vb so i'm a complete newbee, (but i'm willing to try to work it out for my self)
If there is anything else that you can suggest, (i might start a new project and just have that simple code to get to work first before making the form menu.) that would help i would forever be in your debt.
Thanks again