launch second instance with "open elevated process"
Posted: Fri Dec 02, 2016 8:44 am
Dear experts,
I'm experiencing two issues on Windows. My LiveCode app needs to launch a second instance of itself with elevated privileges.
I use the following code to launch the second instance:
The first issue is that the second instance starts but doesn't show its user interface.
The second issue is that the following code doesn't work in the second instance. It executes but no file is created or modified. It works in the first instance but not in the second instance.
Any idea why that is?
I'm experiencing two issues on Windows. My LiveCode app needs to launch a second instance of itself with elevated privileges.
I use the following code to launch the second instance:
Code: Select all
on openStack
if $1 is empty then
put $0 && "-slave" into tSlave
open elevated process tSlave
end if
end openStack
The second issue is that the following code doesn't work in the second instance. It executes but no file is created or modified. It works in the first instance but not in the second instance.
Code: Select all
put "testfile.bin" into tTestFile
open file tTestFile for binary write
write "test" to file tTestFile
close file tTestFile