Well… I almost don’t work with web apps written in ASP.
However, every now and then a client asks for a site in this language.
And every single time, i have to look at my “cheat sheet” to remember some simple stuff.
So… as sometimes my files get messy, and hard to find, i’ll be posting some of those “cheats” here.
(This, was practically copied from here : http://sestud.uv.es/manual.esp/asp/asp16.htm )
Using this object, we will have a way to look (and change) to the structure of files/folders on a given system. First, you need to create a FileSystem object, and then, the File or Folder object (i think you can guess which one is for files , or folders)
<% Set FS = Server.CreateObject("Scripting.FileSystemObject") Set File = FS.GetFile("C:\ASP\text.txt") Set Folder = FS.GetFolder("C:\ASP") %>
* FS is a FileSystem object, which will allow us to access the file system on the server.
* File is a File object, which will allow us to access the properties of a text fiel, called text.txt (under c:\ASP\)
* Folder is a Folder object (duh), and will allow us to access properties of the c:\ASP folder.
Now… lets take a look at the properties, that can be “read only” (R) or “read/write” (RW). I’ll use Object as a wildcard for both, File and Folder.
And now, the methods:
In every case, every object must be closed in the reverse order they were created.
<% File.Close Set File = Nothing Folder.Close Set Folder = Nothing FS.Close Set FS = Nothing %>
To finish, a full example of a directory listing :
<% set fs = CreateObject("Scripting.FileSystemObject") path = Server.MapPath("/") set folder = fs.GetFolder(path) For each file in folder.Files Response.write "Filename : " & File.Name & " <br>" Next %>
|* pictures taken from notebookreview forums. this post|
It is known, that when using laptops, updating the BIOS has to be one of the most careful things to do.
When you say careful, you mainly mean : DONT DO IT UNDER WINDOWS.
Most of these warning are from old days. I figured… lot of time has passed, and they wont apply. (I use linux 64bit all the time… but that day, i was running windows (playing Red Alert 3), and just saw the right moment to try Asus WinFlash)
Flashed correctly… Verified Ok, then said just reboot. Rebooted, and black screen. No signs of life other than the fan running steadly.
Damn, i said.
|* This was my rescue kit setup|
I figured, as my laptop is an Asus G1 with Ami Bios, i could try and access the bootblock to restore the bios image.
Wrong. Tried USB Floppy drive, cdrom containing only the file (amiboot.rom), turned on the laptop pressing esc, alt f2, control esc, control pgup, etc, etc.
It looked like something was interfering the bootblock code. (Im not certain on this, but it seems the media playback feature of the laptop, avoided the bootblock code from ever executing).
So… Go to the Asus website (and forums) to ask for some pointers.
Tech support didn’t have a clue. They said i’ll have to take my laptop to service. (good one). or try different combo keys (all of them tried before).
Service said (without even looking at it) bad mainboard, replace and give us lots of money. (yeah, right).
I tried again support, and ask them to pointers on how to open the system to access the bios chipset. They said “we can’t give you that info, because is private”.
Turns out the laptop is pretty easy to crack open.
|* A little overview in the process. Unfortunately, i forgot to take pictures of the non-socketed chip|
I did it. Cracked it open, found the flash chip (SST 49LF004B rev CA), desoldered using a hot air station, soldered a nice PLCC32 socket, reprogrammed the flash chip with latest bios (yes, bin file provided by asus is a straight image of the chip), put it all together. IT’S ALIVE!!!
|* Thats how the socketed bios looks now. And, the process of programming.|
So.. now that i have a pretty socket and the ability to get the flash chip when i want, i’ll be trying some bios mods. (i.e. I want to be able to access more than the 3GBs the bios recognize. This is because the memory chipset only beign able to address 4GB, and bios not providing some remap functions.. but that’s another story).
Sounds easy right ? Well… it isn’t so difficult. Just be patient and careful. I already broke a pin in the LCD connector… I’m lucky it isn’t used.