Shares 
Author Message
 Shares

Hello evreyone,
Can you help me, how can i map a network share? im not say map drive like
Q: etc... junt want to add a network palce to a  folder, manualy its done
but in vbs im dont no.
Please help me

Thanks
JV



Sat, 16 Jul 2005 19:48:27 GMT  
 Shares
What you're wanting to do isn't map a drive; you want to create a shortcut to a
network share.  The following will create a shortcut "C:\tmp\Network Path.lnk"
which points to the share \\MyServer\SomeShare.

set WshShell = WScript.CreateObject("WScript.Shell")
set oShellLink = WshShell.CreateShortcut("C:\tmp\Network Path.lnk")
oShellLink.TargetPath = "\\MyServer\SomeShare"
oShellLink.Save

--
Please respond in the newsgroup so everyone may benefit.
 http://dev.remotenetworktechnology.com
 ----------
 Subscribe to Microsoft's Security Bulletins:
 http://www.microsoft.com/technet/security/bulletin/notify.asp


Quote:
> Hello evreyone,
> Can you help me, how can i map a network share? im not say map drive like
> Q: etc... junt want to add a network palce to a  folder, manualy its done
> but in vbs im dont no.
> Please help me

> Thanks
> JV



Sat, 16 Jul 2005 21:56:18 GMT  
 Shares
Thanks, it work fine

thanks
JV



Quote:
> What you're wanting to do isn't map a drive; you want to create a shortcut
to a
> network share.  The following will create a shortcut "C:\tmp\Network
Path.lnk"
> which points to the share \\MyServer\SomeShare.

> set WshShell = WScript.CreateObject("WScript.Shell")
> set oShellLink = WshShell.CreateShortcut("C:\tmp\Network Path.lnk")
> oShellLink.TargetPath = "\\MyServer\SomeShare"
> oShellLink.Save

> --
> Please respond in the newsgroup so everyone may benefit.
>  http://dev.remotenetworktechnology.com
>  ----------
>  Subscribe to Microsoft's Security Bulletins:
>  http://www.microsoft.com/technet/security/bulletin/notify.asp



> > Hello evreyone,
> > Can you help me, how can i map a network share? im not say map drive
like
> > Q: etc... junt want to add a network palce to a  folder, manualy its
done
> > but in vbs im dont no.
> > Please help me

> > Thanks
> > JV



Sat, 16 Jul 2005 23:06:28 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Shared templates can't be shared

2. Shared or not shared Connections ?

3. how to share project/solution on shared server?

4. I need an example of NET SHARE when creating a local printer share

5. WSH - sharing directories ( net share)

6. enumerating shares and share permissions with vbscript

7. share permissions and enumerating shares

8. List shares and share permissions?

9. Creating a share with share permissions

10. Sharing a form with a shared user control? (vb6)

11. Using WMI and VBS to share folders and set share / NTFS permissions....

12. File sharing violations

 

 
Powered by phpBB® Forum Software