Hello, Hopefully I am not necroing anything to old...
But I have ran into an issue with the self update batch file running with the correct privileges. I have added #RequireAdmin to both the main program and the UDF you created but that does not help.
I changed the @SW_HIDE to @SW_SHOW...I can see the command prompt launching and getting stuck.
If I grabbed the syntax from the batch and paste it into a command prompt I can see the error..
C:UsersUser>TASKKILL /F /FI "IMAGENAME EQ Program.exe"
ERROR: The process with PID 9212 could not be terminated.
Reason: Access is denied.
Any Idea how to get the program called within the UDF to run as an elevated command prompt?
Return Run($sTempFileName, 'C:SECTOOL', @SW_SHOW)
I do not want to hard code any username and passwords into the program, I would rather have it launch with the correct permissions some sort of way...