#TodayILearned: #Microsoft #Windows is terrible at #accessPrivileges.
I've got a #ScheduledTask that runs as a network user. I've done this a million times and I know how to get Windows to accept it.
This time, I need that task to run a #DosBatch script. It runs statements invoking #java and #DOS commands.
One of those is #MOVE. It only works on local disks, including mapped drive letters. It does not speak #UNC.
So I map a drive. I assign privileges to that network user - 1/4
What the heck are you doing, #Microsoft #Windows?
At my wit's end, I have an idea. Maybe I can have the #MSDosBatch script create the drive letter so it will be available during the #ScheduledTask session? Yes, I can! With the #NetUse command.
On first try: fail! Drive letter already is mapped - 3/4
Seriously, what the heck, #Microsoft #Windows? First you tell me you can't access the drive letter, and then when I map it you tell me it's there already? You suck at #accessPrivileges.
Final solution: unmap the drive letter, and then in the #MSDosBatch script first map it, then unmap it when done.
Holy moly, Gates et al, did you have to make your system contradict itself? - 4/4
Server run by the main developers of the project It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!