Go Back   MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 6, 2006, 05:51 AM   #1
Will Cheyney
macrumors 6502a
 
Will Cheyney's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Send a message via AIM to Will Cheyney Send a message via MSN to Will Cheyney
Disabling 'Nap mode' via AppleScript - problems

So, I want to disable 'Nap mode' automatically on start up on my G5.
I came across the following AppleScript code but can't get it to work!

Code:
do shell script "hwprefs cpu_nap=1"
I have also tried the variation of that:
Code:
do shell script "hwprefs cpu_nap=false"
I compiled them and saved as an application, but get this error message whenever they are set to run:

Quote:
hwprefs: PERMISSION DENIED: effective user id MUST be root user to run

Can anyone offer a helping hand?
Thanks
__________________
Love your Mac 3.06Ghz 24" iMac, 4GB RAM, 2.5TB HDD.
Will Cheyney is offline   0 Reply With Quote
Old Jan 7, 2006, 06:13 AM   #2
Nermal
Moderator
 
Nermal's Avatar
 
Join Date: Dec 2002
Location: Whakatane, New Zealand
I'm pretty sure you need root privileges, which means typing your password. This would be a nightmare if the script is running on boot, so I can't offer any suggestions
Nermal is offline   0 Reply With Quote
Old Jan 7, 2006, 06:25 AM   #3
Wes
macrumors 68020
 
Wes's Avatar
 
Join Date: Jun 2001
Location: London
Send a message via ICQ to Wes Send a message via AIM to Wes Send a message via MSN to Wes Send a message via Yahoo to Wes
Yeah you need to be root user so:

do shell script "sudo hwprefs cpu_nap=false"

But then as Nermal says you are going to need to enter your password... I'm sure there is a way to build it into the script though.
Wes is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Mac Basics and Help

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
disabling bluetooth using applescript in mavericks festermonkey Mac Programming 4 Apr 30, 2014 06:35 PM
Disabling Single User Mode 10.6.8 Macman671 Mac Basics and Help 3 Oct 15, 2013 09:15 AM
Issue with disabling UITableView custom cell from indenting while in editing mode ord6 iPhone/iPad Programming 6 Mar 9, 2013 12:17 PM
Mountain Lion Nap Mode with 2010 MBP and SSD crose01 OS X 10.8 Mountain Lion 1 Aug 8, 2012 10:56 PM
Does Air Server work in power-nap mode? Nova Sensei MacBook Air 2 Aug 2, 2012 12:54 AM

Forum Jump

All times are GMT -5. The time now is 12:05 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC