October 16, 2009

Sudo for Windows 7/Vista

Posted in For Developers, Intermediate at 6:20 pm by gloriouscomputing

It’s no secret that I like using my keyboard to get things done. It’s also no secret that Windows 7/Vista’s UAC comes up when a program asks for Admin rights. But what about if you want to run a program as Admin that doesn’t always need to be run as Admin? By default it’s just run as user, and you won’t be able to do what you need to.

For example, if I just run Notepad, I can’t save files in C:\

So what you have to do is Right-Click Notepad, and click “Run as Admin”… but what if I don’t want to? What if I want to script the same action? No luck. Windows 7 has a tool called “RunAs.exe”, but it only lets you switch to users with their Username+Password. I just want to run as myself with admin rights!

Linux people have sudo, so I just coded up a sudo.exe (in NSIS). It works just like you’d hope: “sudo.exe Notepad.exe”… or “sudo Notepad”. Of course, you’ll have to set it up so you can use it from anywhere yourself. The code for this tool is super-easy:

Name “sudo”
OutFile “sudo.exe”
SilentInstall silent
RequestExecutionLevel admin

Section
Call GetParameters
pop $0
exec $0
SectionEnd

My only problem with it is that my sudo.exe is 33kb. That’s huge for such a simple tool. If someone could code the same functionality into a smaller exe (C++ maybe?), I’d appreciate it. (I’ve tried writing it in AutoHotKey/AutoIt too, but both were even bigger!) Please let me know if you can help in the comments. Thanks!

Download Sudo

Update: Thanks everyone for the provided solutions below in the comments! Smallest solution thus far is Elevate.exe by Christof Germishuizen.

Advertisements

October 8, 2009

Install Software by doing a Start Menu Search – GetIt

Posted in Application Launchers, Beginner at 5:20 pm by gloriouscomputing

So you have the shiny new Windows 7 (Vista works too) installed, and you want to run your favorite once-a-week software. You hit the Windows key, type in “fire” only to find that you have not yet installed Frets On Fire! If only there was a way to instantly remedy this situation without any extra effort. Well, there is:

With the open-source GetIt, you can now install software with no more effort than is required to run it. Just type whatever you want to run/install into your Windows 7/Vista Start Menu Search, and shortcuts to silently install any of over 400 programs will be included in the results.

Download GetIt

Full Disclosure: I’m the lead developer of GetIt.

October 3, 2009

Quicktime? Hahaha…no

Posted in Commentary at 5:00 am by gloriouscomputing

Unfortunately, I still have to install one out-of-browser add-on to watch video online: Adobe Flash. It’s everywhere, except for those few awesome sites that are already using HTML5 Theodora… and those sites who somehow didn’t get the memo that nobody watches videos using additional out-of-browser add-ons anymore.

I believe VLC comes with a plug-in to play these without the need for QuickTime…but why even install that? It’s just another security flaw waiting to happen. I can understand that we aren’t all HTML5 Video happy just yet, but I have no sympathy for people still using QuickTime to play videos in my browser. I just won’t watch your video. It’s that simple.

And if you are considering the upgrade, save yourself a step by skipping over Flash. Go straight to HTML5 Theodora Video!

October 1, 2009

23% of iPhone users still vulnerable to losing complete control of phone via SMS exploit

Posted in Smartphone at 7:46 am by gloriouscomputing

If you believe this graph by Pinch Media, around 23% of iPhone users are still using 3.0.0. You may remember that firmware version as being the one that can be remotely exploited into doing just about anything by receiving a special SMS. This bug is fixed in 3.0.1, which is the version I’m using. Upgrading to 3.1.0 is not yet possible for anyone who does not use an official iPhone carrier.

Here’s to hoping that at least ATT filters out the special SMS messages so that these users don’t find themselves having to explain a 30 hour call to some 900 number.