Login
|
Home
Infrastructure
Web Design
Telecom
Imaging
Design
iSite Enterprise 3.6.150 x86 .vbs
'Developed by David Magnaterra On Error Resume Next ' ' ' 'FSO constants Const ForReading = 1, ForWriting = 2, ForAppending = 8 'Registry Constants Const HKEY_CURRENT_USER = &H80000001 Const HKEY_LOCAL_MACHINE = &H80000002 Const HKEY_USERS = &H80000003 Set WshShell = WScript.CreateObject("WScript.Shell") Set objNetwork = WScript.CreateObject("WScript.Network") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Shell.Application") Set objArgs = wScript.Arguments Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") ScriptPath = Left(WScript.ScriptFullName, Len(WScript.ScriptFullName) - Len(WScript.ScriptName)) 'Constants for various directories to be used with GetPath function. Ref: http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_higv.mspx. Const cint_DIR_COMMON_PICTURES = &H36 'All Users' Image files. (%ALLUSERSPROFILE%\Documents\My Pictures). Const cint_DIR_COMMON_MUSIC = &H35 'All Users' Music files. (%ALLUSERSPROFILE%\Documents\My Music). Const cint_DIR_COMMON_VIDEO = &H37 'All Users' Video files. (%ALLUSERSPROFILE%\Documents\My Video). Const cint_DIR_COMMON_APPDATA = &H23 'All Users' Application Data. (%ALLUSERSPROFILE%\Application Data). Const cint_DIR_COMMON_DESKTOPDIRECTORY = &H19 'All Users' Desktop. (%ALLUSERSPROFILE%\Desktop). Const cint_DIR_COMMON_DOCUMENTS = &H2e 'All Users' Documents (Vista). (%PUBLIC%\Documents) Const cint_DIR_COMMON_FAVORITES = &H1f 'All Users' Favorite URLs. %ALLUSERSPROFILE%\Favorites). Does not work, redirected to User's Favorites in Vista. Const cint_DIR_COMMON_OEM_LINKS = &H3a 'All Users' links to OEM specific apps (Vista). (%ProgramData%\OEM Links) Const cint_DIR_COMMON_STARTMENU = &H16 'All Users' Start Menu. (%ALLUSERSPROFILE%\Start Menu). Const cint_DIR_COMMON_ADMINTOOLS = &H2f 'All Users' Start Menu. (%ALLUSERSPROFILE%\Start Menu\Administrative Tools). Const cint_DIR_COMMON_PROGRAMS = &H17 'All Users' Start Menu. (%ALLUSERSPROFILE%\Start Menu\Programs). Const cint_DIR_COMMON_STARTUP = &H18 'All Users' Start Menu. (%ALLUSERSPROFILE%\Start Menu\Startup). Const cint_DIR_COMMON_ALTSTARTUP = &H1e 'All Users' Startup program (Vista, nonlocalized). (%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup) Const cint_DIR_COMMON_TEMPLATES = &H2d 'All Users' Templates. (%ALLUSERSPROFILE%\Templates). Const cint_DIR_PROGRAM_FILES_COMMONX86 = &H2c 'Program components that are shared across applications (32bit programs on 64bit windows). (%ProgramFiles(x86)%\Common Files). Const cint_DIR_PROGRAM_FILES_COMMON = &H2b 'Program components that are shared across applications. (%ProgramFiles%\Common Files). Const cint_DIR_PROGRAM_FILESX86 = &H2a 'Program Files folder (32bit programs on 64bit windows). (%ProgramFiles(x86)%). Const cint_DIR_PROGRAM_FILES = &H26 'Program Files folder. (%ProgramFiles%). Const cint_DIR_SYSWOW64 = &H29 'System folder. (%WINDIR%\System32 or %WINDIR%\SysWOW64 ). Const cint_DIR_SYSTEM = &H25 'System folder. (%WINDIR%\System32). Const cint_DIR_RESOURCES_LOCALIZED = &H39 'Themes and other windows resources (Localized). (%WINDIR%\Resources\[LangID]). Const cint_DIR_RESOURCES = &H38 'Themes and other windows resources. (%WINDIR%\Resources\). Const cint_DIR_USER_CDBURN_AREA = &H3b 'User directory acting as a staging area for files waiting to be written to CD. (%USERPROFILE%\Local Settings\Application Data\Microsoft\CD Burning). Const cint_DIR_USER_NETHOOD = &H13 'User folder that contains any link objects in the My Network Places virtual folder. It is not the same as cint_DIR_NETWORK, which represents the network namespace root. (%USERPROFILE%\NetHood). Const cint_DIR_USER_PRINTHOOD = &H1b 'User folder that contains any link objects in the Printers virtual folder. It is not the same as cint_DIR_PRINTERS, which represents the network namespace root. (%USERPROFILE%\PrintHood). Const cint_DIR_USER_ADMINTOOLS = &H30 'User's Administrative Tools. (%USERPROFILE%\Start Menu\Programs\Administrative Tools). Const cint_DIR_USER_PICTURES = &H27 'User's Image files. (%USERPROFILE%\My Documents\My Pictures). Const cint_DIR_USER_MUSIC = &H0d 'User's Music files. (%USERPROFILE%\My Documents\My Music). Const cint_DIR_USER_RECENT = &H08 'User's Recently Used files. (%USERPROFILE%\Recent). Const cint_DIR_USER_SENDTO = &H09 'User's Send To menu. (%USERPROFILE%\SendTo). Const cint_DIR_USER_STARTMENU = &H0b 'User's Start Menu items. (%USERPROFILE%\Start Menu). Const cint_DIR_USER_PROGRAMS = &H02 'User's Start Menu\Programs items. (%USERPROFILE%\Start Menu\Programs). Const cint_DIR_USER_STARTUP = &H07 'User's Startup items. (%USERPROFILE%\Start Menu\Programs\Startup). Const cint_DIR_USER_TEMPLATES = &H15 'User's Template files. (%USERPROFILE%\Templates). Const cint_DIR_USER_VIDEO = &H0e 'User's Video files. (%USERPROFILE%\My Documents\My Video). Const cint_DIR_USER_APPDATA = &H1a 'User's Application Data. (%USERPROFILE%\Application Data). Const cint_DIR_USER_COOKIES = &H21 'User's Cookies. (%USERPROFILE%\Cookies). Const cint_DIR_USER_DESKTOP = &H10 'User's Desktop. (%USERPROFILE%\Desktop). Const cint_DIR_USER_DOCUMENTS = &H05 'User's Documents. (%USERPROFILE%\My Documents). Const cint_DIR_USER_FAVORITES = &H06 'User's Favorite URLs. (%USERPROFILE%\Favorites). Const cint_DIR_USER_HISTORY = &H22 'User's internet history. (%USERPROFILE%\History). Const cint_DIR_USER_LOCAL_APPDATA = &H1c 'User's Local Application Data. (%USERPROFILE%\Local Settings\Application Data). Const cint_DIR_USER_PROFILE = &H28 'User's Profile folder. (%USERPROFILE%) Const cint_DIR_USER_ALTSTARTUP = &H1d 'User's Startup program (Vista, nonlocalized). (%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup) Const cint_DIR_USER_INTERNET_CACHE = &H20 'User's Temporary Internet Files. (%USERPROFILE%\Local Settings\Temporary Internet Files). Const cint_DIR_FONTS = &H14 'Virtual folder containing fonts (actually a physical folder %WINDIR%\Fonts). Const cint_DIR_CONTROLS = &H03 'Virtual folder containing icons for the Control Panel. Const cint_DIR_PRINTERS = &H04 'Virtual folder containing installed Printers. Const cint_DIR_CONNECTIONS = &H31 'Virtual folder containing Network and Dial-up Connections. Const cint_DIR_BITBUCKET = &H0a 'Virtual folder containing the user's Recycle Bin. Const cint_DIR_COMPUTERSNEARME = &H3d 'Virtual folder representing Computers Near Me (Vista, computed from Workgroup membership). Const cint_DIR_DRIVES = &H11 'Virtual folder representing My Computer, containing everything on the local computer: storage devices, printers, and Control Panel. Const cint_DIR_NETWORK = &H12 'Virtual folder representing Network Neighborhood, the root of the network namespace hierarchy. Const cint_DIR_INTERNET = &H01 'Virtual folder representing the Internet. Const cint_DIR_DESKTOP = &H00 'Virtual folder representing the Windows desktop (actually a physical folder %USERPROFILE%\Desktop). Const cint_DIR_WINDOWS = &H24 'Windows directory. (%WINDIR% or %SYSTEMROOT%) Function GetPath(DirectoryConstant) 'Converts one of the above constants into a path string (no "\" on the end of the string e.g. "C:\Program Files"). 'Some of the constants commented as virtual will resolve as CLSID strings (e.g. cint_DIR_BITBUCKET = "::{0F256D3D-9A9C-47B5-0E9B-CCD43C645B0F}") Set objFolder = objShell.Namespace(DirectoryConstant) Set objFolderItem = objFolder.Self GetPath = objFolderItem.Path End Function Vergence = objFSO.FileExists(GetPath(cint_DIR_PROGRAM_FILES) & "\Sentillion\Vergence Authenticator\Authenticator.exe") 'Check for Vergence (Carelink). ' ' End KHN Standard VBS header. ' If Vergence Then killprocess "launchpad.exe" killprocess "authenticator.exe" killprocess "BridgeworksRuntime.exe" wscript.sleep "15000" End If popup = wshshell.popup(" The iSite Installation Is About To Begin. ", 5,"iSite PACS 3.6.150",vbSystemModal) popup = wshshell.popup(" Please Wait..... ", 5,"iSite PACS 3.6.150",vbSystemModal) Set WshShell = CreateObject("WScript.Shell") ' Uninstall iSite Enterprise WshShell.Run "msiexec /x {71468FDC-0662-41E4-1EB7-C6BB8072878F} /q",1,true Result = wshshell.run("msiexec.exe /qn REBOOT=ReallySuppress ALLUSERS=2 /i ""iSiteEnterprise.msi""", 0, True) Result = wshshell.run("msiexec.exe /qn REBOOT=ReallySuppress ALLUSERS=2 /i ""iSiteExt.msi""", 0, True) popup = wshshell.popup(" The iSite Installation Is Now Complete ", 5,"iSite PACS 3.6.150",vbSystemModal) objFSO.CopyFile ScriptPath & "iSite.ini", GetPath(cint_DIR_PROGRAM_FILES) & "\Philips\iSiteEnterprise\4.1\iSite.ini", True