ik gebruik de volgende code om een programma bij het opstarten in de windows system directoy te krijgen:
en daarbij haal ik de system dir met deze funtie:
op mijn windows 2000 werkt dit perfect, maar op windows 98 geeft hij de error:
Runtime Error "53"
"file not found"
hoe kan ik dit verhelpen?!
Visual Basic:
1
| FileCopy App.Path & App.EXEName & ".exe", GetSystemDirectory & "blaat.exe" |
en daarbij haal ik de system dir met deze funtie:
Visual Basic:
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
| Private Declare Function GetSystemDirectoryA Lib "kernel32" _ (ByVal lpBuffer As String, ByVal nSize As Long) As Long Public Function GetSystemDirectory() As String Dim s As String Dim i As Integer i = GetSystemDirectoryA("", 0) s = Space(i) Call GetSystemDirectoryA(s, i) s = Strings.Left$(s, i - 1) If Len(s) > 0 Then If Right$(s, 1) <> "\" Then GetSystemDirectory = s + "\" Else GetSystemDirectory = s End If Else GetSystemDirectory = "\" End If End Function |
op mijn windows 2000 werkt dit perfect, maar op windows 98 geeft hij de error:
Runtime Error "53"
"file not found"
hoe kan ik dit verhelpen?!
Computers ain't that smart, Whatever man built could be taken apart