Files
winsw/docs/extensions/shared-directory-mapper.md
Next Turn dcf3013f75 Revise docs for 3.0.0-alpha.3 (#608)
* Mention optional settings

* Mention removed settings

* Add links to system requirements

* markdownlint fixes

* Remove trailing spaces

* Mention boolean elements

* Add preshutdown

* Add `dev ps` command

* Stop misleading

* Why aren't you using Windows 10?

* Add `stdoutPath`/`stderrPath`

* Relative paths and the default working directory

* Send a close message to Windows (GUI) apps

* Use valid XML

* Add `customize` and `dev kill` commands

* Update README.md

* Add commands

* Fix spacing

* Update installation.md

* Update README.md
2020-08-11 07:54:32 +08:00

39 lines
1.1 KiB
Markdown

# Shared Directory Mapper extension
By default Windows does not establish shared drive mapping for services even if it is configured in the Windows service profile.
And sometimes it is impossible to workaround it due to the domain policies.
This extension allows mapping external shared directories before starting up the executable.
Since: WinSW 2.0.
## Usage
The extension can be configured via the [XML configuration file](../xml-config-file.md).
Configuration sample:
```xml
<?xml version="1.0" encoding="utf-8" ?>
<service>
<id>sampleService</id>
<name>Sample service</name>
<description>This is a stub service.</description>
<executable>%BASE%\sleep.bat</executable>
<arguments></arguments>
<log mode="roll"></log>
<extensions>
<extension enabled="true" className="winsw.Plugins.SharedDirectoryMapper.SharedDirectoryMapper" id="mapNetworDirs">
<mapping>
<map enabled="false" label="N:" uncpath="\\UNC"/>
<map enabled="false" label="M:" uncpath="\\UNC2"/>
</mapping>
</extension>
</extensions>
</service>
```
## Notes
* If the extension fails to map the drive, the startup fails