|
-
Jan 10th, 2007, 09:20 PM
#1
Thread Starter
New Member
Shell command help
Hello all,
I am using the Shell command in VB6 to run some propriatiary dos programs on some files. For one of these programs, running the generated command string from the DOS prompt works but running that same command string with Shell dosen't work.
The following command works:
Generated string cmd =
sfconvert.exe --s2m "C:\Documents and Settings\My Name\My Documents\My Music\pddata-32007\CD Files\01 When We Dance.wav"
result = Shell(cmd, vbMinimizedNoFocus)
If result = 0 Then
MsgBox "Error: " & Format(result)
Else
hProcess = OpenProcess(&H100000, True, result)
WaitForSingleObject hProcess, -1
CloseHandle hProcess
End If
While a similar string dosen't work:
Generated string cmd =
sfcat.exe -o "C:\Documents and Settings\My Name\My Documents\My Music\pddata-32007\CD Files\left.wav" delay.wav "C:\Documents and Settings\My Name\My Documents\My Music\pddata-32007\CD Files\01 When We Dance.wav" < yes
result = Shell(cmd, vbMinimizedNoFocus)
If result = 0 Then
MsgBox "Error: " & Format(result)
Else
hProcess = OpenProcess(&H100000, True, result)
WaitForSingleObject hProcess, -1
CloseHandle hProcess
End If
This same command string works fine when executed from a dos prompt set to the VB applications runtime directory. This directory also contains the files delay.wav and yes (which is a text file) and all dos executables used. Any ideas on why this would not be working? Does it have something to do with the pipe in of the yes file?
Thanks,
Cyrus
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|