Zum Inhalt springen

arcdps autobat


Empfohlene Beiträge

Hab das bei mir gerade mal umgebaut und erfolgreich getestet.

 

Die d3d9.dll muss im .ps1 Skript überall in d3d11.dll umbenannt werden (geht über Suchen und Ersetzen).

--> Hast du ja schon gemacht.

 

Es muss dann noch an drei Stellen im Skript ein Pfad geändert werden, da die d3d11.dll ja nicht im Unterverzeichnis \bin64 sondern direkt im Hauptverzeichnis abgelegt werden muss.

Die Stellen habe ich nachfolgend fett markiert, du kannst aber auch einfach die komplette Zeile jeweils kopieren und austauschen.

 

Zeile 47    $Web.DownloadFile("https://www.deltaconnected.com/arcdps/x64/d3d11.dll", $Path+"\d3d11.dll") # Download and save the ArcDPS dll.
Zeile 52    if ((Test-Path ($Path+"\bin64\Last modified ArcDPS.txt")) -and (Test-Path ($Path+"\d3d11.dll"))) {
Zeile 81    } elseif (Test-Path ($Path+"\d3d11.dll")) {    

  • Like 2
Link zu diesem Kommentar
Auf anderen Seiten teilen

ah, das hört sich super an!
ich komm allerdings null weiter.
Da stehen nur haufenweise javascript pfade drin, aber nichts von dem was Du notiert hast 😞

 

https://www.deltaconnected.com/arcdps/x64/d3d11.dll hab ich gefunden aber, zeile 1500 tralala aber da steht einfach nichts weiter von dem was du oben schreibst.

Kannst du die Datei evtl, hier hochladen?

 

Link zu diesem Kommentar
Auf anderen Seiten teilen

Hochladen kann ich die Datei leider nicht, das Forum bietet die Möglichkeit soweit ich weiß nicht.

 

Du kannst die Datei aber auch einfach neu herunterladen (den Link hast du oben ja schon genannt).

Unter deinem Link kannst du über den grünen Button "Code" auf "Download Zip" gehen. Dort ist dann einmal die Batchdatei zum Starten und auch das Powershell Skript drin, welches du dann noch wie von mir vorher beschrieben anpassen musst.

 

Javascript sehe ich bei mir gar nicht. Meine Datei hat 118 Zeilen.

 

Hier der direkte Downloadlink für die oben erwähnte .zip Datei.

https://github.com/PTigris/AutoUpdateArcDPS/archive/refs/heads/master.zip

Link zu diesem Kommentar
Auf anderen Seiten teilen

ich habs!

keine Ahnung was da passiert ist, ich hab nochmal das zip neu runtergeladen und die ps1 nochmal geändert. jetzt funzt es^^

 

Für die dx11er mit demselben Problem versuch ichs  mal mit dem Inhalt zum Kopieren/Austauschen in der .ps1

 

Zitat

# This script is created by Panthera Tigris.

$ReadTime = 0
$Path = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition) # Installation path of Guild Wars 2, where Gw2-64.exe is hiding.
$Web = New-Object Net.WebClient # Get ley line thingy.
# Get last modified date and time:
"Getting last modified date and time from www.deltaconnected.com"
$ReadTime = $ReadTime+3
$WebPage = "https://www.deltaconnected.com/arcdps/x64"
$Text = ""
$ValidPage = $true
try { # Try in case there is a problem.
    $Text = $web.DownloadString($WebPage) #Dowload this page in text.
}
catch {
    "Cannot find web page: "+$WebPage
    $ReadTime = $ReadTime+5
    $ValidPage = $false
}

$WrongFolder = $false
$GuildWarsRunning = Get-Process "Gw2-64" -ErrorAction SilentlyContinue

