"Access is denied" when Installing Windows Service Packs

Computing, Windows No Comments »

When installing a Windows Service Pack, you may get an “Access is denied” message and the installation rolls back. The issue is most likely due to incorrect registry permissions. You should first try Microsoft’s advice.

However, if all this fails for you, you can try the following, as found here (kudos to MVP Jim Byrd):

  1. Download and install SubInACL:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en
    *Even if you have the Windows Resource Kit Tools installed, you should download and install the latest version at the link above. Some earlier versions of SubInACL, especially those for Windows Server 2003, don’t work.*
  2. Navigate to the C:\Program Files\Windows Resource Kits\Tools folder and create a new text file. Rename it to SubInACLReset.cmd or anything you like.
  3. Edit the file and paste the following:
    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f
    subinacl /subdirectories %SystemDrive% /grant=administrators=f
    subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
    subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
    subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
    subinacl /subdirectories %SystemDrive% /grant=system=f
  4. Double click the file OR go to Start>Run and enter C:\Program Files\Windows Resource Kits\Tools\SubInCALReset.cmd
  5. The procedure will take a while, depending on the size of your registry.
  6. Try installing the Service Pack again and it should work.
  7. Hope it saves you an hour or so.
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Erratic Screen Brightness with Ubuntu/Linux Mint

Ubuntu/Linux No Comments »

If your screen brightness erratically resets itself every few minutes, try the following (found here):

1. Press ALT + F2 to open the run dialog.

2. Type gconf-editor and press ENTER, to open the gnome “registry”.

3. Navigate to APPS -> GNOME-POWER-MANAGER -> BACKLIGHT

4. Uncheck the item named enable

5. Close the window.

 
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Installing PostgreSQL 8.3 on Linux Mint/Ubuntu, Some Tips

PostgreSQL, Ubuntu/Linux 7 Comments »
del.icio.us Tags: , ,

Update: The below instructions are outdated as it’s now much easier and safer to install a now stable backport package for PostgreSQL-8.3. To learn more about backports, visit this page and enable the backport repository for your Linux distribution. You can then install via the package manager or apt-get. Or just try

sudo apt-get -t sarge-backports install postgresql-8.3

The latest version of PostgreSQL can’t yet be installed on Ubuntu (Linux Mint) via apt-get install of a mature Debian package, so the process is a little more involved and somewhat challenging for a Linux newbie such as I. Here are some hints:
The article 10 Steps to Installing PostgreSQL is very helpful and mandatory if you’re not that familiar with installing packages manually on Linux. Then this forum post has some additional hints and is geared towards 8.3.
So here are my ten steps:

  1. Do a
    sudo apt-get install build-essential

    which really is essential for installing source packages.
  2. Download libxml sources which you have to install as the installation on Gutsy Gibbon is faulty (see the “forum post” quoted above for details), so from your download dir
    sudo mv libxml2-sources-2.6.31.tar.gz /usr/local/src
    cd /usr/local/src
    sudo tar -xzvf libxml2-sources-2.6.31.tar.gz
    cd libxml2-2.6.31
    ./configure
    make
    sudo make install
  3. Download a postgresql-8.3.0.tar.gz from a mirror listed here.
  4. Then from your download directory
    sudo mv postgresql-8.3.0.tar.gz /usr/local/src
    cd /usr/local/src
    sudo tar -xzvf postgresql-8.3.0.tar.gz
    For an explanation see the “10 Steps” article.
  5. Configure and install PostgreSQL:
    cd /usr/local/src/postgres-8.3.0
    ./configure –with-libxml –without-readline –without-zlib –with-libraries=/usr/local/lib
    make
    sudo make install
    Hopefully you’ll get a “PostgreSQL installation complete.”
  6. Do user related stuff:
    #create the postgres user
    sudo adduser postgres
    sudo mkdir /usr/local/pgsql/data
    sudo chown postgres /usr/local/pgsql/data
  7. Change to the postgres user and continue
    #change to the postgres user
    sudo su - postgres
  8. The rest is verbatim from the forum post:
    #initialize the data directory
    /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    cd /usr/local/pgsql/data#create the log dir
    mkdir log

    #sample to start the server
    /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >/usr/local/pgsql/data/log/logfile 2>&1 &

    #create a sample database
    /usr/local/pgsql/bin/createdb mysampledb

    #now test it
    /usr/local/pgsql/bin/psql mysampledb


    You’re all set and the database server should be running.

  9. You might wanna create a new password for the postgres user:
    sudo passwd postgres
  10. Then you can connect with pgAdmin III
    File > Add Server
    address: localhost
    Description: my beautiful server or whatever
    Password: do you remember?
    Click OK
  11. OK, these go to 11:To start the server automatically at every boot, simply add:
    su -c ‘/usr/local/pgsql/bin/pg_ctl start -l /usr/local/pgsql/data/log/logfile -D /usr/local/pgsql/data’ postgres
    to your /etc/rc.local file. More info is here.

    Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

C compiler cannot create executables

Blogging Software, Linux, PostgreSQL No Comments »

I ran ./configure to install Postgresql-8.3.0 on Linux Mint 4.0 (Daryna)/Ubuntu Gutsy Gibbon and got the error
checking for C compiler default output file name… configure: error: C compiler cannot create executables
To fix it simply do an
apt-get install build-essential
as recommended here or, as minimal fix:
apt-get install libc6-dev
as recommended here (in the comments).
Btw., this is my first post using flock as a blog editor on Linux. It’s not Windows Live Writer but it works fine.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Generating CHM Documentation for RSpec on Rails

Programming, Ruby on Rails No Comments »

RSpec is the king of the BDD hill when it comes to Rails, and the learning curve is quite steep. For Windows developers hooked on CHM documentation, it’s very easy to generate RSpec CHM files by running the command

rdoc -f chm -o chm_folder rspec*

in the

/vendor/plugins

directory of your RoR project where you have installed the RSpec and RSpec on Rails plugins using

ruby script/plugin install http://rspec.rubyforge.org/svn/tags/CURRENT/rspec
ruby script/plugin install http://rspec.rubyforge.org/svn/tags/CURRENT/rspec_on_rails

as described on the RSpec home page.

The resulting CHM is not the prettiest but it’s fully searchable and easier to use than sifting through the online rdocs in your browser.

Update December 5, 2008: RSpec is under heavy development, and installation instructions change frequently, so you should always refer to the rspec home page for details.

RSpec and RSpec for Rails are now gems only so to generate the chm file cd to your gems directory (usually C:\ruby\lib\ruby\gems\1.8\gems), which you can determine by running

gem env

at the command prompt, and then run

rdoc -f chm -o chm_folder rspec* -x helper_spec.rb

helper_rspec.rb has to be excluded as it causes the rdoc generation to hang. Here’s the updated resulting chm file for rspec, raw and unedited.

P.S.: This only works on Windows as it depends on HTML Help Workshop but the chm file can be viewed with other chm viewers. I recommend xCHM for Linux.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in