Admin Tools archives - If it has a plug, it's IT stuff

If it has a plug, it's IT stuff:

Admin tools

Oct 16 2008   8:11AM GMT

[TLBAT] Intranet: ADMIN section and the final conclusions.



Posted by: Alessandro Panzetta
Database, IT support, Intranet, Admin tools, Intranet portal

So in the previous post I’ve suggested you to use the Persist ASP Upload components (not free), some of you may wonder why…well it’s easy: this component not only allows you to upload your files via ASP but also gives you the opportunity to set the ACLs (Access Control List) on the files so in the end if we’re uploading a file that will be restricted to a given group the component will also set the corresponding ACL to the file!

This post is the only one for the Download Center and I will finally provide you with all files needed for the thing to have a working Download Center! At any time feel free to ask me your questions or any doubts on this tool….now let’s rock and download the files!

Sep 10 2008   3:21PM GMT

[TLBAT] Intranet : The home page



Posted by: Alessandro Panzetta
Database, Bandwidth, Active Server Pages, IT support, Intranet, Admin tools, Intranet portal

In this post I’ll present the home page and will explain how this works….so let’s play J

First in order to have this working we need a file called adovbs.inc that can be downloaded here, this file contains all instructions for connecting to the database via ADO.The we need to download some images that will be used in the pages, the images are available here. So now go to the directorywhere your site will be hosted (E.g. c:\inetpub\wwwroot) and unzip images in a directory called images. Also create a folder named dbwhere you will save the downloads.mdb file that you created as in my previous post so in the end you will have a folder structure as follows:

c:\inetpub\wwwroot\Download_Center

c:\inetpub\wwwroot\Download_Center\images

c:\inetpub\wwwroot\Download_Center\db

Now we need to create our default.asp page, the code is at the bottom of this post. let’s discuss on this code.

It consists of some basic HTML that uses some internal subroutines to build 4 tables (see screen shot) that contain: the software available to everyone, the software for users in given groups, the patches and the goodies.

In order to dynamically build these tables a subroutine called  DoTD is called, this subroutine accepts an option that specifies whic table must be built; possible values are  STANDARD, SPECIAL,PATCH, GOODIE.

In addition to this procedure there’s also a Counter subroutine that is called by the DoTD and that shows how many times the given package has been downloaded. In order fr this to work you need a hits.mdb file (available here) where the hits will be recorded; remember to save this file in the db directory.

Once you have finished downloading the files described above, create a new default.asp page  with the following code andsave it in the root folder of your website.

For now this is enough, in the next post I’ll describe the download_special.asp file  that is the one that checks if the user visiting the page is allowed to download a certain file or not….stay tuned!!!

‘======================

 <%
Session.Timeout=10
USERID = split(Request.ServerVariables(”LOGON_USER”),”\”)
%>
<title>..:: Download Center ::..</title>
<body bgcolor=”#B1C9E9″>

<div align=”center”>
<center>

<table border=”0″ cellpadding=”0″ cellspacing=”0″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”90%”>
<tr>
<td width=”100%” background=”images/tile_sub.gif”>
<p align=”center”><b><font face=”Tahoma” color=”#006699″ size=”5″>..:: Download Center ::..</font></b></p>
</td>
</tr>
</table>

<center><font color=”#006699″ size=”2″ face=”Tahoma”> <img border=”0″ src=”images/dot.gif”> </font><font size=”2″ face=”Tahoma”>
<a style=”text-decoration: none” title=”Click to see all the packages you have downloaded from this site” href=”MY_downloads.asp”><font color=”#006699″>
Click here to view your Download History</font></a><font color=”#006699″>
<img border=”0″ src=”images/dot.gif”></font></font></center><br>

