Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2006, 02:10 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem to run batch files from VB Application

Hello Experts,
I am having a problem to run the batch file using Shell() function from inside VB6 application. I've created this application on my Windows XP Pro. PC and it is working perfectly. But after I moved the EXE to the Windows 2000 Server PC, the Shell("Program.BAT",vbMinimaized) line of code stopped working(it does not do anything???). What is going on? I am completely frustrated. Why the standard VB Shell() function does not work on the server PC?

Any suggestions will be appreciated and thanks in advance.

-Dmitriy
 
Old April 12th, 2006, 09:47 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

hi

i hv used Shell on both Win XP and Win 2000 Server and it works perfectly

check ur Program.BAT file

 
Old April 12th, 2006, 10:03 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

When I run the .BAT file by itself from the command line or from the Windows Explorer, it is running perfectly.
 
Old April 12th, 2006, 10:06 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

If I run this .BAT file from the command line or from the Windows Explorer, it is running perfecly.
 
Old April 13th, 2006, 02:27 AM
Authorized User
 
Join Date: Feb 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to amarjits Send a message via MSN to amarjits Send a message via Yahoo to amarjits
Default

Hello there,

just try adding "Doevents()" before the shell command....sometimes it helps....try and do reply abt what happnd...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a MS DOS Batch file from Excel VBA Louh Excel VBA 1 March 4th, 2008 10:02 PM
Convert a batch file to run in VBscript - WSH issu malcomm VBScript 0 October 25th, 2006 12:35 AM
Problem to run batch files from VB application Dmitriy VB How-To 7 September 13th, 2006 11:42 AM
Files needed to run a VB.Net Windows Apps daniel VB.NET 2002/2003 Basics 2 October 15th, 2004 09:29 AM
Run vb application automatically PbsiGuru General .NET 3 March 17th, 2004 04:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.