Jump to content

VBScript in Unattended installation sequence


Recommended Posts

When you run a VBScript it just continues with the installation of the next app, it’s doesn’t wait until the VBScript has finished is there anyway of compiling them in to executable files or not? Just anything that would hold the installation until its finished its task

Any Ideas?

REG ADD %KEY%\022 /VE /D "Personal Settings Scripts"
REG ADD %KEY%\022 /V 1 /D "%CDROM%\i386\update\UserSettings.vbs" /f
REG ADD %KEY%\022 /v 2 /D "SHUTDOWN -r -t 5" /f

' VBScript source code
' Apply Windows settings easily
Set WshShell = WScript.CreateObject ("WScript.Shell")
wshShell.Run ("tweakui.exe")
wScript.sleep 350
wshshell.sendkeys "{DOWN}"
wshshell.sendkeys "{TAB}"
For i = 1 To 10
 WshShell.SendKeys "{DOWN} "
Next
wshshell.sendkeys "~"
wScript.sleep 350
Set WshShell = Nothing

'---------------------------------------------------------------------------------------

' VBScript source code
' Apply MSN Messanger settings easily
' Script v1.05

Set WshShell = WScript.CreateObject ("WScript.Shell")
wshShell.Run ("msnmsgr.exe")
wScript.sleep 1000
wshshell.sendkeys "%(TO)"
wshshell.sendkeys "+{TAB}"
For i = 1 To 4
 WshShell.SendKeys "{RIGHT}"
Next
wshshell.sendkeys "%(O)"
wshshell.sendkeys "%{u}"
wshshell.sendkeys "%{n}"
For i = 1 To 7
 WshShell.SendKeys "+{TAB}"
Next
wshshell.sendkeys "~%{F4}"
wScript.sleep 300
Set WshShell = Nothing

'---------------------------------------------------------------------------------------

'Undo Windows Update Restriction - xp_winupd_netpolicy.vbs
'© Doug Knox - modified 10/18/2003
'Downloaded from www.dougknox.com

On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")

p1 = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\WindowsUpdate\DisableWindowsUpdateAccess"
p2 = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoWindowsUpdate"

WshShell.RegWrite p1, 0, "REG_DWORD"
WshShell.RegWrite p2, 0, "REG_DWORD"

Set WshShell = Nothing

I'd prefer it if it didn’t matter what was the active windows at the time and just sent the commands to a specified app

Link to comment
Share on other sites


REG ADD %KEY%\005 /VE /D "Add TweakUI to Control Panel" /f
REG ADD %KEY%\005 /V 1 /D "%CDROM%\Software\AddTweakUItoControlPanel.vbs" /f

This is one that i have used and works fine.

You will need to increase your shutdown time. Advise to 60 seconds. You will need to logon to get your theme.

Q. Why is the script in I386 folder, unless it maybe a network install?

Q. Will that script wait for you to run them programs?

Link to comment
Share on other sites

I use this to my advantage when it comes to installing Windows Media Player 10 as I have the System Restore disabled and it complains about that so I use this VBScript just before I launch the installation

Set WshShell = WScript.CreateObject ("WScript.Shell")
WScript.Sleep 1000
WshShell.SendKeys " "
WScript.Quit

Link to comment
Share on other sites

go to Start..Run then type tweakui

and tell me what happens

theres no need to tell it the location

but seeing it load for the first time on this PC I think I better make the delay greater before the settings are applied, anyway I am looking into using AutoIt 3 instead

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...