"It's not what you can do, it's what you can get done."

Thursday, December 16, 2010

Commandline to enable Apple Remote Desktop.

YourSudoEnabledAccount$ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users YourRemoteAccount -privs -all -restart -agent

Monday, November 15, 2010

Location of Linux Java browser plugin...

Just needed to test a little web java applet from a server, but firefox wasn't recognizing the plugin, even though I had symbolic links to it from about 4 different places...

Found the answer but of course I missed it the first time in that post, because I thought the major difference was the filename to the plugin. Well "duh" I thought, it's basically the only .so file there...no, look again, it's a whole different path.

Instead of [JRE]/plugin/i386... it's [JRE]/lib/i386/...

/me smacks head on desk.

Lightweight (In requirements) heavyweight (in features) audio player for OS X - Vox.

http://www.voxapp.uni.cc/

From their website:

"Vox is a little and simple music player for Mac OS X with support for many file types, including FLAC, MP3, AAC, Musepack, Monkey's Audio, OGG Vorbis, Apple Lossless, AIFF, WAV, IT, MOD, XM, Games Music and many others. Includes numerous effects like Equalizer, Reverb, Time Stretch, Pitch Shift, Echo. Moreover, all supported files can be exported to AAC+, Apple Lossless, WAV and other formats with enabled effects."

Thursday, July 22, 2010

Error installing PowerShell2/WinRM, Event ID 4373 "Access Denied"

Had to use the ever-useful process-monitor in order to find out what the issue was. In this case a registry entry at HKLM\Software\Microsoft\Windows NT\CurrentVersion\Svchost


Gave admins write access, and fixed!


P.S. And what was the super-important item that had to be written?

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost\WINRM]
"CoInitializeSecurityParam"=dword:00000001
"AuthenticationCapabilities"=dword:00003020



Huh.



UPDATE: Discovered (Thanks to this post) that the issue was caused by the GPO I had created months ago as per the MS-specified confiker mitigation KB. (To be fair the article does warn about inability to install updates...but it was easy to miss.)

Friday, June 18, 2010

Script to temporarily keep windows 7 from sleeping when closing the lid.

Normally I want my laptop (Windows 7 on a Dell D630) to sleep and/or hibernate or hybrid sleep when I close the lid. Occasionally though I want the exact opposite. I tried Don't Sleep and Insomnia, which didn't work when closing the lid. (I tried launching them elevated as well.) Every blog post I found seemed to be either explaining how to modify a power scheme, or a post on new "-energy" report.




Time to check out powercfg... Maybe I just don't know how to navigate Technet, but the only reference I can find is on the Vista version.



"powercfg /?" seems to be the best bet.


c:\>powercfg -l


Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
Power Scheme GUID: 500d0628-b98d-417b-b7e9-fa400ae0653c (Mine) *
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)


In XP you could reference power configs via text labels. Apparently now you have to use GUID. Thanks Microsoft. Thicrosoft.


I already have a scheme, the GUI won't let me duplicate it, so:
c:\>powercfg -DUPLICATESCHEME 500d0628-b98d-417b-b7e9-fa400ae0653c
Power Scheme GUID: 80e706a3-bdaf-44c4-8b3b-29eecce46464 (Mine)
c:\>powercfg -l


Existing Power Schemes (* Active)
-----------------------------------
Power Scheme GUID: 381b4222-f694-41f0-9685-ff5bb260df2e (Balanced)
Power Scheme GUID: 500d0628-b98d-417b-b7e9-fa400ae0653c (Mine) *
Power Scheme GUID: 80e706a3-bdaf-44c4-8b3b-29eecce46464 (Mine)
Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)


c:\>powercfg -CHANGENAME 80e706a3-bdaf-44c4-8b3b-29eecce46464 MineNolidSleep


At this point you could modify settings using the GUI, but since we're already in commandline land.


This is just getting ridiculous. Time to make things a bit easier:
c:\>set PWRNormal=500d0628-b98d-417b-b7e9-fa400ae0653c
c:\>set PWRNoSleepLid=80e706a3-bdaf-44c4-8b3b-29eecce46464


So now you need to query the scheme to get the GUID of the item you want:
c:\>powercfg -q %PWRNoSleepLid%


This will dump a huge list of options. I copied it to a texteditor and found what I wanted:
Subgroup GUID: 4f971e89-eebd-4455-a8de-9e59040e7347 (Power buttons and lid)
Power Setting GUID: 5ca83367-6e45-459f-a27b-476b1d01c936 (Lid close action)


Possible Setting Index: 000
Possible Setting Friendly Name: Do nothing
Possible Setting Index: 001
Possible Setting Friendly Name: Sleep
Possible Setting Index: 002
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 003
Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001
So to tell it to do nothing when shutting the lid, we want setting index 0.
c:\>set SUBGUID=4f971e89-eebd-4455-a8de-9e59040e7347
c:\>set SETGUID=5ca83367-6e45-459f-a27b-476b1d01c936
I want to set it for both AC and DC. (Plugged in and on battery.)
c:\>powercfg -SETACVALUEINDEX %SUBGUID% %SETGUID% 0
c:\>powercfg -SETDCVALUEINDEX %SUBGUID% %SETGUID% 0


So now we can simply choose which profile we want:
c:\>powercfg -s %PWRNormal%
c:\>powercfg -s %PWRNoSleepLid%

Now, take the relative pieces and put 'em in a batch file or two, voila!