Jump to content

Some vbs scripts to install...


Westi

Recommended Posts

Hi @all !

Here are some simple scripts to install some difficult apps.

All tested on a german installation.

Be careful With SendKeys "w"

In german this means "weiter"

I think the english shortcut is "n" (Next)

WScript.Sleep 2000 means wait 2000 milliseconds

Copy the code and save it as .vbs file.

AD-aware Pro

'Automatic, but not silent install of Ad-aware Pro

Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
WshShell.Popup "Do NOT MOVE the mouse an do NOT PRESS any button!",5," - Warning - ",48

'Run setup from location on hdd'
'you have to check the path !
WshShell.Run ("%systemdrive%\Apps\Adaware.exe")

'if your hdd is very slow, increase the next value
WScript.Sleep 5000

'don't use "{n 5}" instead of five times "n" !
WshShell.SendKeys "n"
WScript.Sleep 2000
WshShell.SendKeys "n"
WScript.Sleep 2000
WshShell.SendKeys "n"
WScript.Sleep 2000
WshShell.SendKeys "n"
WScript.Sleep 2000
WshShell.SendKeys "n"
WScript.Sleep 2000

'Insert your code
WshShell.SendKeys "123456"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 5000
WshShell.SendKeys "f"

'Copy the newest reflist.ref to the ad-aware folder overwrite the old one
'you have to check the path !
Set refl = fso.GetFile("%systemdrive%\Apps\reflist.ref")
refl.Copy ("%programfiles%\Lavasoft\Ad-aware 6\reflist.ref")
Wscript.Quit

Irfan View

'Automatic, but not silent install of Irfan View
'view only all images with Irfan view

Set WshShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
WshShell.Popup "Do NOT MOVE the mouse an do NOT PRESS any button!",5," - Warning - ",48

'Run setup from location on hdd'
'you have to check the path !
WshShell.Run ("%systemdrive%\Apps\iview385.exe")

'if your hdd is slow, increase the next value
WScript.Sleep 7000

WshShell.SendKeys "{TAB}"
WScript.Sleep 2000

'Check the value!
'Change ALL shortcuts to your language !
'For german = w means "weiter"
'For english = n means "next"

WshShell.SendKeys "w"
WScript.Sleep 2000
WshShell.SendKeys "w"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "w"
WScript.Sleep 2000
WshShell.SendKeys "w"
WScript.Sleep 2000

'I think you have to change the next line to "y"
WshShell.SendKeys "j"

WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000

'If you don't need the plug-ins, activate the next line and clear the following code
'Wscript.Quit

'install the plug-ins
'you have to check the path !
WshShell.Run ("%systemdrive%\Apps\all_plugins.exe")
WScript.Sleep 2000
WshShell.SendKeys "w"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 1000
Wscript.Quit

MediaPlayer classic formats

'Use all video formats with MediaPlayer classic

Set WshShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
WshShell.Popup "Do NOT MOVE the mouse an do NOT PRESS any button!",5," - Warning - ",48

WshShell.Run ("%programfiles%\MediaP~1\mplayerc.exe")

WScript.Sleep 2000
WshShell.SendKeys "%v"
WScript.Sleep 2000
WshShell.SendKeys "o"
WScript.Sleep 2000
WshShell.SendKeys "{DOWN}"
WScript.Sleep 2000
WshShell.SendKeys "%v"
WScript.Sleep 2000
WshShell.SendKeys "%b"
WScript.Sleep 1000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "%{F4}"
WScript.Sleep 2000
Wscript.Quit

PowerDVD5

'Automatic, but not silent install of PowerDVD5 and newest patch
'Usefull AFTER the mplayerc-script

Set WshShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
WshShell.Popup "Do NOT MOVE the mouse an do NOT PRESS any button!",5," - Warning - ",48

'Run setup from location on hdd'
'you have to check the path !
WshShell.Run ("%systemdrive%\Apps\PowerDVD\setup.exe")

'if your hdd is slow, increase the next value
WScript.Sleep 7000

WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "{TAB}"
WScript.Sleep 2000
WshShell.SendKeys "{TAB}"
WScript.Sleep 2000

'Insert your code
WshShell.SendKeys "12345678"

WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "~"

'if your hdd is slow, increase the next value
WScript.Sleep 10000

WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys " "
WScript.Sleep 2000
WshShell.SendKeys "{PGDN}"
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000

'If you don't need the patch, activate the next line and clear the following code
'Wscript.Quit

'you have to check the path !
WshShell.Run ("%systemdrive%\Apps\Powerdvd\PDVD5_patch\setup.exe")

'if your hdd is slow, increase the next value
WScript.Sleep 5000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "~"

'if your hdd is slow, increase the next value
WScript.Sleep 10000

WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys " "
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
Wscript.Quit

Edited by Westi
Link to comment
Share on other sites