<table border=”0″ cellspacing=”1″ style=”border-collapse: collapse” bordercolor=”#111111″ width=”90%” id=”AutoNumber2″>
<tr>
<td width=”100%”><font face=”Tahoma” color=”#006699″ size=”2″>By clicking the <b>DOWNLOAD</b> button you are automatically
rerouted to the closest software distribution server. <br>
Please try to avoid
software downloads through RAS.</font></td>
</tr>
</table>
</center>
</div> <table border=0 align=center cellspacing=10>
<tr><td valign=top>
<table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center>
<tr><td bgcolor=#006699 align=center background=”images/tile_sub.gif”>
<font color=”#006699″ size=”2″ face=”Tahoma”><b><img border=”0″ src=”images/dot.gif”>
No License Required <img border=”0″ src=”images/dot.gif”></b></font></td>
<td bgcolor=#006699 align=center background=”images/tile_sub.gif”><b>
<font size=”2″ color=”#006699″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”>
</font></b><font size=”2″><b>
<font face=Tahoma color=#006699>Download</font></b></font><b><font size=”2″ color=”#006699″ face=”Tahoma”> <img border=”0″ src=”images/dot.gif”></font></b></td>
<td bgcolor=#006699 align=center background=”images/tile_sub.gif”><b>
<font size=”2″ color=”#006699″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”>
</font></b><font size=”2″><b>
<font face=Tahoma color=#006699>Hits</font></b></font><b><font size=”2″ color=”#006699″ face=”Tahoma”> <img border=”0″ src=”images/dot.gif”></font></b></td></tr>
<%
Which = “Standard”
DoTD
%>
</table>
</td>
<td valign=top>
<table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center>
<tr><td bgcolor=#006699 align=center background=”images/tile_sub.gif”>
<font color=”#006699″ size=”2″ face=”Tahoma”><b><img border=”0″ src=”images/dot.gif”>
License Required <img border=”0″ src=”images/dot.gif”></b></font></td>
<td bgcolor=#006699 align=center background=”images/tile_sub.gif”><b><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”> Download <img border=”0″ src=”images/dot.gif”></font></b></td><td bgcolor=#006699 align=center background=”images/tile_sub.gif”><b><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”> Hits <img border=”0″ src=”images/dot.gif”></font></b></td></tr>
<%
Which = “Special”
DoTD
%>
</table>
</td></tr>
<tr><td valign=top>
<table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center>
<tr><td bgcolor=#006699 align=center background=”images/tile_sub.gif”>
<font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”> <b>Patches
</b><img border=”0″ src=”images/dot.gif”></font></td>
<td bgcolor=#006699 align=center background=”images/tile_sub.gif”><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”> </font><b>
<font face=Tahoma color=#006699 size=2>Download </font></b><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”></font></td>
<td bgcolor=#006699 align=center background=”images/tile_sub.gif”><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”> </font><b>
<font face=Tahoma color=#006699 size=2>Hits </font></b><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”></font></td></tr>
<%
Which = “Patch”
DoTD
%>
</table>
</td>
<td valign=top>
<table border=2 bordercolor=#006699 cellspacing=3 cellpadding=3 align=center>
<tr><td bgcolor=#006699 align=center background=”images/tile_sub.gif”>
<font color=”#006699″ size=”2″ face=”Tahoma”><b><img border=”0″ src=”images/dot.gif”> Goodies <img border=”0″ src=”images/dot.gif”></b></font></td>
<td bgcolor=#006699 align=center background=”images/tile_sub.gif”><b><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”> Download <img border=”0″ src=”images/dot.gif”></font></b></td>
<td bgcolor=#006699 align=center background=”images/tile_sub.gif”><b><font color=”#006699″ size=”2″ face=”Tahoma”><img border=”0″ src=”images/dot.gif”>
Hits <img border=”0″ src=”images/dot.gif”></font></b></td></tr>
<%
Which = “Goodie”
DoTD
%>
</table>
</td></tr>
</table>

<%
Sub DoTD()
Dim cnnSearch
Dim rstSearch
Dim strDBPath
Dim strSQL
Dim strSearch
Set cnnSearch = Server.CreateObject(”ADODB.Connection”)
cnnSearch.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & Server.Mappath(”db/downloads.mdb”) & “;”
strSQL = “SELECT * FROM Packages WHERE (((Packages.PackageType)=’” & WHICH & “‘)) ORDER BY Packages.PackageName;”

Set rstSearch = cnnSearch.Execute(strSQL)
Do While Not rstSearch.EOF
Package = rstSearch.Fields(”PackageDesc”).Value
File =  rstSearch.Fields(”PackageName”).Value

If WHICH = “Special” then
response.write “<tr><td><font face=tahoma color=#006699 size=1><b>” & Package  & “</td><td><a href=download_special.asp?File=” & File & “&UserName=” & USERID(1) & “><img border=0 src=images/downloadnow.gif alt=’This page may take some time to load due to the license checking procedures, please be patient.’></a></td>”
response.write Counter(File) & “</tr>”
rstSearch.MoveNext

ElseIf WHICH = “Patch” then
response.write “<tr><td><font face=tahoma color=#006699 size=1><img src=images/alert.gif> <b>” & Package  & “</td><td><a href=download.asp?File=” & File & “><img  border=0 src=images/downloadnow.gif alt=Please download/apply this Patch asap!></a></td>”
response.write Counter(File) & “</tr>”
rstSearch.MoveNext
Else
response.write “<tr><td><font face=tahoma color=#006699 size=1><b>” & Package  & “</td><td align=center><a href=download.asp?File=” & File & “><img  border=0 src=images/downloadnow.gif alt=’This software is approved by EIT.’></a></td>”
response.write Counter(File) & “</tr>”
rstSearch.MoveNext
End if
Loop

Set rstSearch = Nothing
cnnSearch.Close
Set cnnSearch = Nothing
End Sub

Function Counter(FILENAME)
Dim cnnSearch
Dim rstSearch
Dim strDBPath
Dim strSQL
Dim strSearch
Set cnnSearch = Server.CreateObject(”ADODB.Connection”)
cnnSearch.Open “Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” & Server.Mappath(”db/hits.mdb”) & “;”
strSQL = “SELECT Count(downloads.Package) AS HITS FROM downloads WHERE (((downloads.Package)=’” & FILENAME & “‘));”
Set rstSearch = cnnSearch.Execute(strSQL)

