Jump to content
Sign in to follow this  

A script able to grab from the net the setup installers by reading inside a list of applications.

Recommended Posts

Hello to everyone,

sometimes can happens that Windows is really damaged,or better,that the registry is very corrupted that the best thing to do is to make a fresh installation,right ? Since there are a *free* tools to backup/export and reimport the user profiles (USMT 4 from ms) and the drivers (taking the updated drivers from a database and reimport them with dpinst) from the old windows installation to the new one,there is no safe way AFAIK to use the previous applications because the Program Files folder could be infected by virus. The best way could be to delete it and install them again from the beninning. So,is for this reason that I would like to start this project,because I could have found a good starting point to do it without to be a skilled coder,like I'm not. The first thing to do is to have a list of the applications installed in Windows while it is offline,because we should think that is unabled to boot again. I've googled for a while and I found this script (credit goes to Torgeir Bakken). Before to use it we have to :

Step 1: Copy the system’s registry hive to our analysis system

Step 2: Mount the registry hive in regedit.exe,calling it old_applications

Step 3: Navigate to the OS version in regedit.exe

Step 4: Unmount the registry hive.

Step 5: Open a command prompt and then do : CSCRIPT installed.vbs .

This is the code :

' [installed.vbs]

' Run this script with the command:

' CSCRIPT installed.vbs <name_or_ ip-address>

' use "." for local computer

' Script author: Torgeir Bakken

sComputer = WScript.Arguments.Item(0)

wscript.echo InstalledApplications(sComputer)

Function InstalledApplications(node)

Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE\old_applications

Set oRegistry = _

GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _

& node & "/root/default:StdRegProv")

sBaseKey = _


iRC = oRegistry.EnumKey(HKLM, sBaseKey, arSubKeys)

For Each sKey In arSubKeys

iRC = oRegistry.GetStringValue( _

HKLM, sBaseKey & sKey, "DisplayName", sValue)

If iRC <> 0 Then

oRegistry.GetStringValue _

HKLM, sBaseKey & sKey, "QuietDisplayName", sValue

End If

If sValue <> "" Then

InstalledApplications = _

InstalledApplications & sValue & vbCrLf

End If


End Function

' From: Torgeir Bakken

' http://www.mvps.org/scripting/people/bakkenalia.htm

Now that we have a good list of software to reinstall,we should know where to grab it,maybe from Internet,if the installed applications on the old Windows system was a few,or from a DVD or a remote location. Anyway,we need to write a script that,starting from the names of the applications,it is able to build an XML file (later reading you will understand) containing all the locations of the setup installers. SO the question is : Can an autoIT script does that work ? If yes,it's hard to do it ?

The third step could be to use a free for personal use only tool named :


It is nice because (from the webpage) it takes a list of your favorite programs and will download and install the ones you pick. It doesn't need to ask any questions, so you can go do more important things. InstallPad can resume downloads you've cancelled, and can even try and find the latest version of your program online.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...