# File_CreateShare

> The function creates a file share on a local computer.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/file-functions/file-createshare/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

The function creates a file share on a local computer

:::caution
It is not possible to set permissions on the share using CapaInstaller functions
:::

Syntax

File_CreateShare(sDirectory, sShareName) As Boolean

### Parameter

#### sDirectory (String)

A directory on the disk to be shared

#### sShareName (String)

The name for the shared resource

### Example

**VBScript**

```vb
If bStatus Then bStatus = File_CreateShare("C:\Windows", "WinShare") 
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[File functions](/capainstaller/vb-scripting-library/file-functions/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
