Reply to Message

View discussion in a popup

Replying to:
Jubish-Jose
Hot Shot
Hot Shot

Thanks @DEMdev . I tried the following.

Created a shortcut "C:\Windows\System32\xcopy.exe" with arguments ["\\<source folder>\*.*" "\\<destination folder>\" /Y] to be run on 'Startup'. Created an elevated application with the same "C:\Windows\System32\xcopy.exe" and arguments ["\\<source folder>\*.*" "\\<destination folder>\" /Y].

The shortcut got created successfully, but the folders did not get copied. According to logs, privilege elevation has run before the shortcut.  

=====================

2020-12-15 16:24:26.261 [INFO ] Collected argument-based privilege elevation settings to apply for elevated applications ('Cherry-PE.xml')
2020-12-15 16:24:26.265 [INFO ] Applied privilege elevation settings
2020-12-15 16:24:26.265 [DEBUG] Reloaded privilege elevation configuration (NoAD)

....

2020-12-15 16:24:26.745 [INFO ] Successfully created shortcut in programs menu ('Cherry.xml')

=====================

Running the shortcut as admin copies the folders successfully.

Is there a way to make sure that the timing is correct for the shortcut and privilege elevation?

 


-- If you find this reply helpful, please consider accepting it as a solution.
Reply
0 Kudos