Can I hide a VB Shell command like this...  
Author Message
MartijnP





PostPosted: Visual Basic Express Edition, Can I hide a VB Shell command like this... Top

Hi, I'm using the code below which is showing me a wscript window in which the command is performed... Can I make this command completely invisible Would be awesome! Thanks!

Dim retval As Double

retval = Shell("schtasks /run /tn.....blabla", 1)



Visual Studio Express Editions18  
 
 
Moayad Mardini





PostPosted: Visual Basic Express Edition, Can I hide a VB Shell command like this... Top

Try the following :
Shell(FilePath, AppWinStyle.Hide, False, -1)


 
 
ahmedilyas





PostPosted: Visual Basic Express Edition, Can I hide a VB Shell command like this... Top

you maybe better in the long term (and best practice) to use the Process/ProcessStartInfo classes in the System.Diagnostics namespace

 
 
MartijnP





PostPosted: Visual Basic Express Edition, Can I hide a VB Shell command like this... Top

Thanks you guys for helping me out so fast.. I'll check out both ways..