if ($ValidPage) {
    $Pos1 = $Text.IndexOf("d3d11.dll") #Find d3d11.dll
    $Pos2 = $Pos1
    while ($Pos1 -notlike -1) {
        if (($Text.Substring($Pos1+8,1) -notlike ".")) {$Pos2 = $Pos1}
        $Pos1 = $Text.IndexOf("d3d11.dll",$Pos1+1)
    }
    $SpacePos1 = $Text.IndexOf('indexcollastmod">',$Pos2+8)+17 # Find start of date & time.
    while ($Text.Substring($SpacePos1,1) -like " ") {$SpacePos1 = $SpacePos1+1} # Skip all the spaces to get our first year number. *This was needed in older web page.
    $DashPos1 = $Text.IndexOf("-",$SpacePos1)+1 # Dash between year and month.
    $DashPos2 = $Text.IndexOf("-",$DashPos1)+1 # Dash between month and day.
    $SpacePos2 = $Text.IndexOf(" ",$DashPos2)+1 # Space between day and hour.
    $ColonPos = $Text.IndexOf(":",$SpacePos2)+1 # Colon between hour and minutes.
    #Take the numbers out and make it nice again:
    $DateTime = $Text.Substring($SpacePos1,($DashPos1-1)-$SpacePos1)+"-"+$Text.Substring($DashPos1,($DashPos2-1)-$DashPos1)+"-"+$Text.Substring($DashPos2,($SpacePos2-1)-$DashPos2)+" "+$Text.Substring($SpacePos2,($ColonPos-1)-$SpacePos2)+":"+$Text.Substring($ColonPos,$Text.IndexOf(" ",$ColonPos)-$ColonPos)

    "Last modified date and time is "+$DateTime
    $ReadTime = $ReadTime+3

    # If bin64 folder exists:
    if (Test-Path ($Path+"\bin64")) {
        function Instal {
            $DateTime | Out-File -FilePath ($Path+"\bin64\Last modified ArcDPS.txt") # Save the date and time in this text file.
            $Web.DownloadFile("https://www.deltaconnected.com/arcdps/x64/d3d11.dll", $Path+"\bin64\d3d11.dll") # Download and save the ArcDPS dll.
            [system.media.systemsounds]::Exclamation.play() # Play a sound for a new ArcDPS dll.
        }
        
        # If both files are pressent:
        if ((Test-Path ($Path+"\bin64\Last modified ArcDPS.txt")) -and (Test-Path ($Path+"\bin64\d3d11.dll"))) {
            $File = new-object System.IO.StreamReader($Path+"\bin64\Last modified ArcDPS.txt") # Read "Last modified ArcDPS.txt" to get the last modified date and time of the installed version.
            $DateTimeFile = $File.ReadLine()
            $File.close()
            "Date and time last modified of the installed version is "+$DateTimeFile
            $ReadTime = $ReadTime+3
            if ($DateTime -notlike $DateTimeFile) { # If the modification date is not the same:
                "There is a new version of ArcDPS."
                $ReadTime = $ReadTime+2
                if ($GuildWarsRunning) {
                    "Cannot install new version of ArcDPS while Guild Wars 2 is running."
                    $ReadTime = $ReadTime+3
                } else {
                    Instal # Call Instal function.
                    "New version installed."
                    $ReadTime = $ReadTime+2
                }
                # When there is no new version:
            } else {
                "There is no newer version of ArcDPS."
                $ReadTime = $ReadTime+2
            }
        } else { # If DateTime file and/or d3d11.dll are not present:
            if ($GuildWarsRunning) {
                "Cannot install while Guild Wars 2 is running."
                $ReadTime = $ReadTime+2
            } else {
                if (Test-Path ($Path+"\bin64\Last modified ArcDPS.txt")) {
                    'Cannot find "d3d11.dll", installing...'
                } elseif (Test-Path ($Path+"\bin64\d3d11.dll")) {
                    'Cannot find "Last modified ArcDPS.txt". Welcome to AutoUpdateArcDPS!'
                } else {
                    '"Last modified ArcDPS.txt" and d3d11.dll are not present. Welcome to ArcDPS! Installing...'
                }
                $ReadTime = $ReadTime+3
                Instal # Call Instal function.
                "Installation complete."
                $ReadTime = $ReadTime+2
            }
        }
    } else {
        "Cannot find bin64 folder."
        $ReadTime = $ReadTime+3
        $WrongFolder = $true
    }
}

