Answering to myself : in the attached script the VBScript in charge of making the UAC elevation is created only once. Any subsequent use of it just checks that it has the correct version before using it, or overwriting it.

On second thought I think that this script is so tiny that it would certainly be simpler if it was created in the temporary directory and deleted after use. All the more that it seems that MSWindows asks for the UAC elevation only once in an MSW session.

  Vincent.



Le 17/08/2017 à 11:49, Vincent Belaïche a écrit :
Please find attached what I have done.

It seems that once the UAC elevation given under circumstance where the user has symlink creation right, then for any subsequent call the symlinks are working well and going through the runas is not needed.

There is still some strange behaviour, the window title does not look the same any longer, ie start is not working the same way for the subsequent calls.

  Vincent.

PS : Please rename the file to remove the filename extention .remove-this-fnext. I had to do this because my SMTP server was rejecting the email otherwise.

Le 14/08/2017 à 12:18, David Macek a écrit :
On 14. 8. 2017 12:03, Vincent Belaïche wrote:
PS : Certainly if the "runas" Shell.Application was launching recursively the whole .cmd script instead of just the console it would work better. Would you like it if I investigate this way and contribute an update of .cmd

I am personally not inclined to extend the script, but I assume it will get approved if implemented correctly.




---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to