Friday, August 29, 2008

RIS services fails to start with Error 127: the specified procedure could not be found error

This occurs after installing Windows 2003 SP2. The reason for this is that the new Windows Deployment Services (to allow Vista images to be made) is installed, and then is put in charge of the RIS deployment, rendering the Remote Installation service obsolete. To fix this, run services.msc and make your RIS service startup type to be manual or disabled, and select Windows Deployment Services to be automatic. You can then boot into the pre execution environment as normal and your old images will be there. See HERE for more information.

Wednesday, August 20, 2008

How to get the full path of a file from a HTML File Input

This could also be modified for use in an ASP.Net FileUpload. I was making an internal intranet site where I wanted a user to choose a file, and then my ASP.Net application would use the path to generate categories etc (ie if its in the Columns folder, the file is a Column). Unfortunately ASP.Net does not allow you to retrieve the whole path (ie C:\Columns\Test.rfa) from a file upload control, it only will show you the actual file name (Test.rfa). To get around this, I made use of Javascripts OnChange event. First, on the <input type="file"> I added "onchange="CapturePath(this.value);" Then, at the top of my page I added a javascript function which does the following: function CapturePath(value) { document.getElementById("<%Response.Write(filePathHidden.UniqueID);%>").value = value; } As I was using ASP.net, I wanted to store the path for postback to the server, so I added an control, called 'filePathHidden', and then when the user changes the value of the File Input, it sends the path to this hidden. You could modify the code to use a normal HTML Hidden as well. Then, on post back, I get the value of the hidden and use it as I please.

Monday, August 18, 2008

How to detect Windows Vista in batch file or logon script

Previously, in our logon scripts, we'd used the 'ver' command to get the windows version, and selected the third word (XP or 2000 etc) but now that no longer works properly, so a better way of doing it is this:

VER | findstr /i "5.0." > nul IF %ERRORLEVEL% EQU 0 set version=2000

VER | findstr /i "5.1." > nul IF %ERRORLEVEL% EQU 0 set version=XP

VER | findstr /i "5.2." > nul IF %ERRORLEVEL% EQU 0 set version=2003

VER | findstr /i "6.0." > nul IF %ERRORLEVEL% EQU 0 set version=Vista

This searches for the build number in the ver string.

Increase vista performance

A tweak I am doing on all Vista machines in the office here, is this: Go into control panel, choose classic mode - > Performance Information and Tools -> Adjust Visual Effects -> 'Choose for Best Performance' (this turns off everything) and then in the list check: - show thumbnails instead of icons - Smooth edges of screen fonts - Use visual styles on windows and buttons (to turn these 3 back on) These 3 are personal preference, but the last one especially makes a big difference in looks when it is turned on, without this your theme stays on the 'windows classic' mode, looking like windows 98 did. So if you don't like that theme, leave that one checked. This will get rid of someof the Vista looks, though it doesn't look all that different, and will make it feel alot 'snappier', especially due to the lack of fading in and out which makes your system appear slower.

Friday, August 15, 2008

the temp folder is on a drive that is full or is inaccessible. free up space on the drive or verify that you have write permission on the temp folder.

This error message occurs when you are running Windows Vista (possibly 64bit), and have User Account Control turned off (first thing I did) and are trying to install Adobe Reader 8. To fix the error, put UAC on, or right click on the setup and go to properties -> Compatibility - Run in compatibility mode for XP SP2. It should work fine.