Home : Shared Hosting : Sitemap

WHATS INCLUDED:

VB Script & ASP Applications
27th March 2008

Explaining some of the uses for VB script and ASP in the modern development environment. This also explains some uses on server side manipulation and systems maintenance.

The articles index can be located here

(Fri, 05 Sep 2008 09:23:44 GMT)
One Laptop signs up with Amazon
Online retailer Amazon will help the One Laptop Per Child organisation with its plans to sell its XO laptop in the US.

(Fri, 05 Sep 2008 12:17:46 GMT)
Chaos at £20,000 petrol giveaway
There are reports of chaos at a petrol station which gave away £20,000 of petrol to promote a video game.

(Thu, 04 Sep 2008 10:51:02 GMT)
Zombie plague sweeps the internet
The number of home computers hijacked by hi-tech criminals leaps during the summer, says a security monitoring firm.

(Thu, 04 Sep 2008 15:09:44 GMT)
Sony recalls 440,000 Vaio laptops
Electronics firm Sony recalls 440,000 Vaio laptops because of wiring faults that may cause overheating.

(Thu, 04 Sep 2008 10:42:10 GMT)
Google tweaks Chrome licence text
Google changes its licence agreement for its new browser after initially claiming rights to anything its users posted or sent.

(Thu, 04 Sep 2008 12:32:48 GMT)
Microsoft slashes US Xbox prices
Microsoft is to cut the US price of the Xbox Arcade to $199 - cheaper than the Nintendo Wii.

(Wed, 03 Sep 2008 23:02:46 GMT)
Test predicts vessel op response
Technology to reveal dangerous changes in blood pressure during delicate brain surgery is under development.

(Wed, 03 Sep 2008 12:23:38 GMT)
Broadband to 'skip a generation'
Those bypassed by first generation broadband should go directly to super-fast services, says an Ofcom panel.

(Tue, 02 Sep 2008 01:18:58 GMT)
Google launches internet browser
Search engine Google is launching an open source web browser, Chrome, to compete with Internet Explorer and Firefox.

(Wed, 21 May 2008 11:53:11 GMT)
Get your up-to-date fix of blog posts about all things digital


(Fri, 05 Sep 2008 12:31:06 GMT)
Spore start
Will the new game from Will Wright be a hit or a miss?

(Fri, 05 Sep 2008 12:11:11 GMT)
Now we are 10
As Google turns ten it looks to its next decade

(Fri, 05 Sep 2008 11:47:45 GMT)
Chairborne
Reinventing the wheel to help disabled people

(Wed, 03 Sep 2008 09:48:21 GMT)
Life with Linux
The ups and downs of converting to open source

(Tue, 02 Sep 2008 08:13:18 GMT)
Play the net game
The web becomes a gaming surface in its own right

(Mon, 01 Sep 2008 10:53:41 GMT)
Sound as a pound
Safety is hard work, says columnist Bill Thompson

(Wed, 03 Sep 2008 10:15:38 GMT)
Nokia launches music phone in UK
Handset manufacturer Nokia steps up music strategy with 'Comes with Music' handset.

(Mon, 01 Sep 2008 20:15:40 GMT)
Hacker appeals to home secretary
Lawyers for a Briton accused of hacking into military computers ask for government help to ensure he is not jailed in the US.

(Fri, 29 Aug 2008 15:02:34 GMT)
Ofcom seeks help on mobile rules
Mobile owners with views on the state of the telephony market are being sought by regulator Ofcom.

(Thu, 28 Aug 2008 14:06:37 GMT)
Cyber thieves to hit supermarkets
Cyber thieves are hatching a plan to steal US funds through British supermarkets, the BBC learns.

(Mon, 01 Sep 2008 09:40:37 GMT)
Letter lottery defines spam load
The amount of spam in your e-mail inbox may depend on the first letter in your address, reveals a study.

(Fri, 29 Aug 2008 12:28:11 GMT)
Chemical coat to mean drier socks
Technology developed to protect soldiers from chemical weapons may help to make almost any surface or fabric waterproof.

