Friday, September 26, 2008
Excel Password Crack
Thursday, July 24, 2008
Outlook won’t send email, it just sits in your Outbox
Tuesday, July 15, 2008
Why I would spend $150 on a USB Keyboard
Ok, in my previous post I bemoaned the fact that my 19” flat panel monitor broke and took my $150 Matias Tactile Pro 1.0 keyboard with it. I thought I’d follow up on an experience that made me have a huge amount of respect for the Matias company.
Why a $150 Keyboard?
I realize most people purchase keyboards that cost $30 to $40 US dollars these days. Often they don’t purchase keyboards at all but use the ones included free with their computers. So knowing one can buy a completely usable keyboard for $30 then why would I spend $150 on a keyboard? There are actually several answers but I’m only going to discuss one in this post. (For more information on the history of this keyboard read this article on TidBITS.)
Now That’s Customer Service
I type A LOT. It's basically my livelihood. If I couldn’t type, I’m not sure how I could support my family. Because of the fact that I probably spend 10 hours a day typing and it’s so important to my family’s well being I’m willing to invest in a decent keyboard. The keyboard I’m talking about is the Matias Tactile Pro 1.0. It’s a wonderful keyboard that feels great and supports your hands long into the night. When I found my flat panel monitor had broken the keyboard stands off of the back basically making the keyboard useless I was crushed. I went to the Matias site to even see if they were making a Tactile Pro keyboard (I knew they had long discontinued the 1.0 version.) I also knew that due to a tight budget lately, I might have to replace it with a $30 keyboard. I found Matias was no longer making a Tactile Pro keyboard. They will release a 3.0 version next year but the 1.0 and 2.0 versions are no longer available. I know they make a really nice USB 2.0 keyboard but it isn’t anything like the Tactile Pro.
Disappointed, I filled out the web form to be notified when the Tactile Pro 3.0 keyboard becomes available. There is a message section and I just put in pathetically that the feet had broken off of my Tactile Pro 1.0 keyboard so I needed to purchase a new one.
Ok, now you know how web forms work. The email address goes into a database and no one ever reads the message section.
Except at Matias!
Less then 24 hours later I was contacted through email by a customer service representative.
She wrote to me that if I give her my address she would mail me replacement feet. That’s right. I sent her my address. And a few days later, Matias paid $6.50 CAD to send me an envelope with two replacement feet.

Canadian Postage

My new Feet
Truly amazing. Matias, you have a customer for life!
Sunday, July 06, 2008
19" Samsung Flatpanel broke away from its stand
This morning I walked into my office to check email and saw this.

That’s my Samsung flatpanel sitting on my keyboard.
You can see the stand is no longer attached to the back of it. Last night it was fine and hadn’t been touched or moved since then. So sometime during the night the metal bracket holding it to the stand simply gave up.
Now that’s depressing enough as it is, but if you look a bit closer you’ll notice that the weight of the monitor broke the feet off of the bottom of my Matias Tactile Pro keyboard (which cost me $150 USD.)