if (!$GuildWarsRunning) {
    # If Gw2-64.exe exists:
    if (Test-Path ($Path+"\Gw2-64.exe")) {
        "Starting Guild Wars 2"
        $ReadTime = $ReadTime+2
        & ($Path+"\Gw2-64.exe") # Run Guild Wars 2.
    } else {
        'Cannot find "Gw2-64.exe".'
        $ReadTime = $ReadTime+3
        $WrongFolder = $true
    }
}

if ($WrongFolder) {
    'Place "AutoUpdateArcDPS.bat" and "AutoUpdateArcDPS.ps1" in the same folder where "Gw2-64.exe" is, your Guild Wars 2 installation folder.'
    $ReadTime = $ReadTime+4
}

"This window closes automatically after "+$ReadTime+" seconds."
Sleep $ReadTime

 

Link zu diesem Kommentar
Auf anderen Seiten teilen

Du legst im zitierten Skript die d3d11.dll im \bin64 Verzeichnis ab, die muss aber im Hauptverzeichnis abgelegt werden (die d3d9.dll hingegen im  \bin64 Verzeichnis) 🙂

Ich poste dann auch mal das komplette Skript für die d3d11.dll (die drei Stellen, wo der Pfad geändert werden muss, sind dort in Fett markiert, das passt für die d3d11.dll aber so wie es dort steht):

 

Spoiler

 

# This script is created by Panthera Tigris.

$ReadTime = 0
$Path = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition) # Installation path of Guild Wars 2, where Gw2-64.exe is hiding.
$Web = New-Object Net.WebClient # Get ley line thingy.
# Get last modified date and time:
"Getting last modified date and time from www.deltaconnected.com"
$ReadTime = $ReadTime+3
$WebPage = "https://www.deltaconnected.com/arcdps/x64"
$Text = ""
$ValidPage = $true
try { # Try in case there is a problem.
    $Text = $web.DownloadString($WebPage) #Dowload this page in text.
}
catch {
    "Cannot find web page: "+$WebPage
    $ReadTime = $ReadTime+5
    $ValidPage = $false
}

$WrongFolder = $false
$GuildWarsRunning = Get-Process "Gw2-64" -ErrorAction SilentlyContinue

