0% found this document useful (0 votes)
25 views1 page

"E://Cuentas Personales" "Cuentas de Todos": File - Share Path Sharename

This VBScript file was created on June 15, 2016 by RAÚL E. DUTARI D. to share a folder over the network. It declares variables for the file share permissions, folder path, and share name. It then uses WMI to create a new file share on the folder located at E:\Cuentas Personales, sharing it on the network as "Cuentas de Todos". The script outputs a success or error message depending on if the share was successfully created.

Uploaded by

radutari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views1 page

"E://Cuentas Personales" "Cuentas de Todos": File - Share Path Sharename

This VBScript file was created on June 15, 2016 by RAÚL E. DUTARI D. to share a folder over the network. It declares variables for the file share permissions, folder path, and share name. It then uses WMI to create a new file share on the folder located at E:\Cuentas Personales, sharing it on the network as "Cuentas de Todos". The script outputs a success or error message depending on if the share was successfully created.

Uploaded by

radutari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

D:\Codigo Fuente\Windows Scripting Hosting\MakeShare.

vbs

mircoles, 15 de junio de 2016 09:42 a.m.

'==========================================================================
'
' VBScript Source File -- Created with SAPIEN Technologies PrimalScript 3.1
'
' NAME:
'
' AUTHOR: RAL E. DUTARI D. , R.E.D.D.
' DATE : 2004-05-11
'
' COMMENT:
'
'==========================================================================
' Declaracin de variables
FILE_SHARE = 0
Path="E:\\Cuentas Personales"
shareName="Cuentas de Todos"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2")
Set objNewShare = objWMIService.Get("Win32_Share")
Set errReturn = objNewShare.Create(Path,shareName,FILE_SHARE)
if (errReturn>0) Then
WScript.Echo(" Foldersharing failed :" & errReturn)
Else
WScript.Echo(" Folder " & "Path" & " is shared as " & shareName )
End if

-1-

You might also like