Why someone would spend $150 on a keyboard will be my next blog entry, but to give you an idea you can read this (You have to at least read the section entitled Protecting the Alps.)
Now I think I should point out this monitor has had a very easy life. It just sits on my desk. It doesn’t move around or travel. It just sits there. It literally broke due to its own weight. I think it is still under warranty so I’ll have to try and find the original paperwork (which reminds me, I need to clean up and organize my office.)
Tuesday, June 10, 2008
iPhone 3G, still missing features
- Stereo Bluetooth headset support (A2DP)
- Copy and Paste
- Video recording
- Global search (they let you search contacts now, but not notes or calendars, Palm OS has had this for years!)
- DUN tethering (so I can use the phone as a 3G modem on my laptop either over Bluetooth, or preferably, USB)
- Notes syncing with Outlook (on Windows) or Mail (on Mac OS X)
- A ToDo app with syncing with Outlook (on Windows) or iCal (on Mac OS X)
- MMS (picture messaging, so far they still only support text messaging)
- Chat/IM support for popular chat apps (MSN Live Messenger, AIM, GTalk, etc.)
- Voice activated dialing
- Syncing music/video/podcasts and calendar data over Bluetooth or WiFi. Why should I have to connect a USB cable just to sync?
- Forward camera and video chat support
- Undo in most apps (something PalmOS apps have had for over a decade.
- Turn by turn GPS
- Bluetooth support for keyboards and standard devices other then headsets and headphones.
Monday, March 10, 2008
Reducing a Printer Driver from 80MB to 9MB
Ok, so the nearest printer to me happens to be an HP OfficeJet L7780 all in one. Now I don’t need the scanner or other features accessable from my computer, I just need to print. So I go to HP’s website to download the printer driver. I know that they will try to give me an installer with scanner software, etc. on it, but I just need a printer driver.
I get here pretty quick with a little searching:
http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?lc=en&cc=us&dlc=en&product=2512010&lang=en&
I choose Windows XP ‘cause that’s what I’m using. And finally I get here: http://h10025.www1.hp.com/ewfrf/wc/softwareList?os=228&lc=en&cc=us&dlc=en&product=2512010&lang=en
Now it has a few options. There is a full feature software and driver. No doubt that includes the scanner software and more that I already said I don’t want. It comes in at a whopping 314MB. Good thing I don’t need all of that. Let’s see what else? There is a CD ordering option. Two software removal utilites. A wireless configuration utility. A Basic feature software/driver at 68MB (still too big to be what I want) and a Basic Features software/driver 'for IT professional use only' at 43.39MB (oh, BTW the IT pro only is at version 7, where as the others are at version 8.0.1 AND it was updated 2 months prior to the 8.x versions.) Nice eh?
Well I go for the one for IT pros anyway (hey I’m a pro right?) even though it is a full version older. I like the idea of it being over 20MB smaller, and the new software is probably just for the scanner.
Ok after the rather long download across an overburdened wireless network I get my .exe file. Double clicking it expands to a new folder with my drivers in it. That folder is a whopping 80MB with 280 files and 26 folders. Wow that’s some printer driver.
I decided I couldn’t stand it and had to dissect the driver installer and see what extra stuff I could eliminate. Once I eliminated anything that wasn’t needed, this is what I finally had:

The 80MB folder with 280 files and 26 folders is now 9MB with 7 files and 0 folders. Yes that’s right.
Now let’s see what I kept. One of the space savings was eliminating languages I didn’t need, so I go rid of several .cab files for foreign languages and just kept p3i2enww.cab for English. This eliminated a few MB but wasn't too significant.
I also kept the .cat file which provides the driver signature. Without this the driver will still install but you’ll get a nasty warning from windows that the file could be malicious and asking if you are absolutely certain you want to install it.
The other files you see there have necessary driver installation information.
All the other files I eliminated, I didn't need. A lot of them were HP's picture viewing software, scanner software, OCR software, etc. Like I said, I just needed to print!
Doesn't seem like too much to ask they make just the printer driver available to download, at least for "IT Professionals." Oh well, I saved it on our workgroup file server for everyone else to use as needed.
Hope this helps you streamline your printer drivers.
Saturday, December 08, 2007
Adobe Updater Crashes on Mac OS X and a Fix
What problems? Oh, all those failures from automatic updates.
So I was rather disappointed when every time I launched Photoshop, Adobe Updater would generate one of those... "This application has crashed unexpectedly would you like to report it to Apple..." dialogs. I even knew there had been some updates made available, but I couldn't get them because Adobe Update would crash anytime it was launched.
I've got a friend who's situation was even worse. His Adobe Updater was set to run on startup, and would crash his entire system every-time it launched.
So what's the solution? Well, it appears that it must be a permission issue with the updater needing to modify files it doesn't have enough access too.
We can solve this by opening Terminal (in your Utilities folder under Applications) and running a unix command line giving it full access to your system.
(Ok the following line displays poorly in the blogger template, however it should be easy to select and then cut and paste into your Terminal app.)
sudo /Applications/Utilities/Adobe\ Utilities.localized/Adobe\ Updater5/Adobe\ Updater.app/Contents/MacOS/Adobe\ Updater
Copying and pasting that into Terminal should cause it to ask for your password. Go ahead and type in your password. Now that should launch the updater app. Assuming you have admin rights and can use sudo, the application should have all the power over you system it needs to complete an update. I had to take a further step and install some updates separately. I think I had about 6 or 7 updates to install, and I'd always get an update failed message when I tried to do all of them. However, I did them one at a time, and eventually everything installed.
Now when Adobe Updater auto launches on my system, it no longer crashes. Yea!
I wish Adobe would spend as much time perfecting their updater app, as they have on their software. Aside from being a resource hog, Photoshop CS3 rocks!
Props go to Sjan.E in the Adobe user forums for the suggestion of using sudo in this thread.
Monday, October 01, 2007
Warning, Mac OS X 10.5 Leopard really ups the requirements
Ok both require:
* DVD drive
* Built-in FireWire
But now let's look at the differences...
10.4
* An Intel processor or a PowerPC G3 (233 MHz or faster), G4, or G5 processor
* At least 256MB of physical RAM
* At least 3.0 GB of available space on your hard drive; 4GB of disk space if you install XCode 2 developer tools
10.5
* An Intel processor or a PowerPC G4 (867 MHz or faster) or G5 processor
* At least 512MB of RAM (additional recommended)
* At least 9GB of hard disk space
That's a huge leap!
They went from a 233MHz G3 to an 867MHz G4 as a minimum. Doubled the RAM. More than doubled the hard drive.
Sunday, September 02, 2007
Roxio Creator Plus Dell Edition Cannot Make Bootable Windows Discs
Sometimes you need to burn bootable CDs for Windows. Mostly this is necessary when you want to create a Windows installer disc to reformat and install a fresh OS. While Roxio Creator Plus Dell Edition does have the option to make a CD bootable, it doesn’t appear to actually work. It requires you supply an image of the boot code (no problem, I have several such working image files, and they are easily found on the internet as well.) However, after burning the "bootable" disc it doesn’t boot the computer giving me an error code 4. Grrrr.
This is only a theory but I believe it is picking the wrong emulation type. There isn’t a dialog or setting that lets you manually control the emulation type (as there is on other versions of Creator) however, the Help File says:
- An emulation format is selected based on the size of the image
you select: - If the image is 1.44 MB or less, a bootable CD or DVD will be
created that your computer sees as a 1.44 MB floppy disk. When you
start your computer using this bootable CD or DVD, the disc will
automatically be assigned drive letter A:. - If the image is between 1.44 and 2.88 MB, a bootable CD or DVD
will be created that your computer sees as a 2.88 MB floppy disk. When
you start your computer using this bootable CD or DVD, the disc will
automatically be assigned drive letter A:. - If the image is larger than 2.88 MB, a bootable CD or DVD will
be created that your computer sees as a hard disk partition. When you
start your computer using this bootable CD or DVD, the disc will
automatically be assigned drive letter C:.
Well thanks Roxio for taking out (or breaking) a very important feature in your software. In the full Creator software, you have the ability to choose the emulation type yourself. And for the record, I have yet to see a boot image larger than 1.44MB so it appears it will always choose floppy disk emulation.
Interestingly I’ve heard from several people who have non Dell OEM versions of Easy CD/DVD Creator 7 and 8 (which as I said do give you the manual option of choosing emulation) yet still are not correctly making bootable discs. Roxio, care to comment?
So if you’re like me, at the office, all you have is this version of Roxio software that won’t make a bootable CD (even though it claims it will.) What can you do? If only Nero had a 30 day free trial download or something.
There is hope… nLite is a pretty amazing free (donations accepted) software package that not only will create a bootable Windows install image but it will burn it to a CD bypassing the need for Creator at all, AND it allows you to easily slipstream new service packs into your install.
Now I went ahead and downloaded nLite, tried it out, and it worked great! If you are creating a bootable Windows install CD whether you want to slipstream hotfixes and service packs in your installation or not, this is the app to use!
Friday, June 08, 2007
Working with WMA files on Mac OS X and iTunes
To add support in QuickTime for the format (so you can use them in most QuickTime enabled apps, or even play them in the preview view in the Finder) simply download Flip4Mac for free here (yep, that's a Microsoft site, because they want their audio and video formats to play on Mac OS X and have dropped support for the native Windows Media Player for the Mac.) Flip4Mac Download. This will let you play and use the WMA files in most Mac OS X applications, except for in iTunes which will still refuse to play WMA files.
If you want to use the files in iTunes, you will have to convert them to a different format. I recommend the $10 utility called EasyWMA which will allow you to do batch conversion on a large number of files at one time.
Oh, and iTunes for Windows will automatically convert and play your WMA files for you. It's only on Mac OS X iTunes that you need to convert the files yourself.
Friday, February 09, 2007
Canon PIXMA MP830 Hack to enable direct to CD/DVD printing on printable media.
Oddly in the US this printer does not ship with a tray to print on CD or DVD printable media, but you can purchase a tray separately and enable the feature. I haven't been able to confirm this but it appears that it was disabled in this country because someone other than Canon holds a patent on that feature (which sounds silly to me... like holding a patent on printing on paper) and they would not license it to Canon.
You'll also have to remove the plastic door that was placed over the CD/DVD tray insert slot. Just open the printer, and snap it off by pulling or prying. This was easier than I expected and took only a few seconds. I only pulled it off with my hand (and fingernails.) No tools required.
Anyway, to switch it to UK (instead of US) mode and enable printing, follow these instructions:
1. Plug the printer in, but leave it powered off. If it is already on, turn it off.
2. Press and hold the Stop/Reset button.
3. While still holding the Stop/Reset button, press and hold the Power button.
4. Hold both of them down for 5 seconds, then release the Stop/Reset button, continuing to hold down the power button.
5. Press and release the Stop/Reset button 2 times.
6. Release the power button.
At this point the printer should power on, but it will enter a special service mode.
7. Wait until the green copy light on the control panel stops flashing. This takes about 30 seconds.
8. (Optional) If you wish, you can press the Stop/Reset button 1 time, then press the Power button, and a ROM page will print. It should indicate US region at the top.
9. Press the Stop/Reset button 5 times to enter the "Set Region Mode". Then press the Power button.
10. Press the Stop/Reset button 4 times for Europe/UK (3 times for the US if you wish to change it back later). Then press the Power button.
11. (Optional) If you wish, you can press the Stop/Reset button 1 time, then press the Power button, and a ROM page will print. It should indicate Euro region at the top.
12. Press the Power button 2 times to save the changes.
I purchased my CD/DVD tray Type D from here: annocjr on eBay
Sunday, February 04, 2007
Command Paths not working, and %SystemRoot% not resolving...and a fix
Ok, so I found simple "always there" commands weren't working, such as ping or ipconfig. When trying to launch ipconfig from the command line I would get: 'ipconfig' is not recognized as an internal or external command, operable program or batch file. (You can see it in the screenshot of my Command Prompt below.)
I did an echo %PATH% and observed that %SystemRoot% was not being evaluated. You can see from the screenshot below instead of showing "C:\WINDOWS" it was showing %SystemRoot% (I've highlighted them in red.) This is the state the computer shipped from Dell with a purchased copy of XP Pro installed so this situation is going to affect a LOT of users. Of course, maybe most Dell customers don't use the command line.
Scroll down to see the screenshot... argh these blogspot templates suck at handling wide images.
Here's a screenshot of the error, and the faulty path lookup in action.
So my immediate thought was that %SystemRoot% hadn't been setup in the Windows Environment Variables. However, bringing up the dialog showed me that it was:
Anyway, the solution is just to kick Windows XP into re-evaluating the %Path% variable. The entries were all there, but somehow Windows has cached an invalid lookup for it. The easiest way I believe to do this is to go into the environment variables. Just click edit, you don't even have to change anything, and then click OK.
Now your old command prompt if it is open won't be updated, but if you open a new one, everything should work as you expected.
Saturday, February 03, 2007
New Dell laptop error: Insert the Sonic Update Manager disk and click OK and the fix.
I supposed that's ok, considering, for example, the Roxio Sonic DVD Creator software wouldn't normally ship with Windows, and it's the only way I can burn DVDs with my new internal DVD burner.
However, Dell, doesn't apparently make sure all of their software is installed correctly. When I launch Roxio Creator Plus (by Sonic Solutions...who owns who here?) I was presented with the following dialogs:
Now this one wouldn't necessarily mean it's an error, as sometimes you see this dialog the first time you launch a newly installed application. However, things went downhill quickly:
Insert the Sonic Update Manager disk and click OK.
Hmm. So now it is asking me to install a CD that I don't have and most likely is a side effect of Dell's setup/installation procedure prior to shipping out the laptop. Attempting to continue at this point finally ends in failure with this message:
An installation package for the product Sonic Update Manager cannot be found. Try the installation again using a valid copy of the installation package 'UM.MSI'.
The message indicates that UM.MSI is the name of the installation package that Dell used to setup my laptop, which of course, I don't have. Worst, while the Roxio Creator software does launch and looks like it might function, canceling out of these software dialogs just brings up new ones. As long as the Roxio Creator software is open, an infinite loop of these pop up dialogs displays, making the software completely unusable.
Luckily the problem is known. It's actually a problem with the Update Manager component in the InstallShield software that Roxio used to package their product and Dell then used to install their product. A fix for the problem can be downloaded from the makers of InstallShield here.
Friday, February 02, 2007
So you got that new printer, that does borderless printing...but you can't find out how?
In Mac OS X, possibly the most convoluted configuration issue is printers that handle different or abnormal page sizes.
I own an Epson 2200 and an R200 (actually my R200 just died, and I'll be throwing it out but that's beside the point.) Both of these printers support borderless printing (and another mode called "minimize margins") as well as roll paper printing. However, after installing the printers, and going through every option in the Page Setup and Print dialogs, it looks like those features are not available in Mac OS X 10.4.
Well those features are available, they just aren't enabled by default. Apparently Mac OS X handles printers in a way that doesn't make it easy to change things like roll paper additions or differing hardware margins in a single printer. You'd think that would be handled just fine in the paper settings from the Page Setup dialog, but it isn't. It's possible this shortcoming is actually Epson's fault for how they implemented support for these features in their drivers, but no matter who is to blame, the configuration isn't obvious. You have to basically setup a different printer on the computer for each of these features that affects the paper margins and paths. So for example, instead of just having the R200 listed as an available printer, you'll have the R200 and the R200 "borderless" and the R200 "Roll Paper" etc. Of course, they are all the same printer, but to your Mac they all look like different printers with different capabilities and will be listed as different printers in your print dialog.
To get access to all these wonderful features, just follow these easy instructions:
You need to open the Printer Browser window. There are two ways to get to the Printer Browser:
Go under the Utilities folder under Applications and launch the Printer Setup Utility. Click the Add printer icon.
Either one of those steps bring up the Printer Browser:
At this point, your current Epson printer should show up in the Printer Browser. Now click More Printers...
In the drop down dialog sheet that appears click on the pop up menu at the top and select "Epson USB" (or "Epson FireWire" if you are using a printer with a FireWire connection like the 2200.) It takes a while sometimes for these dialogs to update as they are scanning the USB busses as well as searching every known printer driver installed on your computer.
At that point your printer should appear with the different features listed in the Page Setup pop up menu. For example, if you now select your Epson 2200 printer, under the Page Setup menu, you should see an entry for your 2200 with borderless printing, another entry for roll printing, etc.
Add any of the ones you want to have available or all of them. Then when printing, you have to choose which printer to use based on what features you want (they will all appear in your printer dialog as separate printers, and you can even designate one of them to be your default printer.) Oh and make sure you select them in both your Page Setup dialogs as well as your Print dialogs if you need features (such as special paper sizes) available. The Page Setup dialog will let you choose the larger paper types supported by roll printing, etc.
So there you go, now you can take full advantage of your expanded printer capabilities.
Saturday, January 20, 2007
Excel doesn't even give me the option of running Macros
Anyway, these normally open fine, with a warning dialog about macros and their inherent security risk, giving you two buttons to let you choose to enable or disable macros for that session. No problem, since I'm familar with the documents, and know they are safe, I always choose to enable macros.
Oddly about once every other month it shows a different dialog saying macros need to be enabled to use this feature, and it doesn't even give me the option of enabling them.
Here's the solution if you wish to open an Excel spreadsheet with macros enabled, and you aren't being allowed to:
To solve this delima, you can go into Excel under Tools -> Macro -> Security and set the setting to Low.
What I couldn't understand was why this setting kept changing. It apearred to me that everytime I install a Microsoft Office update, it seems to change that setting to a higher level. So don't be surprised if you have to change that again after installing an update from Microsoft.
Wednesday, January 10, 2007
Debugging my latest Blue Screen of Death (BSOD)
My laptop started randomly blue screening. Nothing too unusual for a Windows machine, but as I try to keep my XP laptop for development very clean, it was actually the first BSOD I had seen on this machine that I've been using for over a year now.
Ok, so I knew something in my config. had changed. So I had to think of what I installed recently. I was trying to work with a large source code dump I had gotten as a 3gig tarball. The first thing I needed to do was make some space on my horribly inadequate 40GB hard drive. For some reason Windows Explorer doesn't have the simple ability to list or sort by folder sizes in the Detail View mode. In order to see which folders were taking up a lot of space to know which ones to delete I installed an application called ViewFolderSize Pro. Now I did a search for utilities that would calculate the folder sizes and display them in the File Explorer. I found about three, and ViewFolderSize Pro appeared to be pretty polished and got some good recommendations, so I downloaded it and installed it. It had a timed trial period (30 days I think) after which they wanted you to purchase the software. Apparently they used crypserv.exe as a way of enforcing their licensing.
No blue screens yet and the product basically worked as advertised. It was very slow, apparently made a cache file that it didn't tell me where it stored it, and sorting seemed a bit random. After using the product to find a couple large directories I decided to uninstall it mostly due to concerns about it slowing down my machine, and an uneasiness in how stable the software was based on some of its shortcomings. Apparently the uninstaller didn't remove the crypserv.exe service.
Once I rebooted after the uninstall, the laptop could not function for 10 minutes without BSODing if simply left alone. Oddly I noticed that if I kept the laptop active, it would take much longer to BSOD. I also noticed the CPU fan came on about 2 seconds before BSODing meaning of course, some process was pegging the CPU at 100% just before the BSOD. Ok, so my theory was that some process was running away with the CPU and causing a memory exception. So after rebooting another time, I launched the Task manager, told it to sort by CPU, then I sat there staring at it. After a few minutes a process jumped up to using 99% of the CPU. It was crypserv.exe. In less than two seconds, the laptop BSODed.
Ok, great, I found my culprit. I rebooted, disabled the service in the services control panel, and then removed the crypserv.exe file from my hard drive. Rebooted once more to make sure the crypserv.exe didn't reappear, which it did not, and I've been blue screen free ever since.
Sunday, October 15, 2006
New Version (1.2.7) of Fetch Art Released
- This version fixes a Perl error on systems that did not have the Apple development tools installed. (The message looked like, "Can't locate LWP/Simple.PM...")
- Select All under the Edit menu now works. Also remember there is a Copy All Art to iTunes command under the Fetch Art menu.
- The problem with the installer not placing Fetch Art in the Applications directory, or creating a script menu in iTunes for some users has been corrected.
This version is still NOT compatible with Intel Macs. To donate and help the development of an Intel Mac version, please visit my donations page www.aric.org/fetchart/donation.html
To download the latest installer: www.aric.org/fetchart/
There's actually been renewed interest in Fetch Art since the release of iTunes 7. I figured that with iTunes including an album artwork download, I would no longer be contacted by people interested in Fetch Art. However, I've been told that the iTunes art download doesn't work as well as Fetch Art for several reasons:
- It requires an iTunes account, which not everyone has or wants.
- According to what I've been told it only works for U.S. customers.
- It actually isn't that great at finding artwork, leaving many popular albums without art.
Friday, October 06, 2006
Found a bug in the built in Mac OS X FTP server
Now, as a 5GB FTP download will likely get interrupted a few times before completion, you use the REST (restart or resume if you like) command to resume the download from where it last stopped. That will work fine if your download is less than 2GB. It appears for anything over 2GB it won't work, as the FTP server reports: "Restarting at 2147483647" no matter what. Apparently it can't go higher than 2147483647 bytes for the start of a resume download. I've done some searching and Mac OS X isn't the only FTP server to have this problem, however, many do work fine over 2GB.
If anyone is aware of a fix for this, let me know. Until then, I'll be submitting this as a bug to Apple in the next few days.
Saturday, September 30, 2006
Running shell commands with Automator or AppleScript and executing with sudo privileges
do shell script "mkdir /Library/StartupItems"
What this example shows you:
- How to show a dialog with AppleScript where you can ask for a hidden password that is not visible (not shown) as typed.
- How to run commands in a bash shell with sudo access in Automator.
- How to run bash shell commands in AppleScript with sudo access.
Ok, so now if you are like me, you know the power of Unix shell scripting, you also know it won't be long before you'll need sudo to run one or more commands in your script. Now I did a quick search on the internet to just find some sample code, and in all my searching I found most people have not posted a good solution. Most people in their sample scripts or Automator workflows resorted to storing the password in clear text within the script. Not only is that a security risk, your script is no longer portable and has to be edited for every user. I found responses like this basically saying it couldn't be done.
Ok, so here's what you do. I created an Automator script, that first runs the following AppleScript (this would also work, just in plain AppleScript without Automator):
on run {input, parameters}
tell application "System Events"
set the_username to do shell script "whoami"
set the_password to "password"
display dialog "You now need to enter the password for the currently logged in account: " & the_username & "
This account must have Administrator access to this computer." default answer "password" buttons {"OK", "Cancel"} default button "OK" with icon 2 with title "Password" with hidden answer
set the_password to text returned of the result
end tell
return {the_password}
end run Ok in the Automator script, then my next step in Run Shell Script (in bash of course). That script looks like:
exec echo $1 | sudo -v -S;
if [ $? -eq 1 ] then
echo "you are not a sudoer"; else
echo "you are a sudoer"; # replace this with your entire script.
exec echo $1 | sudo -S ls /private/var/root/;
fi
Now all you have to do is put your sudo needing commands inside the else fi block and you're set. If you want to download an Automator script with this code as an example, click here.
BTW if you are running within an AppleScript app you can call sudo like this:
do shell script "sudo ls /private/var/root/" password the_password with administrator privileges
Monday, September 25, 2006
Fetch Art Beta Testers Needed
If you've read some of the comments, many people are getting this error:
Can't locate LWP/Simple.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6...
I haven't been able to reproduce this error on my system. In fact Fetch Art is working great on all the systems I've tested.
I need some beta testers that meet the following criteria:
1) You get the error shown above when you run Fetch Art
2) You are running a PowerPC based Mac (sorry no Intels at the moment)
3) You are running the latest Mac OS X (10.4.7) and iTunes 7
4) You are willing to have me send you via email a .zip beta version and install it.
5) You'll report back the results to me.
If you meet the above criteria and would like to help, please send email to me at here. (Privacy promise: I will not give your email out to anyone else or post it here.)