Do While Not rstSearch.EOF
response.write “<td align=center><b><font face=tahoma size=1 color=006699>” & rstSearch.Fields(”HITS”).Value & “</font></td>”
rstSearch.MoveNext
Loop

Set rstSearch = Nothing
cnnSearch.Close
Set cnnSearch = Nothing
End Function

%>

‘======================


Aug 28 2008   7:01AM GMT

[TLBAT] Intranet: The concept behind it



Posted by: Alessandro Panzetta
Database, Active Server Pages, IT support, Intranet, Admin tools

In this post I’ll explain how our Download Center will be constructed, how it works and what’s the idea behind it.

The Download Center is a project I developed in the past for a company where I worked for; this project was a part of another part of the project that had two main goals: first I was trying to reduce the overall cost of the IT department in Europe, the second was to improve the relationship the IT Department and the rest of the world, that’s to say The Users!

At that period the IT Dept. wasn’t seen very good because we were spending a lot of money for upgrades, technology changes and so on, this was resulting in a bad consideration of our department versus the users because they just thought “They are spending a lot of money with no real advantage and, above all, I have no visibility on how this budget is spent.”

By creating this project and others I was able to A) reduce IT costs by 20% (reduced telecommunication costs with another project) and B) Give the Users more control on their IT assets, expenses and have them do many things “self-service” resulting for us in a significant decrease of the customer calls and consequentially reducing the workload on the IT staff.

Ok, go ahead now and see why I created this project! The company had a lot or “road-runners” that means that many users were travelling a lot in Europe, Asia, US and most of them had no Administrative privileges at all so we had the need of providing them a tool that allowed to obtain the Company licensed software in the easiest, fastest way possible.

The Download Center is a set of ASP pages that relies on 2 Microsoft Access databases and the Domain users/groups membership to work.

The two databases were called downloads.mdb and hits.mdb (we’ll discuss later their table structure), while the Domain users/groups part was used to check whether the user visiting the page was entitled to download/install the given software. Let’s say: you need Microsoft Frontpage? You must be a member of the “MSFrontPage” security group.

In addition to this feature the Download Center is also capable of redirecting the users to the closes server possible so this also reduce the download times and costs because the road-runners where mainly connected in RAS and VPN from Hotels.

In the next post I’ll discuss more about the databases and the start page…keep on reading!


Jul 14 2008   7:18AM GMT

[TLBAT] System Information for Windows a.k.a. SIW



Posted by: Alessandro Panzetta
IT support, Admin tools, SIW, System Information

Whenever I need a great tool that can display tons of useful information on a Windows based computer this is the tool I use: System Information for Windows!

A lot of information well organized in folders by pertinence and exportable in HTML, CSV, XML, TXT formats…this is what you need!

Thank you Gabriel Topala for providing this great tool!


Jun 26 2008   4:43PM GMT

[TLBAT] Control and see your band….width!



Posted by: Alessandro Panzetta
Bandwidth, IT support, Admin tools, TLBAT

You just subscribed a new contract with your ISP and they promised a given download/upload rate but you don’t know how to monitor this.

What would you do? Buy famous branded software and reduce your low budget or save bucks and use a free one (so you have more money left that you can send to me?? )…I’d say that you’ll go for the second choice…obviously.

The tool I talk about is the great Paessler’s Router Grapher that can provide you nice graphs that show how your bandwidth is used.

Graph example


May 28 2008   7:51AM GMT

[TLBAT] The IT swiss-knife



Posted by: Alessandro Panzetta
WireShark, IT support, Admin tools, TLBAT, PortableApps

In my previous article I wrote about removable media used to access dead/dying computers and I mentioned a bootable USB drive that you can always have with you. Personally I have the USB pendrive always with me because it is tied to my car keyholder.
Let’s describe my USB swiss-knife: it has a bootable WindowsXP that has been built as described here and also features the PortableApps suite loaded with the WireShark utility, the InfraRecorder and all the standard applications that may save you some time on almost every x386 computer.

In addition I added a Tools folder filled with:

BGinfo: This tool adds some useful information on the desktop background and is highly configurable.

Double Driver: Useful for saving all installed drivers that can be used for driver reinstallation after a format.

KeyFinder: It finds the Microsoft Windows XP /Office product key.

Microsoft Key Update Tool: It can change the WIndows XP product key.

HijackThis: Really helpful tool that helps discovering BHO, Hijacks and spywares.

AntiVir : Free antivirus software.

So adding these tools to the PortableApps Suite made my swiss-knife for easy problem solving on most computers.


May 16 2008   4:12PM GMT

[TLBAT] The low budget Admin’s tools!



Posted by: Alessandro Panzetta
IT support, Admin tools, TLBAT

You are used to work in good IT departments where all tools, programs and servers are exactly as you would them. You have CD/DVDs licenses, gold support for almost everything but it comes the day when you are in a low budget IT department or simply a poor project and cannot afford spending too much bucks for satisfying your needs.

This series of articles that will be identified with [TLBAT] aim at providing tools, suggestions and ideas on how to solve your admin issues with low money or simply for free.