Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Nov 15, 2019 8:12 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Create a text file in the /Library/LaunchDaemons folder
PostPosted: Tue Feb 05, 2013 11:10 am 
Offline

Joined: Thu Jun 22, 2006 4:44 am
Posts: 4
Hello
How can I create a text file ( actually a plist file ) in the /Libray/LaunchDaemons folder ?
I can't figure out how to get the authenticate windows promt for admin rights.
Thank you


Top
 Profile  
Reply with quote  
 Post subject: Re: Create a text file in the /Library/LaunchDaemons folder
PostPosted: Tue Feb 05, 2013 1:32 pm 
Offline
User avatar

Joined: Sat Nov 11, 2006 2:43 pm
Posts: 1221
Location: This poster has left the forums
I'm not sure if there is a more elegant solution, but one solution is to use an AppleScript to call a Shell script with administrator privileges

The AppleScript:
do shell script "touch /Library/LaunchDaemons/com.mycompany.test.plist" with administrator privileges

_________________
%Invalidforumsignatureexception% user signature not found


Top
 Profile  
Reply with quote  
 Post subject: Re: Create a text file in the /Library/LaunchDaemons folder
PostPosted: Tue Feb 05, 2013 1:51 pm 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Wouldn't bother with the prompt unless needed

do shell script "touch /Library/LaunchDaemons/com.mycompany.test.plist" password "yourpassword" user name "youradminusername" with administrator privileges

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
Reply with quote  
 Post subject: Re: Create a text file in the /Library/LaunchDaemons folder
PostPosted: Wed Feb 06, 2013 10:21 am 
Offline
User avatar

Joined: Sat Nov 11, 2006 2:43 pm
Posts: 1221
Location: This poster has left the forums
p0wn3d wrote:
Wouldn't bother with the prompt unless needed


The whole point is authentication is needed...

_________________
%Invalidforumsignatureexception% user signature not found


Top
 Profile  
Reply with quote  
 Post subject: Re: Create a text file in the /Library/LaunchDaemons folder
PostPosted: Wed Feb 06, 2013 10:43 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
Quote:
The whole point is authentication is needed...


Oh well in that case then

do shell script "touch /Library/LaunchDaemons/my.plist" with administrator privileges

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
Reply with quote  
 Post subject: Re: Create a text file in the /Library/LaunchDaemons folder
PostPosted: Thu Feb 07, 2013 1:38 am 
Offline

Joined: Thu Jun 22, 2006 4:44 am
Posts: 4
Thanks to you all,
that's exactly what I'm looking for.
Have a very good day.
Steven


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group