if ($ValidPage) {
    $Pos1 = $Text.IndexOf("d3d11.dll") #Find d3d11.dll
    $Pos2 = $Pos1
    while ($Pos1 -notlike -1) {
        if (($Text.Substring($Pos1+8,1) -notlike ".")) {$Pos2 = $Pos1}
        $Pos1 = $Text.IndexOf("d3d11.dll",$Pos1+1)
    }
    $SpacePos1 = $Text.IndexOf('indexcollastmod">',$Pos2+8)+17 # Find start of date & time.
    while ($Text.Substring($SpacePos1,1) -like " ") {$SpacePos1 = $SpacePos1+1} # Skip all the spaces to get our first year number. *This was needed in older web page.
    $DashPos1 = $Text.IndexOf("-",$SpacePos1)+1 # Dash between year and month.
    $DashPos2 = $Text.IndexOf("-",$DashPos1)+1 # Dash between month and day.
    $SpacePos2 = $Text.IndexOf(" ",$DashPos2)+1 # Space between day and hour.
    $ColonPos = $Text.IndexOf(":",$SpacePos2)+1 # Colon between hour and minutes.
    #Take the numbers out and make it nice again:
    $DateTime = $Text.Substring($SpacePos1,($DashPos1-1)-$SpacePos1)+"-"+$Text.Substring($DashPos1,($DashPos2-1)-$DashPos1)+"-"+$Text.Substring($DashPos2,($SpacePos2-1)-$DashPos2)+" "+$Text.Substring($SpacePos2,($ColonPos-1)-$SpacePos2)+":"+$Text.Substring($ColonPos,$Text.IndexOf(" ",$ColonPos)-$ColonPos)

    "Last modified date and time is "+$DateTime
    $ReadTime = $ReadTime+3

    # If bin64 folder exists:
    if (Test-Path ($Path+"\bin64")) {
        function Instal {
            $DateTime | Out-File -FilePath ($Path+"\bin64\Last modified ArcDPS.txt") # Save the date and time in this text file.
            $Web.DownloadFile("https://www.deltaconnected.com/arcdps/x64/d3d11.dll", $Path+"\d3d11.dll") # Download and save the ArcDPS dll.
            [system.media.systemsounds]::Exclamation.play() # Play a sound for a new ArcDPS dll.
        }
        
        # If both files are pressent:
        if ((Test-Path ($Path+"\bin64\Last modified ArcDPS.txt")) -and (Test-Path ($Path+"\d3d11.dll"))) {
            $File = new-object System.IO.StreamReader($Path+"\bin64\Last modified ArcDPS.txt") # Read "Last modified ArcDPS.txt" to get the last modified date and time of the installed version.
            $DateTimeFile = $File.ReadLine()
            $File.close()
            "Date and time last modified of the installed version is "+$DateTimeFile
            $ReadTime = $ReadTime+3
            if ($DateTime -notlike $DateTimeFile) { # If the modification date is not the same:
                "There is a new version of ArcDPS."
                $ReadTime = $ReadTime+2
                if ($GuildWarsRunning) {
                    "Cannot install new version of ArcDPS while Guild Wars 2 is running."
                    $ReadTime = $ReadTime+3
                } else {
                    Instal # Call Instal function.
                    "New version installed."
                    $ReadTime = $ReadTime+2
                }
                # When there is no new version:
            } else {
                "There is no newer version of ArcDPS."
                $ReadTime = $ReadTime+2
            }
        } else { # If DateTime file and/or d3d11.dll are not present:
            if ($GuildWarsRunning) {
                "Cannot install while Guild Wars 2 is running."
                $ReadTime = $ReadTime+2
            } else {
                if (Test-Path ($Path+"\bin64\Last modified ArcDPS.txt")) {
                    'Cannot find "d3d11.dll", installing...'
                } elseif (Test-Path ($Path+"\d3d11.dll")) {
                    'Cannot find "Last modified ArcDPS.txt". Welcome to AutoUpdateArcDPS!'
                } else {
                    '"Last modified ArcDPS.txt" and d3d11.dll are not present. Welcome to ArcDPS! Installing...'
                }
                $ReadTime = $ReadTime+3
                Instal # Call Instal function.
                "Installation complete."
                $ReadTime = $ReadTime+2
            }
        }
    } else {
        "Cannot find bin64 folder."
        $ReadTime = $ReadTime+3
        $WrongFolder = $true
    }
}

if (!$GuildWarsRunning) {
    # If Gw2-64.exe exists:
    if (Test-Path ($Path+"\Gw2-64.exe")) {
        "Starting Guild Wars 2"
        $ReadTime = $ReadTime+2
        & ($Path+"\Gw2-64.exe") # Run Guild Wars 2.
    } else {
        'Cannot find "Gw2-64.exe".'
        $ReadTime = $ReadTime+3
        $WrongFolder = $true
    }
}

if ($WrongFolder) {
    'Place "AutoUpdateArcDPS.bat" and "AutoUpdateArcDPS.ps1" in the same folder where "Gw2-64.exe" is, your Guild Wars 2 installation folder.'
    $ReadTime = $ReadTime+4
}

"This window closes automatically after "+$ReadTime+" seconds."
Sleep $ReadTime

 

 

 

Link zu diesem Kommentar
Auf anderen Seiten teilen

Erstelle ein Benutzerkonto oder melde Dich an, um zu kommentieren

Du musst ein Benutzerkonto haben, um einen Kommentar verfassen zu können

Account erstellen

Erstelle einen neuen Account für unsere Community. Es ist einfach!

Neuen Account erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde Dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...