(Tue, 02 Sep 2008 11:15:51 GMT)
Ultrasound to give feel to games
Virtual objects can be felt in mid-air thanks to a pioneering approach using ultrasound.

(Fri, 29 Aug 2008 02:41:34 GMT)
Simulator to train soldiers
The simulator that trains soldiers to deal with danger

(Thu, 21 Aug 2008 09:08:55 GMT)
Intel unites the internet with TV
Chip giant Intel signs a deal with Yahoo to make the TV set much more web aware.

(Fri, 22 Aug 2008 01:36:01 GMT)
Poor earning virtual gaming gold
Nearly half a million people in developing countries earn virtual goods in online games to sell to players, a study shows.

(Thu, 14 Aug 2008 22:45:31 GMT)
Legal milestone for open source
Supporters of open source software are claiming victory after a US court ruled copyright protection applies to their work.

(Wed, 06 Aug 2008 11:00:53 GMT)
Life as a top UK pro-gamer
How UK team won the Championship Gaming Series.

(Tue, 05 Aug 2008 09:09:40 GMT)
Speeding up the modern age
The technology that keeps the net running turns 40

(Thu, 17 Jul 2008 07:51:31 GMT)
Computer mouse faces extinction
Gestural interfaces could spell the end for the humble computer mouse says analyst company Gartner.

(Wed, 13 Aug 2008 10:23:12 GMT)
How not to monitor mobiles
Bill Thompson is worried that the methods we are using to keep kids safe on mobiles have stopped being useful.

(Tue, 29 Jul 2008 09:12:28 GMT)
Going for online gold
Bill Thompson is keeping an eye on the Olympics but isn't interested in medal winners

(Tue, 15 Jul 2008 13:42:10 GMT)
The importance of being there
Regular columnist Bill Thompson says the virtual world still needs a lot of work if it is to replace the real world.

(Mon, 07 Jul 2008 12:59:55 GMT)
Making punishment fit the crime
Regular columnist Bill Thompson wonders about the punishment that should be meted out to copyright infringers.

(Mon, 30 Jun 2008 10:02:03 GMT)
Closing the Gates after Bill
Bill Thompson on the end of the Bill Gates era

(Tue, 17 Jun 2008 13:16:50 GMT)
Changing the way we think
Bill Thompson asks if the web changes how we think

(Mon, 18 Feb 2008 11:21:40 GMT)
Why the future is in your hands
The humble mobile phone looks set to become a multimedia, multi-function monster as more features are crammed inside it.

(Sat, 26 Apr 2008 06:00:36 GMT)
The mobile future is calling
Developers are being urged to unleash their creativity and make the mobile future a reality and bring the world to everyone's phone.

(Thu, 28 Feb 2008 08:56:15 GMT)
Google on Android's future
Google's director of mobile platforms explains his vision for Android, a new operating system for mobiles.

(Thu, 13 Mar 2008 10:29:19 GMT)
Pupils reveal mobile snapshot
Students at a school in Tynemouth carry out a survey of mobile phone use as apart of the BBC's School Report project.

(Wed, 27 Feb 2008 10:16:41 GMT)
Nokia morphs itself from within


(Wed, 14 Nov 2007 14:10:26 GMT)
Future directions in computing
A look at the future computing technologies which will go beyond Moore's Law.

(Tue, 13 Nov 2007 09:02:16 GMT)
Getting more from Moore's Law
A look at some of the technologies that could allow the silicon industry to deliver faster, cheaper chips.

(Thu, 15 Nov 2007 08:07:52 GMT)
Cleaning up in 'fab world'
A look inside the surreal and ultra-clean world of the silicon manufacturing plant.

(Mon, 12 Nov 2007 07:50:04 GMT)
The man behind Moore's Law
BBC News interviews Gordon Moore, the man whose "law" has driven the computer revolution.

Feed BBC News | Technology | UK Edition

Valid XHTML 1.0 Transitional

Blinklist delicious Digg Facebook furl Google Reddit Stumble Upon Technorati

ASP Tutorials - VB script and ASP Applications

