context:
What I have done:
I executed the subst cmd in order to generate the F:\ drive (from C:\)
Added the directory "eventlogging"
The problem:
What I tried:
Additional info:
If you mapped the drive with an elevated prompt, it will be invisible under non-admin accounts.
You can either run your program as an adminstrator, or use a different method which is visible to both admin and non-admin accounts. This involves adding the following key to the registry (copy/paste the following line into a "temp.reg" file, and double-click it):
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"F:"="\\??\\C:"
Additional benefit is that this approach is persistent across reboots.
Note: If you are planning to add the key manually using regedit.exe, do not escape the backslashes (i.e. replace each \\ with \ in the expression above), and there are no quotes in that case too (you would add a new String Value to the DOS Devices key, set name to F:, and data to \??\C:)
You also need to restart the system for this to take effect.
Also: I am aware you wrote that the code cannot be changed, but it should be emphasized nevertheless: using a config file instead of hard-coded paths would obviously be the right approach with any application (or even simpler, placing logs somewhere inside current users AppData\Local folder). Rebuilding this common base with a default set to f:\eventlogging wouldn't break other apps, but would allow you to have this flexibility. Same goes for all other hard-coded settings and magic numbers across your code. All logging frameworks use config files to configure their outputs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With