Disable all software installation Is there a way to block (by a password/PIN code or what else) all kinds of software installation on an Android tablet/smart phone?

I understand it is possible to block by a PIN code Market app instalation, but that only works for paid apps, and there are other ways to install applications other than the Market.

Rooting is not a problem.

Thank you!
Unfortunately Android doesn't offer this functionality out of the box.  There are several 3rd-party apps on the Market that can help though.

I personally use App Protector Pro on my son's tablet.  This app allows you to set a PIN and then set up a "block list" of any installed apps, including system ones.  Among other apps, I added Settings and Package Installer to this list.  This presents the "password" prompt upon installation (or un-installation) of any apps, including from alternative markets (Amazon Appstore, GetJar, etc.) and even side-loading APKs.  App Protector Pro itself is also by default set to be on the "protected" list.

Of course if your device is in the hands of a person that is somewhat knowledgeable of Android OS, they can do a bunch of things to circumvent this sort of protection, such as a factory reset from Recovery console, for example.

[5-year Edit]:
Android 5.0 introduced restricted profiles feature. This allows you to block new installs from Play Store, and disable already installed apps for restricted users.  Unfortunately this feature is only enabled for tablets.  Phones still have to rely on 3rd-party "lock" apps, with varying degrees of success.