I have a .dll I need to automatically install using vb for access. Basically, it looks to see if the .dll exists and if it doesn't it triggers the installation. My problem is, that I have both Windows XP Pro and Windows 2000 Pro operating systems on my client pc's.
I need the code to detect either the operating system, or the root directory (C:\winnt for 2000 machines versus c:\windows for XP), so that I can put the .dll in the system32 folder.
Dim objFSO As Object
'Create objFSO and objIE objects
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Determine path to hosts and set strHostsPath to correct path
Dim bFolder, strHostsPath
bFolder = objFSO.folderExists("C:\WINDOWS\system32")
If bFolder = False Then
strHostsPath = "C:\WINNT\system32"
strHostsPath = "C:\WINDOWS\system32"