Archive for the ‘Other’ Category

Remove UAC from a specific application.

Thursday, May 22nd, 2014

This will remove the UAC prompt from a specific application executable.

It assumes that “Run this program as an administrator” is already unchecked on the compatibility tab and the executable still requests elevated privileges.

This should only be done if you either know that the executable doesn’t need elevated access but has been incorrectly set to UAC prompt every time, only needs elevated access for a feature that you do not use or if you don’t trust the executable with elevated access. Some features of the application may not work without elevated access.

1) Make a back up copy of your executable.

2) Create a manifest file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>

3) Embed the manifest file into the executable (requires Windows SDK):

mt.exe -manifest "App.exe.manifest" -outputresource:"App.exe";#1

Thanks to Karan.

Compile ffmpeg 64 bit on Windows with MSYS/MinGW-w64

Wednesday, January 8th, 2014

Set up the MSYS environment

Download MSYS from MinGW-builds. Extract it to a path with no spaces, to which you have write permissions. For example, D:\msys. This already includes useful features like pkg-config, Autotools and Git.

Download a pre-built MinGW-w64 from drangon.org and extract it inside the MSYS directory. This already includes useful features like Yasm.

Start MSYS with msys.bat

In MSYS, run:

echo 'export PATH=.:/local/bin:/bin:/mingw64/bin' > .profile
source .profile

Check that it has worked with gcc -v

Compile ffmpeg and libraries

These steps are similar to the Linux/BSD version of this guide.

git config --global core.autocrlf false
 
git clone git://git.videolan.org/x264.git x264
cd x264
./configure --host=x86_64-w64-mingw32 --enable-static --enable-shared && make && make install
cd ..
 
git clone git://github.com/mstorsjo/fdk-aac.git fdk-aac
cd fdk-aac
./autogen.sh
./configure --host=x86_64-w64-mingw32 --enable-static --enable-shared && make && make install
cd ..
 
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-libx264 --enable-libfdk_aac --enable-static --disable-shared --extra-cflags=-I/local/include --extra-ldflags='-L/local/lib -static' && make && make install

NOTE: configure on ffmpeg in mingw is slow. Be patient. You should also check for success after each library has compiled.

This should build ffmpeg.exe as a 64 bit static executable that can be run directly in Windows x64, with H.264 and AAC support. It does not need to be run from MSYS. In my testing, the 64 bit version is approx. 10% faster than the 32 bit version.

If you want it to use DLLs instead of creating a static executable, change --disable-shared to --enable-shared and remove the -static from the ldflags in the ffmpeg configure.

You may also want to use --enable-avisynth (64 bit port). SDL is required for ffplay.

YouTube My Subscriptions grid view

Friday, August 16th, 2013

YouTube has finally removed the old grid view my_subscriptions page. If you don’t like the frankly broken and unusable /feed/subscriptions page, there is a Chrome extension that will fix it for you.

Better Youtube Subscriptions Page
“Transforms Youtube’s broken feed subscription page and restore it to it’s former grid glory.”

In fact, I actually prefer it over the old grid page because it fills the grid to the width of the page, showing more on wider resolutions. It doesn’t seem to hide watched videos, but I didn’t like the grid page doing that anyway because it also hid partially watched videos (anything viewed for more than a couple of seconds).

This app does not require strange permissions that it shouldn’t need or an OAuth login (as YouTube Video Deck does) or anything like that, it just alters your subscription feed to appear as a grid.

As a side note, the YouTube API actually doesn’t need authentication to get channel or video information. You should only need to give login auth if it tracks what you have watched, automatically gets your subscriptions from your YouTube account or anything else that involves your account directly. Although it’s better than a 3rd party website saving your password, you should still be very careful who you give your OAuth authentication to, as it essentially logs them into your Google account for you.

It’s also compatible with the YouTube Ratings Preview extension, which shows the green/red rating bar on the thumbnail before you view the video, although this seems to only show ratings previews on the first 30 or so videos on each page.

The solution to most of the US’ political problems

Friday, February 1st, 2013

In a US election, most states are pretty much guaranteed to vote a certain way. Amazingly, these political parties are actually distinguishable from one another (this is not the case in my country, in which all politicians are equally corrupt, greedy liars that may as well be in a single political party). These parties have been arguing over the same points for decades.

