Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shellexecute problems

Status
Not open for further replies.

tc3596

Technical User
Mar 16, 2001
283
Here is my code in VB (does not work).....

Dim StartDoc
hwnd = apiFindWindow("OPUSAPP", "0")
StartDoc = ShellExecute(hwnd, "open", CurDir$ & "\1.bat x.txt y.txt", "", _
CurDir$ & "\", 0)

Here is my direct dos call (which works)....

C:\Documents and Settings\dysa107365\My Documents\Exact Clients\Data Direct Netw
orks\VB Code 20080710>1.bat x.txt y.txt


1.bat is listed below....
@echo off

set BIN_PATH=c:
set SAXON_PATH=C:\Saxon\bin
set HOME_PATH=%BIN_PATH%\..
set TO_PATH=%HOME_PATH%\%~n1

set filename_im=%1
set filename_bom=%2


%SAXON_PATH%\transform.exe -s:1.xml -xsl:%SAXON_PATH%\agile_im.xsl -o:%filename_im%

%SAXON_PATH%\transform.exe -s:1.xml -xsl:%SAXON_PATH%\agile_bom.xsl -o:%filename_bom%

goto END

:ERROR
echo There were errors.


:END
cd %HOME_PATH%



------------any ideas?


 
nevermind, I found my issue. The path name was cut off due to spaces....

anyone know in VB in to send the shortpath name

i.e. c:\documen~1\.....

Probably not the right forum, but thought I'd ask.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top