Link to home
Start Free TrialLog in
Avatar of mark_land
mark_land

asked on

shell in VB.NET

whats the syntax to call shell in VB.NET

Shell "c:\Program Files\Adobe\Acrobat 4.0\Reader\acrord32.exe /t" & "C:\Program Files\Cache\2005082408325700001\26082626_1.PDF" & " PEERNET.DRV eTIFF 6.0"

Thanks, Regards-Mark
Avatar of gangwisch
gangwisch

start.process("c:\Program Files\Adobe\Acrobat 4.0\Reader\acrord32.exe /t" & "C:\Program Files\Cache\2005082408325700001\26082626_1.PDF" & " PEERNET.DRV eTIFF 6.0")

good luck
it is
Process.Start("c:\Program Files\Adobe\Acrobat 4.0\Reader\acrord32.exe /t" & "C:\Program Files\Cache\2005082408325700001\26082626_1.PDF" & " PEERNET.DRV eTIFF 6.0")
System.Diagnostics.Process.Start("c:\Program Files\Adobe\Acrobat 4.0\Reader\acrord32.exe /t" & "C:\Program Files\Cache\2005082408325700001\26082626_1.PDF" & " PEERNET.DRV eTIFF 6.0")
Avatar of mark_land

ASKER

this doesnt work please help experts
Dim ProcID As Integer
Dim strShell As String

strShell = "H:\mycommandfile\Test.bat"
ProcID = Shell(strShell, AppWinStyle.MinimizedFocus)
 
or

Proc = Shell("H:\mycommandfile\Test.bat", AppWinStyle.NormalNoFocus, True)
Shell "c:\hello.bat", vbNormalFocus

Or this if you do not want it to show
Shell "c:\hello.bat", vbHide
"c:\Program Files\Adobe\Acrobat 4.0\Reader\acrord32.exe /t" & "C:\Program Files\Cache\2005082408325700001\26082626_1.PDF" & " PEERNET.DRV eTIFF 6.0"

also if you were to build this string you have no spaces after the ampersigns
ASKER CERTIFIED SOLUTION
Avatar of 5thcav
5thcav
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial