https://github.com/lighterowl/volume-mounter-service
A Windows service which allows mounting and unmounting volumes
https://github.com/lighterowl/volume-mounter-service
c powershell winapi
Last synced: about 1 month ago
JSON representation
A Windows service which allows mounting and unmounting volumes
- Host: GitHub
- URL: https://github.com/lighterowl/volume-mounter-service
- Owner: lighterowl
- License: unlicense
- Created: 2021-01-10T01:06:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-10T01:08:01.000Z (over 5 years ago)
- Last Synced: 2025-04-02T19:38:25.554Z (about 1 year ago)
- Topics: c, powershell, winapi
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Volume Mounter Service
A small Windows "service" (it's not actually a service, since that would require
additional setup) which allows external applications to mount and unmount a
given volume (identified by its GUID) by issuing a request over a named pipe.
It's essentially a RPC mechanism for `SetVolumeMountPoint` and
`DeleteVolumeMountPoint`.
This was meant as a "means to an end" solution to allow non-elevated
applications to add and remove mount points. It also means that any application
can do that as long as it can communicate over a named pipe and knows the name
of that pipe.
The attached PowerShell script can be used to issue mount/unmount requests from
commandline applications :
```
cli.ps1 -Mount -DriveLetter Z -VolumeGUID 342ae97d-df6b-4939-b357-edcaaf530257
cli.ps1 -Unmount -DriveLetter Z
```
This was (and still is) my first attempt at writing PowerShell, so the code
quality is probably beyond horrible to any native speakers of that language.
Similarly, the server code had been written before I started learning about what
WinAPI is really all about, so it probably could use some improvement.