This is only for FullVersion 2.95 and without sending statistics:

I don't recommend/like Version 3...

TESTED

Winamp Full 2.95

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Popup "Do NOT MOVE the mouse an do NOT PRESS any button!",5," - Warning - ",48
WshShell.Run ("%systemdrive%\Applications\winamp295_full.exe")
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "n"
WScript.Sleep 2000
WshShell.SendKeys "i"

'Increase next value on slow systems
WScript.Sleep 5000

WshShell.SendKeys "~"
WScript.Sleep 2000
WshShell.SendKeys "{TAB 6}"
WScript.Sleep 1000
WshShell.SendKeys " "
WScript.Sleep 1000
WshShell.SendKeys "{TAB}"
WScript.Sleep 1000
WshShell.SendKeys " "
WScript.Sleep 1000
WshShell.SendKeys "~"
WScript.Sleep 10000
WshShell.SendKeys "%{F4}"
WScript.Quit

Link to comment
Share on other sites

You can use this script to automatic uninstall Java Web Start (only Version 1.4.1)

JAVA WEB START

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Popup "Do NOT MOVE the mouse an do NOT PRESS any button!",5," - Warning - ",48
WshShell.Run ("%programfiles%\JavaWe~1\uninst-javaws.exe")
WScript.Sleep 2000
WshShell.SendKeys "~"
WScript.Sleep 5000
WshShell.SendKeys "~"
WScript.Quit

Link to comment
Share on other sites

Clear useless restore points to spare a lot of space after a common- or batch- install of servicepacks or the apps.

This cleans all restore points, only the LAST one IS SAVE.

Should work on all language versions, 'cause no shortcuts used. TESTED on german version .

YOU CAN USE THIS SCRIPT SOMETIMES, 'CAUSE YOUR "SYSTEM VOLUME INFORMATION" - FOLDER GROWS UP.

Normally you spare 0.5-1 Gigabyte, check it out !

Delete restore points

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run "%SystemRoot%\System32\cleanmgr.exe"
WScript.Sleep 2000

'Normally the systemdrive is selected, but NO CHECK !
WshShell.SendKeys "~"

'Wait for retrieving informations
'Increase the next value, if your system is slow (on a clean install, it should approx. < 20000ms)
WScript.Sleep 20000

WshShell.SendKeys "{TAB 4}"
WScript.Sleep 500
WshShell.SendKeys "{RIGHT}"
WScript.Sleep 500
WshShell.SendKeys "{TAB 3}"
WScript.Sleep 500
WshShell.SendKeys "~"
WScript.Sleep 500
WshShell.SendKeys "~"
'EDIT: OOPS, i forgot to close the app...
WScript.Sleep 2000
WshShell.SendKeys "%{F4}"
Wscript.Quit

Edited by Westi
Link to comment
Share on other sites

Westi, both installations for Ad-aware and PowerDVD worked just fine except the new

reflist.ref in Ad-aware did not replace the old one.

Any idea why it didn't work? :/

This is what I have

'Copy the newest reflist.ref to the ad-aware folder overwrite the old one
'you have to check the path !
Set refl = fso.GetFile("%systemdrive%\Install\Applications\Adaware\reflist.ref")
refl.Copy ("%programfiles%\Lavasoft\Ad-aware 6\reflist.ref")
Wscript.Quit

Link to comment
Share on other sites

pllspexplore plug-in for Ad-aware

i will post the other one later...

EDIT:old post don't work!!

It is too much work to write a script for the plug-ins.

Download this winrar-sfx:

Plug-ins for Ad-aware 6

and you get a self-extracting quiet installation in %programfiles%\Lavasoft\Ad-aware 6\plugins

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.run "D:\Tools\aaw\pllspexplore.exe"
WScript.Sleep 5000
WshShell.SendKeys "o"
WScript.Sleep 1000
WshShell.SendKeys "n"
WScript.Sleep 1000
WshShell.SendKeys "n"
WScript.Sleep 1000
WshShell.SendKeys "C:\programfiles\Lavasoft\Ad-aware 6\Plugins"
WshShell.SendKeys "~"
WScript.Sleep 1000
WshShell.SendKeys "~"
WScript.Sleep 1000
WshShell.SendKeys "~"
WScript.Sleep 1000
WshShell.SendKeys "~"
WScript.Sleep 5000
Wscript.Quit

Edited by Westi
Link to comment
Share on other sites

Could you make a vbs script to make control panel be in my computer!

Yes, i can, but i prefer this method :

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideMyComputerIcons]
"{21EC2020-3AEA-1069-A2DD-08002B30309D}"=dword:00000000

Link to comment
Share on other sites

order for vbs to recognize environment variables you need to use the following method

(some object).ExpandEnvironmentStrings("%some_variable%\path")

Thanx, 'cause i use absolute path' the script i've posted cannot work.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...