|
|
|
| Доброе утро!
Есть файл wdreg.exe
в досе я его запускаю вот так вот wdreg -name "ntf" -file ntf remove
как мне его запустить на vb с такими же параметрами
Спасибо! | |
|
| |
|
|
|
|
| да я знаю что shell а как параметры запуска указать? | |
|
| |
|
|
|
| из API
ShellExecute
VB Declaration
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)
Description
Finds the file name of the program that is associated with a specified file and either runs the program for the file or prints the file. The Windows registration editor can be used to associate types of files with particular applications. For example, text files that have the extension .TXT are typically associated with the Windows Notepad (NOTEPAD.EXE). Specifying any file with the .TXT extension to this function will either launch the Notepad program using the file name as a parameter, or will print the specified file.
Use with VB
No problem.
Parameter Type/Description
hwnd Long—A handle to a window. Sometimes it is necessary for a Windows application to show a message box before it has created its own main window. If this occurs, the window specified by this parameter will be used as the parent window of the message box. Under Visual Basic you would usually use the window handle of the active form for this parameter.
lpOperation String—The string “Open” to open the lpFile document or “Print” to print it. This may be vbNullString to default to “Open.”
lpFile String—A program name or the name of a file to print or open using the associated program.
lpParameters String—A string containing parameters to pass to the executable file if lpszFile is an executable file. vbNullString if lpszFile refers to a document file or if no parameters are used.
lpDirectory String—The full path of the default directory to use.
nShowCmd Long—A constant value specifying how to show the launched program. This matches the nCmdShow parameter to the ShowWindow API function described in Chapter 5.
Return Value
Long—Greater than 32 on success. Refer to the description of the FindExecutable function for a list of error codes.
All of the material presented here is copyrighted by either Desaware or Macmillan. No part of this material may be used or reproduced in any fashion (except in brief quotations used in critical articles and reviews) without prior consent.
|
| |
|
| |
|
|
|
| а как то по подробнее нельзя? код как запустить файл с параметрами?
Спасибо | |
|
| |