The solution is obvious. Split the republican states and the democrat states into two separate countries. Swing states can either pick and choose, redefine their borders or emigrate. A couple of suggestions for the name of the resulting republican country are Acirema and ‘merica.

This way, the democratic country can have free healthcare, while the republican country can have all the guns they want and so on.

P.S. This post is tongue in cheek. Don’t take it too seriously (unless you’re a US president and think it’s a good idea!)

YouTube

Monday, February 20th, 2012

Suggestion for YouTube:

Put the green and red like/dislike bar on the thumbnail of the video so you can see if a video is going to be any good before you visit it and to reduce mindless spam from misleading video names and thumbnails.

Possibly the best improvement to YouTube usability since the advent of the play button.

Update: This exists as a Google Chrome extension.

Faster than light neutrinos

Sunday, December 4th, 2011

OK so this is probably going to demonstrate how bad I am at physics, and I will probably be flamed for being an idiot, but here are some of my thoughts on the faster than light neutrinos.

  1. Time slows down as you approach the speed of light. Velocity is a derivation of time (speed = distance / time). This can make it difficult to measure, and the time dilation needs to be accounted for.
  2. When measuring things close to the speed of light, the equipment itself has the same limitations. It takes time for a signal to get from one part of the equipment to another.
  3. The Earth itself is moving in the solar system, the solar system is moving in the galaxy, and the galaxy is moving in the universe. The speed of light is an absolute limit, but the measurement of something moving between two points on Earth is a relative measurement. If something was fixed in an absolute position, it would be moving very quickly relative to the Earth.
  4. The speed of light limitation applies to objects with mass. The mass of neutrinos is believed to be non-zero, but is not yet completely known, and objects with energy essentially have more mass, so the mass of it changes as it accelerates. It’s hard to do maths when you don’t have all of the starting variables.

Windows 8 is the next Vista fail.

Thursday, September 22nd, 2011

I’m calling it now. First Windows ME, then Vista, next 8. All failures, or soon to be.

There’s nothing new in Windows 8 that warrants replacing Windows 7 so soon but there’s enough changed on the surface to piss people off. People don’t like having changes forced upon them (see also: Facebook). The only people that will be getting Windows 8 will be people who got it pre-installed and had no choice, and I don’t see any businesses upgrading to Windows 8 whatsoever.

Concise glossary of reverse engineering

Tuesday, September 13th, 2011

Debugger
Executes a program, displaying the memory as it runs.

Decompiler
Converts object code to a higher level language, such as C.

Disassembler
Converts object code to assembly.

Stupid
Charging thousands of dollars for software whose target audience primarily use it to crack software rather than paying for it.

Stop saying SEQUEL

Saturday, July 2nd, 2011

SQL is not the same thing as SEQUEL. If you’re a grumpy old DBA, stuck in your ways, who actually used SEQUEL back in the 1970s, that’s fine. For all the new kids just getting into SQL, it’s pronounced es-que-el, not sequel. When you call it sequel, you sound like just as much of an idiot as someone who says lynuks. It’s annoying.

The “SQL” pronunciation is actually defined in the original 1986 specification for SQL and confirmed by common DBMS such as MySQL.

Visual Studio “There was a problem sending the command to the program”

Friday, March 25th, 2011

Since moving to Visual Studio 2010 on Windows 7 x64, I’ve been getting this error a lot. Every time I open Visual Studio by opening a file rather than running its executable directly, in fact.

Most of the answers seem to revolve around running Visual Studio as a normal user rather than an administrator, but I was already doing that.

Eventually, a reply to this bug provided an answer.

When I checked the key, I saw

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\DDECache\VisualStudio.10.0\system]
"ProcessName"="devenv.exe"
"WindowName"="Visual Studio Application Management Window"
"WindowClassName"="VisualStudioAppManagement"

Deleting the “system” key then opening a file again worked and replaced the key with working values

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\DDECache\VisualStudio.10.0\system]
"ProcessName"="devenv.exe"
"WindowName"="DDEHandler"
"WindowClassName"="DDEHandler"

When it has the correct values (refresh to make sure that it does) remove “set” permissions from your own user so that it can’t replace them with the bad values, to make the change permanent.