Δ
Tuesday, November 30th, 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Drop File
How to Drag and drop a file you would like to copy on to a
script, and the file will be copied to the given destination drive or folder
automatically.
Commands
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Const OverwriteExisting = True Set objArgs = WScript.Arguments Set
objFSO = CreateObject("Scripting.FileSystemObject")
If objArgs.Count < 1
Then MsgBox "Thanks but.. Wrong!!" & vbCRLF & _ "" & vbCRLF & _
"Select a file in Explorer, drag and drop it on the script." & vbCRLF & _
"Or place a shortcut from the script into the SendTo folder" & vbCRLF & _
"This way the script will show in the sendto right click menu ." & vbCRLF & _
"" & vbCRLF & _ "To edit the sendto menu go to 'Start - Run - Sendto -
OK" & vbCRLF & _ "Place the shortcut from DropFile.vbs in the SendTo folder,
now right click a file and 'Send To'DropFile", _ vbInformation + vbOKOnly,
Title WScript.Quit End If
For I = 0 to objArgs.Count - 1
Arg = objArgs(I)
objFSO.CopyFile Arg, "C:\DestFolder01\",
OverwriteExisting objFSO.CopyFile Arg, "D:\DestFolder02\", OverwriteExisting
objFSO.CopyFile Arg, "E:\DestFolder03\", OverwriteExisting
objFSO.CopyFile Arg, "F:\DestFolder04\", OverwriteExisting objFSO.CopyFile
Arg, "G:\DestFolder05\", OverwriteExisting
Next WScript.Quit ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Monday, November 29th, 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
SnagIt v10 Enterprise Deployment
How to deploy Techsmith SnagIt to your enterprise
workstations
VBScript/Commands
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'* add your key into the x-x-x-x-x
AppPath = "Techsmith\SnagItv10"
SetupPath = "C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\"&AppPath&"\Setup.msi"
Install = "%comspec% /c %windir%\system32\msiexec.exe /i" & SetupPath & "
/QN /L* %temp%\snagitv10.log COMPANYNAME="&chr(34)&"KHE"&chr(34)&"
USERNAME="&chr(34)&"KHE" & chr(34) &_ "
TSC_SOFTWARE_KEY="&chr(34)&"x-x-x-x-x"&chr(34)& "
TSC_LICENSEMODE="&chr(34)&"Full"&chr(34)
Err.Number = objShell.Run
(Install,0,True)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Monday, November 22nd 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Counter In Batch File
How to create a counter and use logic in a loop
Shell:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
set counter=1 set %counter%=1
:LOOP echo %counter%%% complete...
echo %counter%%% complete...>"msg.txt" Set /A counter+=1
%windir%\system32\sleep.exe 5 @rem searches for setup.exe if it finds it goto
loop else goto final start /min /b /low /wait %windir%\system32\TASKLIST.exe
/FI "IMAGENAME eq setup.exe" | %windir%\system32\find.exe /i "setup.exe" &&
(goto :LOOP) || (goto :FINAL) GOTO :LOOP
:FINAL ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Dynamic Path In Batch
File
How to set the current directory to a variable in a batch
file
Shell
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
@rem ---------------------------------------------------------------- @rem
SET THE CURRENT PATH AS A DYNAMIC VARIABLE @rem SETS WORKING DIRECTORY
for /f %%i in ("%0") do set DYNPATH=%%~dpi set
DYNPATH=%DYNPATH:~0,-1% @rem
----------------------------------------------------------------
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Thursday, November 18th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Verify Local Account Exists
How to verify local accounts exist
VBScript:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
strWorkstation="."
'VERIFY LOCAL ACCOUNT EXISTS
Account="eddiejackson"
DataArea.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white> Verifying
"&Account&" has been created.</h2></p>" window.resizeTo (screen.width),
(screen.height+1) window.resizeTo (screen.width), (screen.height)
objShell.Run "%comspec% /c %windir%\system32\ping -n 3 127.0.0.1",0,true
Set objLocalMachine = GetObject("WinNT://" & strWorkstation)
objLocalMachine.Filter = Array("user") intFound = 0 'Account =
"xxx"'binary negative test
For Each User In objLocalMachine If
lcase(User.Name) = lcase(Account) Then intFound = 1 End If Next
If intFound = 1 Then DataArea.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> "&Account&" DOES
EXIST!</h2></p>" window.resizeTo (screen.width), (screen.height+1)
window.resizeTo (screen.width), (screen.height) objShell.Run "%comspec% /c
%windir%\system32\ping -n 5 127.0.0.1",0,true Else DataArea.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=red> "&Account&" DOES NOT EXIST!</h2></p>" window.resizeTo
(screen.width), (screen.height+1) window.resizeTo (screen.width),
(screen.height) objShell.Run "%comspec% /c %windir%\system32\ping -n 10
127.0.0.1",0,true End If ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Disable IPv6 via Registry-
Requires Restart
How to disble IPv6 on all NICs, useful for cleaning up
unused protocols
Command
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
objShell.Run "%comspec% /c %windir%\system32\REG.exe ADD
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters /v DisabledComponents
/t REG_DWORD /d 0xff /f",0,true ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Returning NIC Settings
How to return NIC settings you can use as variables,
useful for inventory
VBScript:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
strWorkstation = "." SUBNET="255.0.0.0" GATEWAY="10.0.0.254"
DNS1="10.0.0.254"
DNS2=""10.0.0.253" WINS="10.0.0.254"
Set objWMIService =
GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strWorkstation &
"\root\cimv2")
Set colNicConfigs = objWMIService.ExecQuery ("SELECT *
FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each
objNicConfig In colNicConfigs
If Not IsNull(objNicConfig.IPAddress) Then
on error resume next strIPAddress = objNicConfig.IPAddress(0) Else
strIPAddress = "" End If
If Not IsNull(objNicConfig.IPSubnet) Then
on error resume next strIPSubnet = objNicConfig.IPSubnet(0) Else on
error resume next strIPSubnet = SUBNET 'strIPSubnet = "" End If
'msgbox " Subnet Mask: " & strIPSubnet
If Not
IsNull(objNicConfig.DefaultIPGateway) Then on error resume next
strDefaultIPGateway = objNicConfig.DefaultIPGateway(0) Else
strDefaultIPGateway = GATEWAY strDefaultIPGateway = "" End If 'msgbox "
Default Gateways: " & strDefaultIPGateway
'If Not
IsNull(objNicConfig.GatewayCostMetric) Then ' strGatewayCostMetric =
Join(objNicConfig.GatewayCostMetric) 'Else ' strGatewayCostMetric = ""
'End If 'msgbox " Gateway Metric(s): " & strGatewayCostMetric 'msgbox "
Interface Metric: " & _ objNicConfig.IPConnectionMetric 'msgbox "
Connection-specific DNS Suffix: " & objNicConfig.DNSDomain
If Not
IsNull(objNicConfig.GatewayCostMetric) Then on error resume next
strDNSAddress1 = objNicConfig.DNSServerSearchOrder(0) strDNSAddress2 =
objNicConfig.DNSServerSearchOrder(1) Else strDNSAddress1 = DNS1
strDNSAddress2 = DNS2 'strDNSAddress1 = "" 'strDNSAddress2 = "" End If
'msgbox " DNS Address 1:" & strDNSAddress1 'msgbox " DNS Address 2:" &
strDNSAddress2
'SETS WINS ADDRESS TO VARIABLE strWINSAddress =
objNicConfig.WINSPrimaryServer next ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Wednesday, November 17th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Install FTP Server Role IIS7
How to install FTP Server Role on Server 2008r2 -> IIS7
Commands
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c
ServerManagerCmd.exe -install Web-FTP-Server",0,true objShell.Run "%comspec%
/c ServerManagerCmd.exe install Web-FTP-Mgmt-Console",0,true ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Creating Shares & Assigning
Permissions
How to create a share and assign permissions and set max
connections
VBScript:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
strWorkstation="." DIRPATH="C:\INETPUB\TESTFOLDER"
ShareName="testfolder"
Set objShell = CreateObject("WScript.Shell")
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strWorkstation & "\root\cimv2")
Set objNewShare = objWMIService.Get("Win32_Share")
errReturn =
objNewShare.Create (DIRPATH, ShareName, FILE_SHARE, MAXIMUM_CONNECTIONS,
Description)
objShell.Run "%comspec% /c Echo Y|
%windir%\system32\cacls.exe " & chr(34) & DIRPATH & chr(34) &" /t /c /g
everyone:R "&CHR(34)&"ANONYMOUS LOGON:"&CHR(34)&"R",0,true
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Adding an Account to the
local Administrator Group
How to add accounts to groups & set password to never
expire
VBScript:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
strWorkstation="." Account="eddiejackson" pw="welcome123"
Set
objShell = CreateObject("WScript.Shell") Const ADS_UF_DONT_EXPIRE_PASSWD =
&h10000
objShell.Run "%comspec% /c %windir%\system32\net user " & Account
& " " & pw & " /add",0,true objShell.Run "%comspec% /c %windir%\system32\net
localgroup Administrators " & Account & " /add ",0,true objShell.Run
"%comspec% /c %windir%\system32\net localgroup Users " & Account & " /delete
",0,true
'set account to never expire Set objUser =
GetObject("WinNT://" & strWorkstation & "/" & Account) intFlags =
objUser.Get("UserFlags") intFlags = intFlags OR ADS_UF_DONT_EXPIRE_PASSWD
objUser.Put "userFlags", intFlags objUser.SetInfo ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Setting Static NIC
Settings
How to apply static NIC settings
VBScript:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
strNewIPAddress="10.0.0.100" strIPSubnet="255.0.0.0"
strDefaultGateway="10.0.0.254" strDNSAddress1="10.0.0.254"
strDNSAddress2="10.0.0.253" strWINSAddress="10.0.0.254"
intGatewayMetric =1
Set objShell = CreateObject("WScript.Shell")
objShell.Run "%comspec% /c netsh interface ip set address name=""Local Area
Connection"" static " & strNewIPAddress & " " & strIPSubnet & " " &
strDefaultIPGateway & " " & intGatewayMetric, 0, True
objShell.Run
"%comspec% /c netsh interface ip set dns name=""Local Area Connection"" static
"& strDNSAddress1, 0, True
objShell.Run "%comspec% /c netsh interface ip
add dns name=""Local Area Connection"" addr="& strDNSAddress2, 0, True
objShell.Run "%comspec% /c netsh interface ip set wins name=""Local Area
Connection"" static "& strWINSAddress, 0, True ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Tuesday, November 16th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Enable File Server Role
On Server 2008
How to install File Server Role on Server 2008 r2 -> IIS7
Command
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c
ServerManagerCmd.exe -install FS-FileServer",0,true ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Enable Web Server Role
On Server 2008
How to install the Web Server Role on Server 2008r2 -> IIS7
Command
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Set objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c
ServerManagerCmd.exe -install Web-Server",0,true ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Add Virtual Directories
In IIS7 On Server 2008
How to create virtual directories on Server 2008r2 -> IIS7
Command
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c
%windir%\system32\inetsrv\appcmd.exe ADD VDIR
/app.name:"&chr(34)&WEBSITENAME&"/"&chr(34)&" /path:/"& ShareName & "
/physicalPath:"&VIRTUALDIRPATH3,0,true
also reference: VirtualDirectory.Create method ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Configure MIME Types On
Server 2008
How to enable MIME types on Server 2008r2 -> IIS7
Command
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set objShell = CreateObject("WScript.Shell") objShell.Run("%comspec% /c
%windir%\system32\inetsrv\appcmd.exe set config /section:staticContent
/+"&chr(34)&"[fileExtension='.dmg',mimeType='application/octet-stream']"&chr(34)),0,True
also reference: StaticContentSection.Add method ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
Δ
Enable Web Directory
Browsing IIS7
How to enable directory browsing on Server 2008 r2 -> IIS7
Command
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Set objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c
%windir%\system32\inetsrv\appcmd.exe set config /section:directoryBrowse
/enabled:true",0,true ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Monday, November 15th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Server Automation Splash
Screen v1
How to create a generic splash screen to install apps,
useful for a front-end interface This is still in the brainstorm phase
HTA/VBScript- to be accessed on server by Sys Admin
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
<title>ServerAutomation</title> <style type="text/css"> html, body
{height:100%; margin:0; padding:0;} #page-background {position:fixed; top:0;
left:0; width:100%; height:100%;} #content {position:relative;
z-index:1;padding:10px;} </style> <!--[if IE 6]> <style
type="text/css"> html {overflow-y:hidden;} body {overflow-y:auto;}
#page-background {position:absolute; z-index:-1;} #content
{position:static;padding:10px;} </style> <![endif]--> </head>
<SCRIPT LANGUAGE="VBScript">
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: HTA/VBScript
':: SCRIPT NAME: ServerAutomation.hta ':: PURPOSE: To be used to automate
tasks on Server 2008 R2 ':: CREATION DATE: 11/17/2010 ':: LAST MODIFIED:
':: DIRECTIONS: Execute script on Server 2008 as administrator '::
AUTHOR: Eddie Jackson ':: EMAIL: MrNetTek2000@yahoo.com
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'SERVER AUTOMATION STEPS
<script language="vbscript"> 'on
error resume next Window.ReSizeTo 0,0 Window.moveTo -1000, 0 Set
objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c
%windir%\system32\taskkill.exe /f /im cmd.exe",0,true objShell.Run "%comspec%
/c %windir%\system32\ping.exe -n 2 127.0.0.1",0,true </script>
<HTA:APPLICATION APPLICATIONNAME = "SplashScreen" BORDER = "None"
CAPTION = "No" CONTEXTMENU = "No" INNERBORDER = "No" MAXIMIZEBUTTON =
"No" MINIMIZEBUTTON = "No" NAVIGABLE = "No" SCROLL = "No" SELECTION
= "No" SHOWINTASKBAR = "No" SINGLEINSTANCE = "Yes" SYSMENU = "No"
WINDOWSTATE = "Maximize" > </HEAD>
<SCRIPT LANGUAGE="VBScript">
'on error resume next
Account1 = "domain_name\username_1" Account2 =
"domain_name\username_2"
InstallStep2 = "packagename" InstallStep3 =
"packagename" InstallStep4 = "packagename" InstallStep5 = "packagename"
InstallStep6 = "packagename" InstallStep7 = "packagename" InstallStep8 =
"packagename" InstallStep9 = "packagename" InstallStep10 = "packagename"
InstallStep11 = "packagename" InstallStep12 = "packagename"
Set objNetwork = CreateObject("WScript.Network")
strWorkstation = objNetwork.ComputerName Set filesys =
CreateObject("Scripting.FileSystemObject") Set fso =
CreateObject("Scripting.FileSystemObject") Set objShell =
CreateObject("WScript.Shell")
Const WindowsFolder = 0 Const
SystemFolder = 1 Const TemporaryFolder = 2 tempFolder =
fso.GetSpecialFolder(TemporaryFolder)
Sub Window_OnLoad
'on error resume next 'SETS SCREEN SIZE - ADJUSTS TO END-USERS DISPLAY
window.moveTo 0, 0 window.resizeTo (screen.width), (screen.height)
Set
filesys = CreateObject("Scripting.FileSystemObject") Set fso =
CreateObject("Scripting.FileSystemObject") Set objShell =
CreateObject("WScript.Shell")
tempFolder =
fso.GetSpecialFolder(TemporaryFolder)
retval = msgbox(" Are you ready to
start the Server Automation package?", vbYesNo) if retval = vbYes then 'on
error resume next window.event.returnValue = true else EXITNOW() end
if
''data13 = tempFolder & "\step13.txt" ''If NOT
filesys.FileExists(data13) THEN '''on error resume next
''DataArea13.InnerHTML = "<p><h2><font color=red size=6> <b> X
</b></font><font color=white>Step 13</h2></p>" '' else
''DataArea13.InnerHTML = "<p><h2> <font face=wingdings
color=lightgreen size=6><b>"&chr(252)&"</b></font><font color=white> Step
13</h2></p>" ''end if
data12 = tempFolder & "\step12.txt" If NOT
filesys.FileExists(data12) THEN 'on error resume next DataArea12.InnerHTML
= "<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 12</h2></p><br> <input type=button
onClick=EXITNOW value='Exit'>" else DataArea12.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step
12</h2></p><br> <input type=button onClick=EXITNOW
value='Exit'>" end if
data11 = tempFolder & "\step11.txt" If NOT
filesys.FileExists(data11) THEN 'on error resume next DataArea11.InnerHTML
= "<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 11</h2></p>" else DataArea11.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 11</h2></p>"
end if
data10 = tempFolder & "\step10.txt" If NOT
filesys.FileExists(data10) THEN 'on error resume next DataArea10.InnerHTML
= "<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 10</h2></p>" else DataArea10.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 10</h2></p>"
end if
data9 = tempFolder & "\step9.txt" If NOT
filesys.FileExists(data9) THEN 'on error resume next DataArea9.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 9</h2></p>" else DataArea9.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 9</h2></p>" end
if
data8 = tempFolder & "\step8.txt" If NOT filesys.FileExists(data8)
THEN 'on error resume next DataArea8.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 8</h2></p>" else
DataArea8.InnerHTML = "<p><h2> <font face=wingdings
color=lightgreen size=6><b>"&chr(252)&"</b></font><font color=white> Step
8</h2></p>" end if
data7 = tempFolder & "\step7.txt" If NOT
filesys.FileExists(data7) THEN 'on error resume next DataArea7.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 7</h2></p>" else DataArea7.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 7</h2></p>" end
if
data6 = tempFolder & "\step6.txt" If NOT filesys.FileExists(data6)
THEN 'on error resume next DataArea6.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 6</h2></p>" else
DataArea6.InnerHTML = "<p><h2> <font face=wingdings
color=lightgreen size=6><b>"&chr(252)&"</b></font><font color=white> Step
6</h2></p>" end if
data5 = tempFolder & "\step5.txt" If NOT
filesys.FileExists(data5) THEN 'on error resume next DataArea5.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 5</h2></p>" else DataArea5.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 5</h2></p>" end
if
data4 = tempFolder & "\step4.txt" If NOT filesys.FileExists(data4)
THEN 'on error resume next DataArea4.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 4</h2></p>" else
DataArea4.InnerHTML = "<p><h2> <font face=wingdings
color=lightgreen size=6><b>"&chr(252)&"</b></font><font color=white> Step
4</h2></p>" end if
data3 = tempFolder & "\step3.txt" If NOT
filesys.FileExists(data3) THEN 'on error resume next DataArea3.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 3</h2></p>" else DataArea3.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 3</h2></p>" end
if
data2 = tempFolder & "\step2.txt" If NOT filesys.FileExists(data2)
THEN 'on error resume next DataArea2.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 2</h2></p>" else
DataArea2.InnerHTML = "<p><h2> <font face=wingdings
color=lightgreen size=6><b>"&chr(252)&"</b></font><font color=white> Step
2</h2></p>" end if
data1 = tempFolder & "\step1.txt" If NOT
filesys.FileExists(data1) THEN 'on error resume next DataArea1.InnerHTML =
"<h1> <u><b><font color=white>Server Automation
Checklist</font></b></u></h1><br><br><p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 1</h2></p>" else
DataArea1.InnerHTML = "<h1> <u><b><font color=white>Server Automation
Checklist</font></b></u></h1><br><br><p><h2> <font
face=wingdings color=lightgreen size=6><b>"&chr(252)&"</b></font><font
color=white> Step 1</h2></p>" end if
'M A I N P R O C E S
S I N G If NOT filesys.FileExists(data1) THEN AddAccounts1Sub() If NOT
filesys.FileExists(data2) THEN AddAccounts2Sub() If NOT
filesys.FileExists(data3) THEN AddAccounts3Sub() If NOT
filesys.FileExists(data4) THEN AddAccounts4Sub() If NOT
filesys.FileExists(data5) THEN AddAccounts5Sub() If NOT
filesys.FileExists(data6) THEN AddAccounts6Sub() If NOT
filesys.FileExists(data7) THEN AddAccounts7Sub() If NOT
filesys.FileExists(data8) THEN AddAccounts8Sub() If NOT
filesys.FileExists(data9) THEN AddAccounts9Sub() If NOT
filesys.FileExists(data10) THEN AddAccounts10Sub() If NOT
filesys.FileExists(data11) THEN AddAccounts11Sub() If NOT
filesys.FileExists(data12) THEN AddAccounts12Sub() ''If NOT
filesys.FileExists(data13) THEN AddAccounts13Sub() end sub
Sub
AddAccounts1Sub() 'on error resume next Set objShell =
CreateObject("WScript.Shell") DataArea1.InnerHTML = "<h1> <u><b><font
color=white>Server Automation Checklist</font></b></u></h1><br><br><p><h2><font
color=red size=6> <b> X </b></font><font color=white>Adding Lanadmin
account to local administrator group - <i><font
color=lightgreen>processing</font></i></font></h2></p>" objShell.Run
"%comspec% /c net localgroup Administrators /add " & Account1,0,true
objShell.Run "%comspec% /c ping -n 10 127.0.0.1",0,true DataArea1.InnerHTML =
"<h1> <u><b><font color=white>Server Automation
Checklist</font></b></u></h1><br><br><p><h2><font color=red
size=6> <b> X </b></font><font color=white>Adding peersyncadmin
account to local administrator group - <i><font
color=lightgreen>processing</font></i></font></h2></p>" objShell.Run
"%comspec% /c net localgroup Administrators /add " & Account2,0,true
objShell.Run "%comspec% /c ping -n 10 127.0.0.1",0,true
objShell.Run
"%comspec% /c echo rename > %temp%\step1.txt",0, true DataArea1.InnerHTML =
"<h1> <u><b><font color=white>Server Automation
Checklist</font></b></u></h1><br><br><p><h2> <font
face=wingdings color=lightgreen size=6><b>"&chr(252)&"</b></font><font
color=white> Accounts have been added to local administrator group -
done</h2></p>" window.resizeTo (screen.width), (screen.height+1)
window.resizeTo (screen.width), (screen.height) end sub
Sub
AddAccounts2Sub() 'on error resume next DataArea2.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 2 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step2.txt",0, true DataArea2.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 2 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts3Sub()
'on error resume next DataArea3.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 3 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step3.txt",0, true DataArea3.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 3 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts4Sub()
'on error resume next DataArea4.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 4 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step4.txt",0, true DataArea4.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 4 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts5Sub()
'on error resume next DataArea5.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 5 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step5.txt",0, true DataArea5.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 5 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts6Sub()
'on error resume next DataArea6.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 6 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step6.txt",0, true DataArea6.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 6 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts7Sub() 'on
error resume next DataArea7.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 7 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step7.txt",0, true DataArea7.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 7 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts8Sub() 'on
error resume next DataArea8.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 8 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step8.txt",0, true DataArea8.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 8 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts9Sub() 'on
error resume next DataArea9.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 9 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step9.txt",0, true DataArea9.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 9 - done</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
Sub AddAccounts10Sub() 'on
error resume next DataArea10.InnerHTML = "<p><h2><font color=red
size=6> <b> X </b></font><font color=white>Step 10 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step10.txt",0, true DataArea10.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 10 -
done</h2></p>" window.resizeTo (screen.width), (screen.height+1)
window.resizeTo (screen.width), (screen.height) end sub
Sub
AddAccounts11Sub() 'on error resume next DataArea11.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 11 - <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step11.txt",0, true DataArea11.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 11 -
done</h2></p>" window.resizeTo (screen.width), (screen.height+1)
window.resizeTo (screen.width), (screen.height) end sub
Sub
AddAccounts12Sub() 'on error resume next DataArea12.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 12 - <i><font
color=lightgreen>processing</font></i></font></h2></p><br> <input
type=button onClick=EXITNOW value='Exit'>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step12.txt",0, true DataArea12.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 12 -
done</h2></p><br> <input type=button onClick=EXITNOW
value='Exit'>" window.resizeTo (screen.width), (screen.height+1)
window.resizeTo (screen.width), (screen.height) end sub
Sub
AddAccounts13Sub() 'on error resume next DataArea13.InnerHTML =
"<p><h2><font color=red size=6> <b> X </b></font><font
color=white>Step 13 <i><font
color=lightgreen>processing</font></i></font></h2></p>" Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c ping -n 5
127.0.0.1",0,true objShell.Run "%comspec% /c echo rename >
%temp%\step13.txt",0, true DataArea13.InnerHTML =
"<p><h2> <font face=wingdings color=lightgreen
size=6><b>"&chr(252)&"</b></font><font color=white> Step 13</h2></p>"
window.resizeTo (screen.width), (screen.height+1) window.resizeTo
(screen.width), (screen.height) end sub
sub EXITNOW 'on error
resume next objShell.Run "%comspec% /c %windir%\system32\taskkill.exe /f /im
ping.exe",0,true objShell.Run "%comspec% /c %windir%\system32\taskkill.exe /f
/im mshta.exe",0,true SELF.CLOSE() end sub
</script>
<body>
<center> <br> <div id="page-background"><img src="splash.jpg" width="100%"
height="100%"></div> </center> <div id="content">
<span
id="DataArea1"></span> <span id="DataArea2"></span> <span
id="DataArea3"></span> <span id="DataArea4"></span> <span
id="DataArea5"></span> <span id="DataArea6"></span> <span
id="DataArea7"></span> <span id="DataArea8"></span> <span
id="DataArea9"></span> <span id="DataArea10"></span> <span
id="DataArea11"></span> <span id="DataArea12"></span>
</div>
</body> </html> ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Friday, November 12th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
eVault 9.0.1
How to deploy Symantec eVault to your workstations
VBScript - to be sent via LANDesk, Prism, WinInstall
or utilized by technician:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp) '::
******************************************************************************
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript ':: SCRIPT NAME: VaultInstall.vbs '::
PURPOSE: To be used to Install Vault 9.0.1 ':: CREATION DATE: 11/08/2010
':: LAST MODIFIED: ':: DIRECTIONS: Send to client workstation ':: AUTHOR:
Eddie Jackson ':: EMAIL: MrNetTek2000@yahoo.com '::
*****************************************************************************
On error resume next Dim strComputer, OSDetect, objWMIService,
colInstances, objShell
Set objShell = CreateObject("WScript.Shell")
Set filesys = CreateObject("Scripting.FileSystemObject")
'DISABLED'THIS
LAUNCHES SPLASH IF IT EXISTS '''If filesys.FileExists(splash.exe) Then '''
on error resume next ''' objShell.Run "splash.exe",9,False '''End if
'SET WORKSTATION NAME - PRIMARY METHOD strComputer = "."
'SET
WORKSTATION NAME - SECONDARY METHOD if strComputer = "" then on error
resume next Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName end if
'SET WORKSTATION NAME -
TERTIARY METHOD if strComputer = "" then on error resume next
strComputer = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) end if
'ENABLED'PRIMARY OS DETECTION Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject(
"winmgmts://" & strComputer & "/root/CIMV2" ) Set colInstances =
objWMIService.ExecQuery( "SELECT * FROM Win32_OperatingSystem", "WQL",
wbemFlagReturnImmediately + wbemFlagForwardOnly )
For Each objInstance In
colInstances 'msgbox objInstance.Caption OSDetect = objInstance.Caption
Next
OSDetect = trim(OSDetect) 'msgbox OSDetect
if OSDetect =
"Microsoft Windows XP Professional" then XP() if OSDetect = "Microsoft
Windows XP" then XP() if OSDetect = "Microsoft Windows XP Home" then XP()
if OSDetect = "Microsoft Windows 7 Enterprise" then Seven() if OSDetect =
"Microsoft Windows 7 Enterprise Edition" then Seven() if OSDetect =
"Microsoft Windows 7 Ultimate" then Seven() if OSDetect = "Microsoft Windows
7 Ultimate Edition" then Seven() if OSDetect = "Microsoft Windows Server 2003
Standard" then XP() if OSDetect = "Microsoft Windows Server 2008 Standard"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise" then
Seven() if OSDetect <> "Microsoft Windows XP Professional" then Seven()
'SETS UP SECONDARY OS DETECTION IF NEEDED Windows7_OS =
"C:\Users\Public" XP_OS = "C:\Documents and Settings"
'DISABLED'SECONDARY DETECTION LOGIC '''##If filesys.FolderExists(Windows7_OS)
then Seven() '''##If filesys.FolderExists(XP_OS) then XP()
'DISABLED'TERTIARY DETECTION LOGIC '''##if OSDetect <> "Microsoft Windows 7
Enterprise" then XP() 'END OS DETECTION
'W I N D O W S X P Sub
XP on error resume next DIM objShell Set objShell =
CreateObject("WScript.Shell") 'Temporarily stop windows update service
objShell.Run "%comspec% /c net stop wuauserv",0,True objShell.Run "%comspec%
/c copy /v /y SymantecEnterpriseVault9.0.1.msi %windir%\system32",0,True
'Uninstall 'v8.0.4.2002 objShell.Run "%comspec% /c
%windir%\system32\msiexec.exe /x
"&CHR(34)&"{980746E3-7AA4-4982-8336-BEE639E5F3F7}"&CHR(34)&" /qn
/norestart",0,True 'v9.0.1.1038 objShell.Run "%comspec% /c
%windir%\system32\msiexec.exe /x
"&CHR(34)&"{8E7332CC-A2E6-4DAD-AAE3-4449563FFD4B}"&CHR(34)&" /qn
/norestart",0,True 'Install v9.0.1.1038 Err.Number = objShell.Run
("%comspec% /c %windir%\system32\msiexec.exe /i
"&CHR(34)&"%windir%\system32\SymantecEnterpriseVault9.0.1.msi"&CHR(34)&" /qn
/norestart",0,True) 'Start windows update service objShell.Run "%comspec%
/c net start wuauserv",0,True
'ENABLED'HANDLES FINAL ERRORCODE on
error resume next if Error.Number = 3010 then Error.Number = 0'REBOOT if
Error.Number = 1602 then Error.Number = 0'REPAIR if Error.Number = "" then
Error.Number = 0'EMPTY WScript.Quit(Err.Number) End Sub
'W I N
D O W S 7 Sub SEVEN() on error resume next DIM objShell Set objShell
= CreateObject("WScript.Shell") 'Temporarily stop windows update service
objShell.Run "%comspec% /c net stop wuauserv",0,True objShell.Run "%comspec%
/c copy /v /y SymantecEnterpriseVault9.0.1.msi %windir%\system32",0,True
'Uninstall 'v8.0.4.2002 objShell.Run "%comspec% /c
%windir%\system32\msiexec.exe /x
"&CHR(34)&"{980746E3-7AA4-4982-8336-BEE639E5F3F7}"&CHR(34)&" /qn
/norestart",0,True 'v9.0.1.1038 objShell.Run "%comspec% /c
%windir%\system32\msiexec.exe /x
"&CHR(34)&"{8E7332CC-A2E6-4DAD-AAE3-4449563FFD4B}"&CHR(34)&" /qn
/norestart",0,True 'Install v9.0.1.1038 Err.Number = objShell.Run
("%comspec% /c %windir%\system32\msiexec.exe /i
"&CHR(34)&"%windir%\system32\SymantecEnterpriseVault9.0.1.msi"&CHR(34)&" /qn
/norestart",0,True) 'Start windows update service objShell.Run "%comspec%
/c net start wuauserv",0,True
'ENABLED'HANDLES FINAL ERRORCODE on
error resume next if Error.Number = 3010 then Error.Number = 0'REBOOT if
Error.Number = 1602 then Error.Number = 0'REPAIR if Error.Number = "" then
Error.Number = 0'EMPTY WScript.Quit(Err.Number) End Sub ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Thursday, November 11th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Microsoft Office 2010 For
Desktops
How to deploy Office 2010 for your desktops - push
installation
VBScript Install - to be sent via LANDesk, Prism, WinInstall
or utilized by technician:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript '::
SCRIPT NAME: Office2010Desktop.vbs ':: PURPOSE: To be used to install Office
2010 ':: CREATION DATE: 11/02/2010 ':: LAST MODIFIED: ':: DIRECTIONS:
Send to client workstation ':: AUTHOR: Eddie Jackson '::
EMAIL:MrNetTek2000@yahoo.com
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'VARIABLES on error resume next
Dim filesys, strComputer,
OSDetect, objWMIService, colInstances, sUser, strUser, objShell, Install,
Update, DELICON, Windows7_OS, XP_OS Dim BetaTestPath, SDMCache, AppPath,
wshShell, SetupFilesPath, SetupPath, VaultInstallPath, Update1, Update2,
Update3, Update4
AppPath = "Microsoft\Office2010Desktop"
Set
filesys = CreateObject("Scripting.FileSystemObject") Set objShell =
CreateObject("Wscript.Shell") Set wshShell =
WScript.CreateObject("WScript.Shell")
'TESTING DIAGNOSTIC 'msgbox
"Begin Time: " & TIME ' ' 'PRE-SETUP on error resume next Set
objShell = CreateObject("Wscript.Shell") objShell.Run "%comspec% /c
%windir%\system32\taskkill.exe /f /im cmd.exe",0,True objShell.Run "%comspec%
/c %windir%\system32\taskkill.exe /f /im SetupFiles.exe",0,True objShell.Run
"%comspec% /c %windir%\system32\taskkill.exe /f /im mshta.exe",0,True
'POLICY DISABLED 'FilterFile = "c:\Program Files\YourProgram\foo.exe" 'If
filesys.FileExists(FilterFile) THEN 'WScript.Quit(0) 'End if
'TASKKILLS PRE-INSTALLATION 'KILLS CURRENTLY RUNNING MSIEXEC.EXE
objShell.Run "%comspec% /c %windir%\SYSTEM32\TASKKILL.EXE /F /IM
msiexec.exe",0,True
'KILLS CURRENTLY RUNNING setup.exe objShell.Run
"%comspec% /c %windir%\SYSTEM32\TASKKILL.EXE /F /IM setup.exe",0,True
'KILLS CURRENTLY RUNNING word objShell.Run "%comspec% /c
%windir%\SYSTEM32\TASKKILL.EXE /F /IM winword.exe",0,True
'KILLS
CURRENTLY RUNNING access objShell.Run "%comspec% /c
%windir%\SYSTEM32\TASKKILL.EXE /F /IM msaccess.exe",0,True
'KILLS
CURRENTLY RUNNING excel objShell.Run "%comspec% /c
%windir%\SYSTEM32\TASKKILL.EXE /F /IM excel.exe",0,True
'KILLS CURRENTLY
RUNNING infopath objShell.Run "%comspec% /c %windir%\SYSTEM32\TASKKILL.EXE /F
/IM infopath.exe",0,True
'KILLS CURRENTLY RUNNING onenote objShell.Run
"%comspec% /c %windir%\SYSTEM32\TASKKILL.EXE /F /IM onenote.exe",0,True
'KILLS CURRENTLY RUNNING outlook objShell.Run "%comspec% /c
%windir%\SYSTEM32\TASKKILL.EXE /F /IM outlook.exe",0,True
'KILLS
CURRENTLY RUNNING powerpoint objShell.Run "%comspec% /c
%windir%\SYSTEM32\TASKKILL.EXE /F /IM powerpnt.exe",0,True
'KILLS
CURRENTLY RUNNING powerpoint objShell.Run "%comspec% /c
%windir%\SYSTEM32\TASKKILL.EXE /F /IM communicator.exe",0,True
'SET
WORKSTATION NAME - PRIMARY METHOD strComputer = "."
'SET WORKSTATION
NAME - SECONDARY METHOD if strComputer = "" then on error resume next
Set wshNetwork = WScript.CreateObject( "WScript.Network" ) strComputer =
wshNetwork.ComputerName end if
'SET WORKSTATION NAME - TERTIARY METHOD
if strComputer = "" then on error resume next strComputer =
wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) end if
'ENABLED'PRIMARY OS DETECTION Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject(
"winmgmts://" & strComputer & "/root/CIMV2" ) Set colInstances =
objWMIService.ExecQuery( "SELECT * FROM Win32_OperatingSystem", "WQL",
wbemFlagReturnImmediately + wbemFlagForwardOnly )
For Each objInstance In
colInstances 'msgbox objInstance.Caption OSDetect = objInstance.Caption
Next
OSDetect = trim(OSDetect) 'msgbox OSDetect
if OSDetect =
"Microsoft Windows XP Professional" then XP() if OSDetect = "Microsoft
Windows XP" then XP() if OSDetect = "Microsoft Windows XP Home" then XP()
if OSDetect = "Microsoft Windows 7 Enterprise" then Seven() if OSDetect =
"Microsoft Windows 7 Enterprise Edition" then Seven() if OSDetect =
"Microsoft Windows 7 Ultimate" then Seven() if OSDetect = "Microsoft Windows
7 Ultimate Edition" then Seven() if OSDetect = "Microsoft Windows Server 2003
Standard" then XP() if OSDetect = "Microsoft Windows Server 2008 Standard"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Standard Edition"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise" then
Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise Edition" then
Seven() if OSDetect <> "Microsoft Windows Server 2008 Enterprise" then XP()
WScript.Quit(0)
'SETS UP SECONDARY OS DETECTION IF NEEDED Windows7_OS
= "C:\Users\Public" XP_OS = "C:\Documents and Settings"
'DISABLED'SECONDARY DETECTION LOGIC '''##If filesys.FolderExists(Windows7_OS)
then Seven() '''##If filesys.FolderExists(XP_OS) then XP()
'DISABLED'TERTIARY DETECTION LOGIC '''##if OSDetect <> "Microsoft Windows 7
Enterprise" then XP() 'END OS DETECTION
'W I N D O W S X P Sub
XP on error resume next
'EXTRACT SPLASH SCREEN & COUNTER FILES
'primary logic - to be used for LANDesk installations If
filesys.FileExists("C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\splash.exe")
THEN objShell.Run
"C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\splash.exe",9,True
end if
'secondary logic - to be used for normal installations If NOT
filesys.FileExists("C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\splash.exe")
THEN objShell.Run "splash.exe",9,True end if
'LAUNCH CORRECT
SPLASH SCREEN STARTCOUNTER =
"C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\STARTCOUNTER.hta"
'primary logic - to be used for LANDesk installations If
filesys.FileExists(STARTCOUNTER) THEN msgbox "Counter does exist in LANDesk
path" Err.Number = objShell.Run (STARTCOUNTER,9,True) WScript.Sleep 2000
ErrorCode0 = Err.Number end if
'secondary logic - to be used for
normal installations If NOT filesys.FileExists(STARTCOUNTER) THEN msgbox
"Counter does not exist in LANDesk path" Err.Number = objShell.Run
("STARTCOUNTER.hta",9,True) WScript.Sleep 2000 ErrorCode0 = Err.Number
'msgbox "step0 " & ErrorCode0 'WScript.Quit(0) end if
'LAUNCH
CORRECT SPLASH SCREEN LANDeskLogo =
"C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\LANDesk.hta"
'primary logic - to be used for LANDesk installations If
filesys.FileExists(LANDeskLogo) THEN 'msgbox "LANDesk Logo does exist in
LANDesk path" Err.Number = objShell.Run (LANDeskLogo,9,False)
WScript.Sleep 2000 ErrorCode0 = Err.Number end if
'secondary logic
- to be used for normal installations If NOT filesys.FileExists(LANDeskLogo)
THEN 'msgbox "LANDesk Logo does not exist in LANDesk path" Err.Number =
objShell.Run ("Kaplan.HTA",9,False) WScript.Sleep 2000 ErrorCode0 =
Err.Number 'msgbox "step0 " & ErrorCode0 'WScript.Quit(0) end if
'SET WORKING DIRECTORY AND LAUNCH MESSAGE COMMAND FILE 'WINDOWS XP
NORMAL PATH SDMCachePath = "C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\" &
AppPath If filesys.FolderExists(SDMCachePath) then on error resume next
objShell.CurrentDirectory = SDMCachePath End if
'DISABLE: RETURN
CURRENT USER '''sUser = ConsoleUser(".") '''strUser = Trim(sUser)
'MsgBox sUser
'ENABLED'TEMPORARILY TURNS OFF AUTOMATIC UPDATES on
error resume next Set objShell = CreateObject("WScript.Shell")
objShell.Run "%comspec% /c %windir%\system32\net.exe stop wuauserv",0,True
WScript.Sleep 2000
'ENABLED'PRE-INSTALLATION EXTRACTS FILES REQUIRED
SETUP FILES TO SDMCACHE on error resume next Set objShell =
CreateObject("WScript.Shell")
'primary logic - to be used for LANDesk
installations SetupFilesPath =
"C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\SetupFiles.exe"
If filesys.FileExists(SetupFilesPath) THEN 'msgbox "SetupFiles.exe does
exist in LANDesk path" Err.Number = objShell.Run (SetupFilesPath,9,True)
WScript.Sleep 2000 ErrorCode0 = Err.Number end if
'secondary logic
- to be used for normal installations If NOT
filesys.FileExists(SetupFilesPath) THEN 'msgbox "SetupFiles.exe does not
exist in landesk path" Err.Number = objShell.Run ("SetupFiles.exe",9,True)
WScript.Sleep 2000 ErrorCode0 = Err.Number 'msgbox "step0 " & ErrorCode0
'WScript.Quit(0) end if
'ENABLED'INSTALLS APPLICATION WITH SILENT
SWITCHES on error resume next
'primary logic - used for LANDesk
installation SetupPath =
"C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\Setup.exe"
If filesys.FileExists(SetupPath) THEN Set objShell =
CreateObject("WScript.Shell") 'msgbox "Setup.exe does exist in LANDesk path"
Install = "%comspec% /c " & SetupPath Err.Number = objShell.Run
(Install,0,True) WScript.Sleep 3000 ErrorCode4 = Err.Number 'msgbox
"step4 " & ErrorCode4 'WScript.Quit(0) end if
'secondary logic -
used for normal installation If NOT filesys.FileExists(SetupPath) THEN
Set objShell = CreateObject("WScript.Shell") 'msgbox "Setup.exe does not
exist in landesk path" Install = "SETUP.EXE" Err.Number = objShell.Run
(Install,0,True) WScript.Sleep 3000 ErrorCode4 = Err.Number end if
'ENABLED'UPDATES APPLICATION - UPDATES THE SYMANTEC VAULT APPLICATION
on error resume next
VaultFolderPath = "C:\Progra~1\Enterp~1\EVClient"
VaultInstallPath =
"C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\
SymantecEnterpriseVault9.0.1.msi" VaultInstallNewPath =
"%windir%\system32\SymantecEnterpriseVault9.0.1.msi"
if
filesys.FolderExists(VaultFolderPath) THEN
VaultFolderPath =
"C:\Progra~1\Enterp~1\EVClient" VaultInstallPath =
"C:\Progra~1\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\
SymantecEnterpriseVault9.0.1.msi" VaultInstallNewPath =
"%windir%\system32\SymantecEnterpriseVault9.0.1.msi"
on error resume next
Set objShell = CreateObject("Wscript.Shell") Update1 = "%comspec% /c
%windir%\system32\msiexec.exe /x "& CHR(34) &
"{980746E3-7AA4-4982-8336-BEE639E5F3F7}" & CHR(34) & " /qn /norestart"
Update2 = "%comspec% /c %windir%\system32\msiexec.exe /x "& CHR(34) &
"{980746E3-7AA4-4982-8336-BEE639E5F3F7}" & CHR(34) & " /qn /norestart"
Err.Number = objShell.Run (Update1,0,True) ErrorCode2_1 = Err.Number
WScript.Sleep 2000 Err.Number = objShell.Run (Update2,0,True) ErrorCode2_2
= Err.Number WScript.Sleep 2000
'primary logic - used for LANDesk
installations If filesys.FileExists(VaultInstallPath) then Set objShell =
CreateObject("WScript.Shell") 'msgbox "Vault does exist in LANDesk path"
Update3 = "%comspec% /c %windir%\system32\msiexec.exe /x"& VaultInstallPath & "
/qn /norestart" Update4 = "%comspec% /c %windir%\system32\msiexec.exe /i"&
chr(34) & VaultInstallPath & chr(34) & " /qn /norestart" Err.Number =
objShell.Run (Update3,0,True) ErrorCode2_3 = Err.Number WScript.Sleep 2000
Err.Number = objShell.Run (Update4,0,True) ErrorCode2_4 = Err.Number
WScript.Sleep 2000 end if
'secondary logic - used for normal
installations If NOT filesys.FileExists(VaultInstallPath) then Set
objShell = CreateObject("WScript.Shell") 'msgbox "Vault does not exist in
LANDesk path" CopyCon = "%comspec% /c copy /y /v *.msi %windir%\system32"
objShell.Run CopyCon,0,True Update3 = "%comspec% /c
%windir%\system32\msiexec.exe /x" & chr(34) &
"%windir%\system32\SymantecEnterpriseVault9.0.1.msi" & chr(34) & " /qn
/norestart" Update4 = "%comspec% /c %windir%\system32\msiexec.exe /i" &
chr(34) & "%windir%\system32\SymantecEnterpriseVault9.0.1.msi" & chr(34) & " /qn
/norestart" objShell.Run Update3,0,True WScript.Sleep 2000 objShell.Run
Update4,0,True WScript.Sleep 2000 end if
end if
'ENABLED'POST-INSTALLATION REGEDIT - DISABLE PSTs on error resume next
REGEDIT = "%comspec% /c %windir%\system32\REG.exe ADD "&
chr(34)&"HKLM\Software\Microsoft\Office\14.0\Outlook"&chr(34)&" /v
"&chr(34)&"DisablePST"&CHR(34)&" /d 1 /t REG_DWORD /f" 'command: REG.exe ADD
"HKLM\Software\Microsoft\Office\14.0\Outlook" /v "DisablePST" /d 0 /t REG_DWORD
/f Err.Number = objShell.Run (REGEDIT,0,False) WScript.Sleep 2000
ErrorCode8 = Err.Number 'msgbox "step8 " & ErrorCode8 'WScript.Quit(0)
'ENABLED'TURNS ON AUTOMATIC UPDATES on error resume next Set objShell
= CreateObject("Wscript.Shell") objShell.Run "%comspec% /c
%windir%\SYSTEM32\net.exe start wuauserv",0,False'STARTS THE WINDOWS UPDATE
SERVICE WScript.Sleep 2000 'msgbox "step9 " & ErrorCode9
'ENABLED'POST-INSTALLATION TASKKILLS objShell.Run "%comspec% /c
%windir%\system32\taskkill.exe /f /im mshta.exe",0,True'KILLS SPLASH SCREEN and
LANDesk Logo Screen '''objShell.Run "%comspec% /c
%windir%\system32\taskkill.exe /f /im cmd.exe",0,True'KILLS ANY CMD.EXE
'ENABLED'HANDLES FINAL ERRORCODE on error resume next if ErrorCode4 = 3010
then ErrorCode4 = 0'REBOOT if ErrorCode4 = 1602 then ErrorCode4 = 0'REPAIR
if ErrorCode4 = "" then ErrorCode4 = 0'EMPTY
'TESTING DIAGNOSTIC
'msgbox "End Time: " & TIME
'QUIT WITH ERROR CODE
WScript.Quit(ErrorCode4) End Sub
'W I N D O W S 7 Sub
SEVEN() on error resume next 'SET WORKING DIRECTORY AND LAUNCH MESSAGE
COMMAND FILE
'EXTRACT SPLASH SCREEN FILES If
filesys.FileExists("C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\splash.exe")
THEN objShell.Run
"C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\splash.exe",9,True
end if
If NOT
filesys.FileExists("C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\splash.exe")
THEN objShell.Run "splash.exe",9,True end if
'LAUNCH CORRECT SPLASH
SCREEN LANDeskLogo =
"C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\LANDesk.hta"
If filesys.FileExists(LANDeskLogo) THEN 'msgbox "LANDesk Logo does exist in
LANDesk path" Err.Number = objShell.Run (LANDeskLogo,9,False)
WScript.Sleep 2000 ErrorCode0 = Err.Number end if
'secondary logic
- to be used for normal installations If NOT filesys.FileExists(LANDeskLogo)
THEN 'msgbox "LANDesk Logo does not exist in LANDesk path" Err.Number =
objShell.Run ("Kaplan.HTA",9,False) WScript.Sleep 2000 ErrorCode0 =
Err.Number 'msgbox "step0 " & ErrorCode0 'WScript.Quit(0) end if
'WINDOWS XP NORMAL PATH SDMCachePath =
"C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\" & AppPath If
filesys.FolderExists(SDMCachePath) then on error resume next
objShell.CurrentDirectory = SDMCachePath End if
'ENABLED'TEMPORARILY TURNS OFF AUTOMATIC UPDATES on error resume next Set
objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c
%windir%\system32\net.exe stop wuauserv",0,True WScript.Sleep 2000
'ENABLED'PRE-INSTALLATION EXTRACTS FILES REQUIRED SETUP FILES TO SDMCACHE
on error resume next Set objShell = CreateObject("WScript.Shell")
'primary logic - to be used for LANDesk installations SetupFilesPath =
"C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\SetupFiles.exe"
If filesys.FileExists(SetupFilesPath) THEN 'msgbox "SetupFiles.exe does
exist in LANDesk path" Err.Number = objShell.Run (SetupFilesPath,0,True)
WScript.Sleep 2000 ErrorCode0 = Err.Number end if
'secondary logic
- to be used for normal installations If NOT
filesys.FileExists(SetupFilesPath) THEN 'msgbox "SetupFiles.exe does not
exist in landesk path" Err.Number = objShell.Run ("SetupFiles.exe",9,True)
WScript.Sleep 2000 ErrorCode0 = Err.Number 'msgbox "step0 " & ErrorCode0
'WScript.Quit(0) end if
'ENABLED'INSTALLS APPLICATION WITH SILENT
SWITCHES on error resume next
'primary logic - used for LANDesk
installation SetupPath =
"C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\Setup.exe"
If filesys.FileExists(SetupPath) THEN Set objShell =
CreateObject("WScript.Shell") 'msgbox "Setup.exe does exist in LANDesk path"
Install = "%comspec% /c " & SetupPath Err.Number = objShell.Run
(Install,0,True) WScript.Sleep 3000 ErrorCode4 = Err.Number 'msgbox
"step4 " & ErrorCode4 'WScript.Quit(0) end if
'secondary logic -
used for normal installation If NOT filesys.FileExists(SetupPath) THEN
Set objShell = CreateObject("WScript.Shell") 'msgbox "Setup.exe does not
exist in landesk path" Install = "SETUP.EXE" Err.Number = objShell.Run
(Install,9,True) WScript.Sleep 3000 ErrorCode4 = Err.Number end if
'ENABLED'UPDATES APPLICATION - UPDATES THE SYMANTEC VAULT APPLICATION
on error resume next
VaultFolderPath = "C:\Progra~2\Enterp~1\EVClient"
VaultInstallPath =
"C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\
SymantecEnterpriseVault9.0.1.msi" VaultInstallNewPath =
"%windir%\system32\SymantecEnterpriseVault9.0.1.msi"
if
filesys.FolderExists(VaultFolderPath) THEN
VaultFolderPath =
"C:\Progra~2\Enterp~1\EVClient" VaultInstallPath =
"C:\Progra~2\LANDesk\LDClient\sdmcache\APPS\Microsoft\Office2010Desktop\
SymantecEnterpriseVault9.0.1.msi" VaultInstallNewPath =
"%windir%\system32\SymantecEnterpriseVault9.0.1.msi"
on error resume next
Set objShell = CreateObject("Wscript.Shell") Update1 = "%comspec% /c
%windir%\system32\msiexec.exe /x "& CHR(34) &
"{980746E3-7AA4-4982-8336-BEE639E5F3F7}" & CHR(34) & " /qn /norestart"
Update2 = "%comspec% /c %windir%\system32\msiexec.exe /x "& CHR(34) &
"{980746E3-7AA4-4982-8336-BEE639E5F3F7}" & CHR(34) & " /qn /norestart"
Err.Number = objShell.Run (Update1,0,True) ErrorCode2_1 = Err.Number
WScript.Sleep 2000 Err.Number = objShell.Run (Update2,0,True) ErrorCode2_2
= Err.Number WScript.Sleep 2000
'primary logic - used for LANDesk
installations If filesys.FileExists(VaultInstallPath) then Set objShell =
CreateObject("WScript.Shell") 'msgbox "Vault does exist in LANDesk path"
Update3 = "%comspec% /c %windir%\system32\msiexec.exe /x"& VaultInstallPath & "
/qn /norestart" Update4 = "%comspec% /c %windir%\system32\msiexec.exe /i"&
chr(34) & VaultInstallPath & chr(34) & " /qn /norestart" Err.Number =
objShell.Run (Update3,0,True) ErrorCode2_3 = Err.Number WScript.Sleep 2000
Err.Number = objShell.Run (Update4,0,True) ErrorCode2_4 = Err.Number
WScript.Sleep 2000 end if
'secondary logic - used for normal
installations If NOT filesys.FileExists(VaultInstallPath) then Set
objShell = CreateObject("WScript.Shell") 'msgbox "Vault does not exist in
LANDesk path" CopyCon = "%comspec% /c copy /y /v *.msi %windir%\system32"
objShell.Run CopyCon,0,True Update3 = "%comspec% /c
%windir%\system32\msiexec.exe /x" & chr(34) &
"%windir%\system32\SymantecEnterpriseVault9.0.1.msi" & chr(34) & " /qn
/norestart" Update4 = "%comspec% /c %windir%\system32\msiexec.exe /i" &
chr(34) & "%windir%\system32\SymantecEnterpriseVault9.0.1.msi" & chr(34) & " /qn
/norestart" objShell.Run Update3,0,True WScript.Sleep 2000 objShell.Run
Update4,0,True WScript.Sleep 2000 end if
end if
'ENABLED'POST-INSTALLATION REGEDIT - DISABLE PSTs on error resume next
REGEDIT = "%comspec% /c %windir%\system32\REG.exe ADD "&
chr(34)&"HKLM\Software\Microsoft\Office\14.0\Outlook"&chr(34)&" /v
"&chr(34)&"DisablePST"&CHR(34)&" /d 1 /t REG_DWORD /f" 'command: REG.exe ADD
"HKLM\Software\Microsoft\Office\14.0\Outlook" /v "DisablePST" /d 0 /t REG_DWORD
/f Err.Number = objShell.Run (REGEDIT,0,False) WScript.Sleep 2000
ErrorCode8 = Err.Number 'msgbox "step8 " & ErrorCode8 'WScript.Quit(0)
'ENABLED'TURNS ON AUTOMATIC UPDATES on error resume next Set
objShell = CreateObject("Wscript.Shell") objShell.Run "%comspec% /c
%windir%\SYSTEM32\net.exe start wuauserv",0,False'STARTS THE WINDOWS UPDATE
SERVICE WScript.Sleep 2000 'msgbox "step9 " & ErrorCode9
'ENABLED'POST-INSTALLATION TASKKILLS objShell.Run "%comspec% /c
%windir%\system32\taskkill.exe /f /im mshta.exe",0,True'KILLS SPLASH SCREEN and
LANDesk Logo Screen '''objShell.Run "%comspec% /c
%windir%\system32\taskkill.exe /f /im cmd.exe",0,True'KILLS ANY CMD.EXE
'DISABLED'POST-INSTALLATION DELETE FILES '''objShell.Run "%comspec% /c del /q
msg.txt",0,True'DELETES MSG TEXT FILE
'ENABLED'HANDLES FINAL ERRORCODE
on error resume next if ErrorCode4 = 3010 then ErrorCode4 = 0'REBOOT if
ErrorCode4 = 1602 then ErrorCode4 = 0'REPAIR if ErrorCode4 = "" then
ErrorCode4 = 0'EMPTY
'TESTING DIAGNOSTIC 'msgbox "End Time: " &
TIME
'QUIT WITH ERROR CODE WScript.Quit(ErrorCode4) End Sub
'THIS FUNCTION RETURNS LOGGED IN STATUS WITH A TRUE-FOR LOGGED IN OR
FALSE-NOT LOGGED IN Function UserLoggedInStatus() on error resume next
Dim LoggedInStatus, objWMIService, colItems
'Example 'strComputer =
"." 'If UserLoggedInStatus = TRUE then msgbox "user IS logged in" 'If
UserLoggedInStatus = FALSE then msgbox "user NOT logged in"
Set
objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set
colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems on error resume next 'Wscript.Echo
objItem.UserName LoggedInStatus = trim(objItem.UserName) & "" next
if LoggedInStatus = "" then 'msgbox "User NOT logged in"
UserLoggedInStatus = FALSE end if
if LoggedInStatus <> "" then
'msgbox "User IS logged in" UserLoggedInStatus = TRUE end if
Set
objItem = Nothing Set colItems = Nothing Set objWMIService = Nothing
End function
'THIS FUNCTION RETURNS OWNER OF EXPLORER.EXE PROCESS
Function ConsoleUser(sHost) on error resume next ' Returns name of user
logged on to console ' If no users are logged on, returns "" Dim oWMI,
colProc, oProcess, sUser, sDomain Set oWmi = GetObject("winmgmts:" _ &
"{impersonationLevel=impersonate,(debug)}!\\" _ & sHost & "\root\cimv2" )
Set colProc = oWmi.ExecQuery("Select Name from Win32_Process" _ & "
Where Name='explorer.exe' and SessionID=0" )
ConsoleUser = "" For
Each oProcess In colProc lRet = oProcess.GetOwner(sUser, sDomain) If
lRet = 0 Then sUser = Trim(sUser) ConsoleUser = sUser End If Next
End Function
'THIS FUNCTION RETURNS 32 or 64 bit for OS
Function OS_TYPE() on error resume next Const HKLM = &H80000002
arrComputers = Array(".")
For Each strComputer In arrComputers on
error resume next Set WshShell = WScript.CreateObject("WScript.Shell")
'CHECKING THE REGISTRY VALUE X =
WshShell.RegRead("HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0\Identifier")
'TAKING 3 CHARECTERS FROM LEFT SIDE OF RESULT X1 = Left(X,3) 'CHECK
VERSION AGAINST X86 If X1 = "x86" Then 'WScript.Echo "32- Bit OS"
OS_TYPE = 32 Else 'WScript.Echo "64- Bit OS" OS_TYPE = 64 End if
Next end function
'THIS FUNCTION RETURNS GENERAL TIME OF DAY; MORNING,
AFTERNOON, EVENING Function TimeOfDay() on error resume next Dim h
'create variable that will store the hour
'EXAMPLE 'msgbox
TimeOfDay()
h=hour(now) 'pass in the date and time to the hour function
as a parameter If h<12 then 'msgbox "morning!" TimeOfDay = "morning"
ElseIf h<18 then 'msgbox "afternoon!" TimeOfDay = "afternoon" else
'msgbox "evening!" TimeOfDay = "evening" end if End function. ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Wednesday, November 10th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Flash Player 10.1.102.64
Deployment
How to deploy flash player to your enterprise
VBScript Install- to be sent via LANDesk, Prism, WinInstall
or utilized by technician:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
' ----- ExeScript Options Begin ----- ' ScriptType: window,highest '
DestDirectory: C:\WINDOWS\system32 ' Icon:
c:\windows\system32\shell32.dll,162 ' File:
c:\windows\system32\install_flash_player_10_active_x.msi ' OutputFile:
C:\temp\Flash_Player_10.1.102.64.exe ' CompanyName: Eite Solutions '
FileDescription: Flash Player 10.1.102.64 ' FileVersion: 1.0.0.1 '
LegalCopyright: Elite Solutions ' ProductName: Flash Player 10.1.102.64 '
ProductVersion: 1.0.0.1 ' ----- ExeScript Options End ----- '::
******************************************************************************
':: SCRIPT LANGUAGE: VBScript ':: SCRIPT NAME: FlashInstall.vbs '::
PURPOSE: To be used to Install Flash Player 10.1.102.64 ':: CREATION DATE:
11/09/2010 ':: LAST MODIFIED: ':: DIRECTIONS: Send to client workstation
':: AUTHOR: Eddie Jackson ':: EMAIL: MrNetTek2000@yahoo.com '::
*****************************************************************************
On error resume next Dim strComputer, OSDetect, objWMIService,
colInstances
'SET WORKSTATION NAME - PRIMARY METHOD strComputer = "."
'SET WORKSTATION NAME - SECONDARY METHOD if strComputer = "" then on
error resume next Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName end if
'SET WORKSTATION NAME -
TERTIARY METHOD if strComputer = "" then on error resume next
strComputer = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) end if
'ENABLED'PRIMARY OS DETECTION Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject(
"winmgmts://" & strComputer & "/root/CIMV2" ) Set colInstances =
objWMIService.ExecQuery( "SELECT * FROM Win32_OperatingSystem", "WQL",
wbemFlagReturnImmediately + wbemFlagForwardOnly )
For Each objInstance In
colInstances 'msgbox objInstance.Caption OSDetect = objInstance.Caption
Next
OSDetect = trim(OSDetect) 'msgbox OSDetect
if OSDetect =
"Microsoft Windows XP Professional" then XP() if OSDetect = "Microsoft
Windows XP" then XP() if OSDetect = "Microsoft Windows XP Home" then XP()
if OSDetect = "Microsoft Windows 7 Enterprise" then Seven() if OSDetect =
"Microsoft Windows 7 Enterprise Edition" then Seven() if OSDetect =
"Microsoft Windows 7 Ultimate" then Seven() if OSDetect = "Microsoft Windows
7 Ultimate Edition" then Seven() if OSDetect = "Microsoft Windows Server 2003
Standard" then XP() if OSDetect = "Microsoft Windows Server 2008 Standard"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Standard Edition"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise" then
Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise Edition" then
Seven() if OSDetect <> "Microsoft Windows Server 2008 Enterprise" then XP()
WScript.Quit(0)
'W I N D O W S X P Sub XP on error resume next
DIM objShell Set objShell = CreateObject("WScript.Shell") objShell.Run
"%comspec% /c net stop wuauserv",0,True 'Install objShell.Run "%comspec%
/c copy /v /y install_flash_player_10_active_x.msi %windir%\system32",0,True
Err.Number = objShell.Run ("%comspec% /c c:\windows\system32\msiexec.exe /i
"&CHR(34)&"install_flash_player_10_active_x.msi"&CHR(34)&" /qn
/norestart",0,True) objShell.Run "%comspec% /c net start wuauserv",0,True
if Err.Number = 3010 then Err.Number = 0 WScript.Quit(Err.Number)
WScript.Quit(0) End Sub
'W I N D O W S 7 Sub SEVEN() on
error resume next DIM objShell Set objShell =
CreateObject("WScript.Shell") objShell.Run "%comspec% /c net stop
wuauserv",0,True 'Install objShell.Run "%comspec% /c copy /v /y
install_flash_player_10_active_x.msi %windir%\system32",0,True Err.Number =
objShell.Run ("%comspec% /c c:\windows\system32\msiexec.exe /i
"&CHR(34)&"install_flash_player_10_active_x.msi"&CHR(34)&" /qn
/norestart",0,True) objShell.Run "%comspec% /c net start wuauserv",0,True
if Err.Number = 3010 then Err.Number = 0 WScript.Quit(Err.Number)
WScript.Quit(0) End Sub . ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
VBScript Uninstall- to be sent via LANDesk, Prism, WinInstall or utilized by technician:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
' ----- ExeScript Options Begin ----- ' ScriptType: window,highest '
DestDirectory: temp ' Icon: C:\WINDOWS\system32\shell32.dll,131 '
OutputFile: C:\temp\Flash_Player_10.1.102.64 Uninstall.exe ' CompanyName:
Elite Solutions ' FileDescription: Flash Player 10.1.102.64 ' FileVersion:
1.0.0.1 ' LegalCopyright: Elite Solutions ' ProductName: Flash Player
10.1.102.64 ' ProductVersion: 1.0.0.1 ' ----- ExeScript Options End -----
'::
******************************************************************************
':: SCRIPT LANGUAGE: VBScript ':: SCRIPT NAME: FlashUnInstall.vbs '::
PURPOSE: To be used to UnInstall Flash Player 10.1.102.64 ':: CREATION DATE:
11/09/2010 ':: LAST MODIFIED: ':: DIRECTIONS: Send to client workstation
':: AUTHOR: Eddie Jackson ':: EMAIL: MrNetTek2000@yahoo.com '::
*****************************************************************************
On error resume next Dim strComputer, OSDetect, objWMIService,
colInstances
'SET WORKSTATION NAME - PRIMARY METHOD strComputer = "."
'SET WORKSTATION NAME - SECONDARY METHOD if strComputer = "" then on
error resume next Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName end if
'SET WORKSTATION NAME -
TERTIARY METHOD if strComputer = "" then on error resume next
strComputer = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) end if
'ENABLED'PRIMARY OS DETECTION Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject(
"winmgmts://" & strComputer & "/root/CIMV2" ) Set colInstances =
objWMIService.ExecQuery( "SELECT * FROM Win32_OperatingSystem", "WQL",
wbemFlagReturnImmediately + wbemFlagForwardOnly )
For Each objInstance In
colInstances 'msgbox objInstance.Caption OSDetect = objInstance.Caption
Next
OSDetect = trim(OSDetect) 'msgbox OSDetect
if OSDetect =
"Microsoft Windows XP Professional" then XP() if OSDetect = "Microsoft
Windows XP" then XP() if OSDetect = "Microsoft Windows XP Home" then XP()
if OSDetect = "Microsoft Windows 7 Enterprise" then Seven() if OSDetect =
"Microsoft Windows 7 Enterprise Edition" then Seven() if OSDetect =
"Microsoft Windows 7 Ultimate" then Seven() if OSDetect = "Microsoft Windows
7 Ultimate Edition" then Seven() if OSDetect = "Microsoft Windows Server 2003
Standard" then XP() if OSDetect = "Microsoft Windows Server 2008 Standard"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Standard Edition"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise" then
Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise Edition" then
Seven() if OSDetect <> "Microsoft Windows Server 2008 Enterprise" then XP()
WScript.Quit(0)
'W I N D O W S X P Sub XP on error resume next
DIM objShell Set objShell = CreateObject("WScript.Shell") objShell.Run
"cmd /c net stop wuauserv",0,True 'Uninstall Err.Number = objShell.Run
("c:\windows\system32\msiexec.exe /qn /x
"&CHR(34)&"{148D9D03-5D23-4D4F-B5D0-BA6030C45DCF}"&CHR(34)&" /qn
/norestart",0,True) objShell.Run "cmd /c net start wuauserv",0,True if
Err.Number = 3010 then Err.Number = 0 WScript.Quit(Err.Number) End Sub
'W I N D O W S 7 Sub SEVEN() on error resume next DIM objShell
Set objShell = CreateObject("WScript.Shell") objShell.Run "cmd /c net stop
wuauserv",0,True 'Uninstall Err.Number = objShell.Run
("c:\windows\system32\msiexec.exe /qn /x
"&CHR(34)&"{148D9D03-5D23-4D4F-B5D0-BA6030C45DCF}"&CHR(34)&" /qn
/norestart",0,True) objShell.Run "cmd /c net start wuauserv",0,True if
Err.Number = 3010 then Err.Number = 0 WScript.Quit(Err.Number) End Sub . ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Tuesday, November 9th 2010
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
Δ
Shockwave
11.5.9.615 Deployment
How to deploy shockwave to your enterprise
VBScript Install - to be sent via LANDesk, Prism, WinInstall or utilized by technician:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
' ----- ExeScript Options Begin ----- ' ScriptType: window,highest '
DestDirectory: C:\WINDOWS\system32 ' Icon:
c:\windows\system32\shell32.dll,162 ' File:
C:\WINDOWS\system32\sw_lic_full_installer.msi ' OutputFile:
C:\temp\Shockwave_11.5.9.615.exe ' CompanyName: Elite Solutions '
FileDescription: Shockwave 11.5.9.615 ' FileVersion: 1.0.0.1 '
LegalCopyright: Elite Solutions ' ProductName: Shockwave Player 11.5.9.615
' ProductVersion: 1.0.0.1 ' ----- ExeScript Options End ----- '::
******************************************************************************
':: SCRIPT LANGUAGE: VBScript ':: SCRIPT NAME: ShockwaveInstall.vbs '::
PURPOSE: To be used to Install Shockwave Player 11.5.9.615 ':: CREATION DATE:
11/09/2010 ':: LAST MODIFIED: ':: DIRECTIONS: Send to client workstation
':: AUTHOR: Eddie Jackson ':: EMAIL: MrNetTek2000@yahoo.com '::
*****************************************************************************
On error resume next Dim strComputer, OSDetect, objWMIService,
colInstances
'SET WORKSTATION NAME - PRIMARY METHOD strComputer = "."
'SET WORKSTATION NAME - SECONDARY METHOD if strComputer = "" then on
error resume next Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName end if
'SET WORKSTATION NAME -
TERTIARY METHOD if strComputer = "" then on error resume next
strComputer = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) end if
'ENABLED'PRIMARY OS DETECTION Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject(
"winmgmts://" & strComputer & "/root/CIMV2" ) Set colInstances =
objWMIService.ExecQuery( "SELECT * FROM Win32_OperatingSystem", "WQL",
wbemFlagReturnImmediately + wbemFlagForwardOnly )
For Each objInstance In
colInstances 'msgbox objInstance.Caption OSDetect = objInstance.Caption
Next
OSDetect = trim(OSDetect) 'msgbox OSDetect
if OSDetect =
"Microsoft Windows XP Professional" then XP() if OSDetect = "Microsoft
Windows XP" then XP() if OSDetect = "Microsoft Windows XP Home" then XP()
if OSDetect = "Microsoft Windows 7 Enterprise" then Seven() if OSDetect =
"Microsoft Windows 7 Enterprise Edition" then Seven() if OSDetect =
"Microsoft Windows 7 Ultimate" then Seven() if OSDetect = "Microsoft Windows
7 Ultimate Edition" then Seven() if OSDetect = "Microsoft Windows Server 2003
Standard" then XP() if OSDetect = "Microsoft Windows Server 2008 Standard"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Standard Edition"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise" then
Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise Edition" then
Seven() if OSDetect <> "Microsoft Windows Server 2008 Enterprise" then XP()
WScript.Quit(0)
'W I N D O W S X P Sub XP on error resume next
DIM objShell Set objShell = CreateObject("WScript.Shell") objShell.Run
"%comspec% /c net stop wuauserv",0,True 'Install objShell.Run
"%comspec% /c c:\windows\system32\msiexec.exe /x
"&CHR(34)&"{3B834B54-EC4B-48E2-BFC6-03FF5DA06F62}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{D8DFA46A-39F7-4368-810D-18AFCFDDAEAF}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{9A9F7268-3899-4443-B071-B332493925AA}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{AD72CFB4-C2BF-424E-9DF0-C7BAD1F30A11}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{211E8730-5681-49ED-BC6A-78C9F88E95F5}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{A12B58D4-B9F9-4719-82A5-495C270102E7}"&CHR(34)&" /qn
/norestart",0,True
objShell.Run "%comspec% /c copy /v /y
sw_lic_full_installer.msi %windir%\system32",0,True Err.Number = objShell.Run
("%comspec% /c c:\windows\system32\msiexec.exe /i
"&CHR(34)&"sw_lic_full_installer.msi"&CHR(34)&" /qn /norestart",0,True)
objShell.Run "%comspec% /c net start wuauserv",0,True if Err.Number = 3010
then Err.Number = 0 WScript.Quit(Err.Number) WScript.Quit(0) End Sub
'W I N D O W S 7 Sub SEVEN() on error resume next DIM objShell
Set objShell = CreateObject("WScript.Shell") objShell.Run "%comspec% /c net
stop wuauserv",0,True 'Install objShell.Run "%comspec% /c
c:\windows\system32\msiexec.exe /x
"&CHR(34)&"{3B834B54-EC4B-48E2-BFC6-03FF5DA06F62}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{D8DFA46A-39F7-4368-810D-18AFCFDDAEAF}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{9A9F7268-3899-4443-B071-B332493925AA}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{AD72CFB4-C2BF-424E-9DF0-C7BAD1F30A11}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{211E8730-5681-49ED-BC6A-78C9F88E95F5}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{A12B58D4-B9F9-4719-82A5-495C270102E7}"&CHR(34)&" /qn
/norestart",0,True
objShell.Run "%comspec% /c copy /v /y
sw_lic_full_installer.msi %windir%\system32",0,True Err.Number = objShell.Run
("%comspec% /c c:\windows\system32\msiexec.exe /i
"&CHR(34)&"sw_lic_full_installer.msi"&CHR(34)&" /qn /norestart",0,True)
objShell.Run "%comspec% /c net start wuauserv",0,True if Err.Number = 3010
then Err.Number = 0 WScript.Quit(Err.Number) WScript.Quit(0) End Sub ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
VBScript Uninstall - to be sent via LANDesk, Prism, WinInstall or utilized
by technician:
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
' ----- ExeScript Options Begin ----- ' ScriptType: window,highest '
DestDirectory: temp ' Icon: C:\WINDOWS\system32\shell32.dll,131 '
OutputFile: C:\temp\Shockwave_11.5.9.615 Uninstall.exe ' CompanyName: Elite
Solutions ' FileDescription: Shockwave Player 11.5.9.615 ' FileVersion:
1.0.0.1 ' LegalCopyright: Elite Solutions ' ProductName: Shockwave Player
11.5.9.615 ' ProductVersion: 1.0.0.1 ' ----- ExeScript Options End -----
'::
******************************************************************************
':: E L I T E S O L U T I O N S ':: SCRIPT LANGUAGE: VBScript ':: SCRIPT NAME: ShockwaveUnInstall.vbs '::
PURPOSE: To be used to UnInstall Shockwave Player 11.5.9.615 ':: CREATION
DATE: 11/09/2010 ':: LAST MODIFIED: ':: DIRECTIONS: Send to client
workstation ':: AUTHOR: Eddie Jackson ':: EMAIL: MrNetTek2000@yahoo.com
'::
*****************************************************************************
On error resume next Dim strComputer, OSDetect, objWMIService,
colInstances
'SET WORKSTATION NAME - PRIMARY METHOD strComputer = "."
'SET WORKSTATION NAME - SECONDARY METHOD if strComputer = "" then on
error resume next Set wshNetwork = WScript.CreateObject( "WScript.Network" )
strComputer = wshNetwork.ComputerName end if
'SET WORKSTATION NAME -
TERTIARY METHOD if strComputer = "" then on error resume next
strComputer = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) end if
'ENABLED'PRIMARY OS DETECTION Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject(
"winmgmts://" & strComputer & "/root/CIMV2" ) Set colInstances =
objWMIService.ExecQuery( "SELECT * FROM Win32_OperatingSystem", "WQL",
wbemFlagReturnImmediately + wbemFlagForwardOnly )
For Each objInstance In
colInstances 'msgbox objInstance.Caption OSDetect = objInstance.Caption
Next
OSDetect = trim(OSDetect) 'msgbox OSDetect
if OSDetect =
"Microsoft Windows XP Professional" then XP() if OSDetect = "Microsoft
Windows XP" then XP() if OSDetect = "Microsoft Windows XP Home" then XP()
if OSDetect = "Microsoft Windows 7 Enterprise" then Seven() if OSDetect =
"Microsoft Windows 7 Enterprise Edition" then Seven() if OSDetect =
"Microsoft Windows 7 Ultimate" then Seven() if OSDetect = "Microsoft Windows
7 Ultimate Edition" then Seven() if OSDetect = "Microsoft Windows Server 2003
Standard" then XP() if OSDetect = "Microsoft Windows Server 2008 Standard"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Standard Edition"
then Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise" then
Seven() if OSDetect = "Microsoft Windows Server 2008 Enterprise Edition" then
Seven() if OSDetect <> "Microsoft Windows Server 2008 Enterprise" then XP()
WScript.Quit(0)
'W I N D O W S X P Sub XP on error resume next
DIM objShell Set objShell = CreateObject("WScript.Shell") objShell.Run
"cmd /c net stop wuauserv",0,True 'Uninstall objShell.Run
"%comspec% /c c:\windows\system32\msiexec.exe /x
"&CHR(34)&"{3B834B54-EC4B-48E2-BFC6-03FF5DA06F62}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{D8DFA46A-39F7-4368-810D-18AFCFDDAEAF}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{9A9F7268-3899-4443-B071-B332493925AA}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{AD72CFB4-C2BF-424E-9DF0-C7BAD1F30A11}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{211E8730-5681-49ED-BC6A-78C9F88E95F5}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{A12B58D4-B9F9-4719-82A5-495C270102E7}"&CHR(34)&" /qn
/norestart",0,True
Err.Number = objShell.Run
("c:\windows\system32\msiexec.exe /qn /x
"&CHR(34)&"{ECCA150B-31A5-412E-B8D0-4CB5DDA900D3}"&CHR(34)&" /qn
/norestart",0,True) objShell.Run "cmd /c net start wuauserv",0,True if
Err.Number = 3010 then Err.Number = 0 WScript.Quit(Err.Number) End Sub
'W I N D O W S 7 Sub SEVEN() on error resume next DIM objShell
Set objShell = CreateObject("WScript.Shell") objShell.Run "cmd /c net stop
wuauserv",0,True 'Uninstall objShell.Run "%comspec% /c
c:\windows\system32\msiexec.exe /x
"&CHR(34)&"{3B834B54-EC4B-48E2-BFC6-03FF5DA06F62}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{D8DFA46A-39F7-4368-810D-18AFCFDDAEAF}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{9A9F7268-3899-4443-B071-B332493925AA}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{AD72CFB4-C2BF-424E-9DF0-C7BAD1F30A11}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{211E8730-5681-49ED-BC6A-78C9F88E95F5}"&CHR(34)&" /qn
/norestart",0,True objShell.Run "%comspec% /c c:\windows\system32\msiexec.exe
/x "&CHR(34)&"{A12B58D4-B9F9-4719-82A5-495C270102E7}"&CHR(34)&" /qn
/norestart",0,True
Err.Number = objShell.Run
("c:\windows\system32\msiexec.exe /qn /x
"&CHR(34)&"{ECCA150B-31A5-412E-B8D0-4CB5DDA900D3}"&CHR(34)&" /qn
/norestart",0,True) objShell.Run "cmd /c net start wuauserv",0,True if
Err.Number = 3010 then Err.Number = 0 WScript.Quit(Err.Number) End Sub ![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp)
|
![bar1](http://eddiejackson.net/web_images/lightgraybar.bmp) |