Although many of us are now looking towards .NET technologies there is still worth in Classic ASP and Classic based VB applications. Moving forward in the industry using .NET technologies makes sense but unfortunately it hasn't been around forever and there is still allot of CLassic ASP applications out there and Classic VB applications. The worth of VB script for simple server side manipulation of file structures and Application manipulation are still apparent and in use today.

Over the years in Senior developer positions and Network Operations often working within architecture planning and implementations i have often hit walls that i have managed to overcome using VB script and good old Command line hooks. Working for companies that were modeled around SAAS (Software as a service) the need for hardware and cluster management was apparent. Using VB script to manipulate permissions to lock down possible exploits came in very handy, also using VB script for provisioning of services and automated tasks simplified allot of the hard manual labor, even virus scanning and network packet monitoring using VB had its uses.

Still it all sounds good but it sounds old hat and why would you want to do that?
Well..... still some of the largest suppliers within the UK of e-commerce use the legacy VB script automation written by our systems staff and its proven as easy to maintain and easy to upgrade. Server provisioning is done completely within scheduled VB hooks using CLI shells to automate tasks. Of course we cant mention names but its safe to say that one example is the largest UK based hosted e-commerce provider and before you think it its not Actinic its bigger! Another being logistics management systems and payment gateways.

So give me some examples if its so good i hear you cry....
Ok... lets take a hypothetical situation. Lets say i have 2 servers, i want to mirror the entire file structure by mapping a drive copying the entire contents, oh and lets not forget i don't want to set the permissions manually as its used for a web service, But to be more secure i want to map the drive, copy, then drop the connection. Lets look at an example and then i will explain.

-------------------------------------------------------------------------------------------------------------------------------------------
' Section A
strDriveLetter = "Z:"
strRemotePath = "\\SLAVESERVER\d$"
strUser = "atempadmin"
strPassword = "password"
strProfile = "false"

' Section B
set objShell = wscript.createObject("wscript.shell")
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, _
strProfile, strUser, strPassword
path1 = "D:\"
path2 = "Z:\"

' Section C
set fso = CreateObject("Scripting.FileSystemObject")
set tfile = fso.CreateTextFile(path1 & "\lastdone.txt")
tfile.WriteLine(now())

' Section D
iReturn = objShell.Run("cmd.exe /C xcopy " & path1 & " " & path2 & " /e /Y /F /O /EXCLUDE:D:\web\server side\MyExcludes.txt", 1, TRUE)
iReturn = objShell.Run("cmd.exe /C xcopy " & path2 & " " & path1 & " /e /Y /F /O /EXCLUDE:D:\web\server side\MyExcludes.txt", 1, FALSE)
-------------------------------------------------------------------------------------------------------------------------------------------

Okay so what does it do?
The above script would be run on the server to be mirrored. I have split the script into sections A through D and i will explain each section and what is does. IN this eaxmple xcopy was used as its a stock tools supplied by any version of DOS, its a powerful tool and has the ability to copy ACL information saving the use of other CMD tools such as CACLS. So section A this holds the authentication information required to open a mapped drive using the WScript.Network method.

Section B, well this actually maps the drive using the details in section A. Also it sets up the shell object to run the CLI for the xcopy coming later in the script. When the script executes it will execute using a user that is the member of the system group, this will allow pretty much any CLI command to execute without permission issues. Also i have used this section to define the two paths, in this case the two drive letters.

Section C, I wanted to be able to create a simple 1 line log saying when the last sync occurred so this section basically creates a filesystem object and writes a line with a date/time. I can then recall this later if i wanted with an ASP file etc to pull back the value contained.

Finally Section D, this copies everything, however you will see 2 xcopy commands, this copies everything from the master to the slave, then it copies back incase there's anything new on the slave so that it is held on the master. As the initial copy goes master to slave then anything that has been updated on the slave that should not have been will simply be overwritten. Xcopy is a great command and well worth looking up. There's also an excludes files that tells xcopy to ignore certain files.

So there's one example, when we develop an application its not just about writing a system that does a job. We write systems that you can move from one system to another but also systems that get the most out of the environment. that they are hosted or managed on. Why have a system and a systems administrator. It makes more sense to have a system that manages itself as much as possible. Information on systems development can be found at www.angel-media.net

Username :
Password :