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, 30 Jul 2010 08:31:48 +0000)
Call to check on mobile security
Owners of mobile phones are being asked to test the security of their network to see if enough is being done to stop eavesdropping.

(Fri, 30 Jul 2010 06:37:19 +0000)
UK troops use iPad app for fire mission training
Newsbeat's had an exclusive look at new training being given to UK soldiers at the Royal School of Artillery in Wiltshire.

(Thu, 29 Jul 2010 11:40:36 +0000)
Facebook data hoarder speaks out
Security researcher Ron Bowes tells BBC News why he collected and published the personal details of 100m Facebook users.

(Fri, 30 Jul 2010 06:25:52 +0000)
Chip sales boost Samsung profits
Samsung Electronics reports record quarterly profits thanks to higher sales of smartphones and components such as memory chips.

(Thu, 29 Jul 2010 12:48:34 +0000)
Google cleared of wi-fi snooping
No "significant" personal data was grabbed by Google when it snooped on wi-fi networks, says the UK data protection office.

(Thu, 29 Jul 2010 04:00:33 +0000)
Amazon offers new look UK Kindle
Online retailer Amazon launches its popular Kindle e-reader into the UK market for the first time, with a new look and more books.

(Wed, 28 Jul 2010 14:10:50 +0000)
Nintendo game copiers 'illegal'
A High Court has ruled that devices that allow gamers to play pirated video games on the Nintendo DS console are illegal in the UK.

(Thu, 29 Jul 2010 14:29:17 +0000)
Government's £6m web search bill
Four government departments spent almost £6m ensuring their websites appeared on search engine results pages, new figures show.

(Wed, 28 Jul 2010 18:39:54 +0000)
Legal action on 'zombie cookies'
Lawsuit filed in San Francisco district court after firms resurrected deleted browser cookies.

(Wed, 28 Jul 2010 11:27:03 +0000)
State of global internet revealed
Asian countries top the charts when it comes to internet speeds, according to a global survey by network giant Akamai.

(Thu, 29 Jul 2010 10:42:56 +0000)
Facebook makes move into search
Facebook has made its first steps into the search market with the launch a servcie that allows users to quiz the site's 500m members.

(Fri, 30 Jul 2010 06:07:54 +0000)
Hybrid supercar to go on sale
Porsche has confirmed it'll make a limited number of a new hybrid supercar it's been developing.

(Fri, 23 Jul 2010 16:30:11 +0000)
Online etiquette
Nothing said online is really private, says Bill Thompson

(Fri, 16 Jul 2010 13:18:10 +0000)
Step away from the iPod
Banning technology from classrooms is unlikely to solve any problems, thinks Bill Thompson.

(Fri, 4 Jun 2010 16:08:34 +0000)
Building the Networked World
Open software, fast broadband and a narrower digital divide. Europe lays out its digital agenda.

(Fri, 23 Jul 2010 13:06:43 +0000)
Facebook battles privacy and profit
Is the social network's pursuit of short-term profits risking its long-term survival?

(Fri, 16 Jul 2010 14:40:54 +0000)
Websites take on bogus reviewers
Search engines and websites are seeking ways to beat spammers who post fake reviews

(Fri, 25 Jun 2010 16:55:12 +0000)
Gadgets embraced by Wimbledon
How the oldest tennis tournament and its fans are embracing modern technology.

(Fri, 16 Jul 2010 11:10:45 +0000)
Hi-tech help for disaster zones
How technology has ushered in a new era for aid work in disaster zones

(Mon, 31 May 2010 08:30:28 +0000)
New era for African independence
Programmers, developers and software makers herald a new era of African independence.

(Fri, 25 Jun 2010 13:13:23 +0000)
Can someone download a doctor?
Afridoctor offers personal medical advice and emergency distress service via mobile phone.

(Thu, 15 Jul 2010 12:15:50 +0000)
View from the end of the world
Photographers and film-makers capture their 3-D views of the corners of virtual worlds

(Fri, 7 May 2010 08:31:14 +0000)
Girl Geeks: Women in tech on top
Are women happy being known as geeks?

(Thu, 29 Apr 2010 17:52:06 +0000)
Ash cloud passengers publish zine
The volcanic ash cloud that shut down British airspace, leaving thousands of travellers stranded also brought many strangers together digitally to create a silver lining.

(Wed, 14 Jul 2010 07:04:30 +0000)
On a mission with the rocket men
In our series about makers and hackers, we look at the world of amateur rocket-makers.

(Thu, 27 May 2010 10:14:43 +0000)
Resurrecting Victorian technology
The release of an album on wax cylinder inspired us to try to make a phonograph to play it.

(Tue, 27 Apr 2010 08:00:37 +0000)
Robots and gaming at hi-tech school
Robot and video game design classes are par for the course at San Diego's High Tech High.

(Fri, 30 Jul 2010 14:55:38 +0000)
Accessing content under the radar
Click looks at how people are using proxy servers and VPNs to access restricted content on the internet, and bypass geographical borders.

(Thu, 29 Jul 2010 08:35:59 +0000)
Who will win the 3D TV war?
Some of the biggest names in Japan's technology industry report earnings later today and the likes of Panasonic and Sony are betting on 3D to drive sales of new TVs, DVD players and camcorders.

(Tue, 27 Jul 2010 17:11:29 +0000)
The man with the keys to the web
A British computer expert has been entrusted with part of a digital key, to help restart the internet in the event of a major catastrophe. Paul Kane talked to Eddie Mair on Radio 4's PM programme about what he might be called upon to do in an international online emergency.

(Wed, 28 Jul 2010 12:06:13 +0000)
Gamers try out Nintendo 3DS
Two Newsbeat listeners, Neil and Melanie, have been given a sneak preview of Nintendo's new hand-held console the 3DS.

(Tue, 27 Jul 2010 14:06:20 +0000)
HTC makes first foray into China
One of the world's top designers of smartphones, Taiwan's HTC, has announced it is moving into the Chinese market for the first time.

(Mon, 26 Jul 2010 06:45:52 +0000)
Can you crack the cyber-crime code?
A Britain's Got Talent style competition is being held to find UK's finest IT workers.

(Mon, 26 Jul 2010 11:22:47 +0000)
Space age sub explores slick
David Shukman takes a dive in a research sub as it investigates the effects of the oil spill on the Gulf of Mexico's coral reefs.

(Sat, 24 Jul 2010 08:19:59 +0000)
Why women gamers are big business
Almost half the people who play computers games in Britain are women, but they often prefer a different type of game to men.

(Fri, 30 Jul 2010 08:50:31 +0000)
Life among the cyber-elite
Web entrepreneur Joi Ito speaks about his life and career.

(Wed, 28 Jul 2010 09:15:16 +0000)
Speed limit
What makes your broadband connection slow?

(Wed, 28 Jul 2010 08:50:04 +0000)
Sneak preview
The world's first 3D handheld console on test

(Sun, 25 Jul 2010 23:21:14 +0000)
What is Wikileaks?
A look at the secretive whistle-blowing website

Feed BBC News - Technology

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 :