Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Scripting / February 2008

Tip: Looking for answers? Try searching our database.

activeds.dll woes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick - 06 Feb 2008 15:11 GMT
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
   & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
   ("Select * from Win32_OperatingSystem")
Set filesys = CreateObject("Scripting.FileSystemObject")
path = filesys.GetAbsolutePathName("c:\windows\system32\aexswdinstsvc.exe")
path2 = filesys.GetAbsolutePathName("c:\windows\system32\aexnsc.log")
For Each objOperatingSystem in colSettings
   OS = objOperatingSystem.Name
   OS_Version = objOperatingSystem.Version
   OS_SP = objOperatingSystem.ServicePackMajorVersion & "." &
objOperatingSystem.ServicePackMinorVersion
Next

os_split = split(os, "|")
os = os_split(0)
wscript.echo "os: " & OS
Main()

sub Main
    if os = "Microsoft Windows XP Professional" then
        Exists = filesys.FileExists(path)
        If Exists <> "True" Then
            Copy()
        End If
        Exists2 = filesys.FileExists(path2)
        if Exists2 = "True" then
            exit sub
        end if
        Install()
        wscript.echo "Made it here 1"
       
    end if
End Sub

SUB Install
    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run "c:\windows\system32\aexswdinstsvc.exe -u
'http://netalp1/Altiris/ns/nscap/bin/win32/x86/ns client package/aexnsc.exe'
-s netalp1.pd.com -w http://netalp1/Altiris -NOSTARTMENU -NOTRAYICON"
    wscript.echo "Made it here 3"
End Sub

sub Copy
    wscript.echo "Made it here 2"
    strFilePath = "\\netalp1\nscap\Bin\Win32\X86\aexswdinstsvc.exe"
    strDestination ="c:\windows\system32\aexswdinstsvc.exe"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFileCopy = objFSO.GetFile(strFilePath)
    objFileCopy.Copy (strDestination)
End Sub
Patrick - 06 Feb 2008 15:13 GMT
Sorry, I posted in this newsgroup twice, see "activeds.dll error" thread for
information.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.