Hello,
I've been tasked with the job to write a batchfile that can be put into the windows scheduled tasks to do the following...
1. Launch the VPN decktop icon
2. Issue the map network drive command (net use)
3. Copy a file across the network
4. Disconnect the VPN
I've played with DOS Batch, START, RUNDLL etc.. and cannot seem to get the shortcut to run for the VPN connection.
I posted in the windows API and they sugested trying VBScript, a sample code was provided
but when I try this I get the following error
If I can get a VBS file to work fine, but how would I then issue the net use command and data transfer, would it be the same method i.e. OWS.run "net use", OWS.run "copy [file] [target]" etc... and how would I then kill the VPN connection.
All help is much appreciated.
Regards,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
I've been tasked with the job to write a batchfile that can be put into the windows scheduled tasks to do the following...
1. Launch the VPN decktop icon
2. Issue the map network drive command (net use)
3. Copy a file across the network
4. Disconnect the VPN
I've played with DOS Batch, START, RUNDLL etc.. and cannot seem to get the shortcut to run for the VPN connection.
I posted in the windows API and they sugested trying VBScript, a sample code was provided
Code:
Set OWS = CreateObject("Wscript.Shell")
OWS.Run("full_path to your LNK file here")
' i.e. c:\LNKFolder\MyLnk.lnk
Can someone help as to how I can create a file that can be scheduled to acheive my required task.Invalid procedure call or argument [VBScript runtime error]
If I can get a VBS file to work fine, but how would I then issue the net use command and data transfer, would it be the same method i.e. OWS.run "net use", OWS.run "copy [file] [target]" etc... and how would I then kill the VPN connection.
All help is much appreciated.
Regards,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.