SYNOPSIS
mkshare
[
DESCRIPTION
The mkshare utility shares a directory with the rest of the network. Such a shared directory is called a share.
Normally, the directory to be shared, the name to use for the created share,
and any associated comments with that share are specified with the
If you do not specify any arguments or options, a usage message is displayed.
Options
-a access-
sets the access level for the shared directory. This option is only relevant for shares residing on Windows 95/98/Me systems; it is ignored when dealing with shares that on 8.1/2012R2/10/2016/2019/11/2022 systems.
The mkshare
-a option can set the following access permissions when sharing a directory that resides on a Windows 95/98/Me system:Read readonly Full full access
Although you cannot use the mkssare utility to set access levels when sharing directories that reside on 8.1/2012R2/10/2016/2019/11/2022 systems, you can use the chacl utility (if you are working on a 8.1/2012R2/10/2016/2019/11/2022 system) to set and change user access permissions for the created share. Similarly, you can use the lsacl utility to list the share's permissions. With the chacl command, you can set the following user access permissions for shares that reside on 8.1/2012R2/10/2016/2019/11/2022 systems:
Read read permissions write write permissions create create new files exec execute programs delete delete file or folders attrib change attributes perm change permissions
-f -
forces mkshare to overwrite an existing share with the same name as the share to be created. That is, the existing shared is removed and the new share is created.
-n sharename-
specifies the name of the created share. If sharename is a UNC name of the form //hostname/name, the effect is the same as specifying -S hostname -n name.
If you do not specify this option or the standalone sharename argument, the base name of the directory to be shared is used as its name. The base name is the same value as returned by the command:
basename directory
If the directory to be shared is the root directory of a drive, the drive letter will be used as the sharename.
-P -
on Windows 95/98/Me systems, forces the created share to be persistent across boots. This option is ignored on 8.1/2012R2/10/2016/2019/11/2022 systems, where all shares are persistent across boots.
-p path-
specifies the directory to share.
-r remark-
specifies an additional remark (or comment) to be associated with the created share. If you specify both the
-r remark option and a standalone remark argument, the standalone argument is appended to the option argument to create the full remark. -S hostname-
specifies the remote machine on which the directory to be shared resides.
- Note:
-
When running this utility on a 8.1/2012R2/10/2016/2019/11/2022 system and using the
-S to specify a remote Windows 95/98/Me system, some operations may fail, due to limitations in the operating systems.
-u uses-
specifies the maximum number of concurrent uses that is to be allowed for the created share. By default, the number of concurrent uses for a share is unlimited.
-v -
verbose. When this option is specified, mkshare displays additional information about the created share.
EXAMPLES
The following commands:
mkshare c:/dir1 mkshare -p c:/dir1 mkshare -p c:/dir1 -n dir1
all share the c:/dir directory with the share name of dir1, while the commands:
mkshare c:/dir1 sharedir mkshare -p c:/dir1 -n sharedir
both share the c:/dir directory with the share name of sharedir, and the commands:
mkshare c:/docdir //venus/docshare mkshare -S venus -n docshare -p c:/docdir mkshare -n //venus/docshare -p c:/docdir
all share the c:/docdir directory on the remote machine venus with the share name of docshare.
DIAGNOSTICS
Possible exit status values are:
PORTABILITY
Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.
AVAILABILITY
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.4 Documentation Build 39.