prøv den her... kan ikke afprøve den har ikke winxp..
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" ( _ ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long
Private Sub Form_Load() Dim strFile As String Dim strParameter As String
strFile = "C:\WINDOWS\system32\defrag.exe" strParameter = "C: -f > C:\DefragLogC.txt" ShellExecute Me.hwnd, vbNullString, strFile, strParameter, vbNullString, vbNormalFocus End Sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.