[xp] xp sluit programma's niet (altijd) af

Pagina: 1
Acties:

  • SkyKnife
  • Registratie: Oktober 2001
  • Laatst online: 21-03 01:12
Velen kennen dit probleem vast wel, XP die processes niet goed sluit.

In mijn geval is het voornamelijk "hl.exe" (half-life/counter-strike).
Intussen heeft iemand vast een oplossing? (ja ik heb gezocht btw, van adje mag nieuw topic)

  • SkyKnife
  • Registratie: Oktober 2001
  • Laatst online: 21-03 01:12
Het probleem is de 'compatibility mode' van XP. Ik heb het kunnen oplossen door een 'hl.vbs' file te maken. Volgende stuk code is de inhoud:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
'version v0.05 (rc)
'author: Wired (#wired on quakenet)
'

Dim hlExecPath, staticArgs, cmdLineArgs, HLcmdLine

'-----Settings--------------------------------------------------------
'add any static args here
'---------------------------------------------------------------------
    staticArgs = "-toconsole -noipx -noforcemparms -noforcemaccel -noforcemspd" 
'---------------------------------------------------------------------


'-----This Function Reads The Install Path from HL out of registry-----
function readHLInstallPath ()
    Dim WshShell
    Set WshShell = WScript.CreateObject("WScript.Shell")

    readHLInstallPath = WshShell.RegRead("HKEY_CURRENT_USER\Software\Valve\Half-Life\InstallPath")
end function
'-----

'-----This Function puts all commandline arguments into 1 string-----
function readCmdLineArgs ()
    Dim objArgs, argString
    Set objArgs = WScript.Arguments

    argString = ""

    For I = 0 to objArgs.Count - 1
      argString = argString &" "& objArgs(I)
    Next

    readCmdLineArgs = argString

end function
'-----

sub runHL ()
    Dim WshShell, oExec

    Set WshShell = CreateObject("WScript.Shell")

    Set oExec = WshShell.Exec( HLcmdLine )

    WScript.Echo ( "Quit HL" )

    If ( oExec.Status = 0 ) Then
        oExec.Terminate
        'WScript.Echo ( "KILLED" )
    End If
end sub
'-----


'-----Main Program
hlExecPath = readHLInstallPath() & "\hl.exe"
cmdLineArgs = readCmdLineArgs()

HLcmdLine = hlExecPath &" "& cmdLineArgs &" "& staticArgs 

runHL ()

WScript.Quit()
'-----


zoek termen: Half-Life Counter-Strike hl.exe ghost process killer XP compatibility mode