Page 1 of 1

[13 Feb 2010] "sudo" with Execute() in MacOS

Posted: Sat Jun 13, 2020 5:32 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 13 Feb 2010 00:23:49 -0000

I'm trying to get a MacOS Hollywood program to copy a file to a location that requires root access. I was hoping that I could accomplish this by using "sudo" with Execute(), and I thought that this might bring up a password prompt; but this does not seem to work.

This is what I'm doing: Execute("sudo cp -p TestFile \"/Library/Application Support\"")

Am I doing something wrong, or is this just not possible with Hollywood?

[13 Feb 2010] Re: "sudo" with Execute() in MacOS

Posted: Sat Jun 13, 2020 5:32 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 13 Feb 2010 22:54:54 +0100
I'm trying to get a MacOS Hollywood program to copy a file to a location that requires root access. I was hoping that I could accomplish this by using "sudo" with Execute(), and I thought that this might bring up a password prompt; but this does not seem to work.

This is what I'm doing: Execute("sudo cp -p TestFile \"/Library/Application Support\"")

Am I doing something wrong, or is this just not possible with Hollywood?
Hmm, yeah, seems to be a bug as well. Arguments are never passed to the program. I'll fix this :)