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.
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.
-aoption 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
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.
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:
If the directory to be shared is the root directory of a drive, the drive letter will be used as the sharename.
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.
specifies the directory to share.
specifies an additional remark (or comment) to be associated with the created share. If you specify both the
-rremark option and a standalone remark argument, the standalone argument is appended to the option argument to create the full remark. -Shostname
specifies the remote machine on which the directory to be shared resides.
When running this utility on a 8.1/2012R2/10/2016/2019/11/2022 system and using the
-Sto specify a remote Windows 95/98/Me system, some operations may fail, due to limitations in the operating systems. -uuses
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.
verbose. When this option is specified, mkshare displays additional information about the created share.
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.
Possible exit status values are:
Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.
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
PTC MKS Toolkit 10.4 Documentation Build 39.