(newbie) Starting a program from a VB.net program 
Author Message
 (newbie) Starting a program from a VB.net program

We have an application on a server that must be executed from a mapped
drive.
We don't want the drive mapped permanently.

We are currently using the following batch file.
This file checks if the program is exists, IE is the server up.
Map the share as drive T:
Start the program and wait until it finishes.
Delete the mapping for drive T:

--Start of batch file
echo off
if exist "\\servername\sharename\directory\program.exe" goto foundshare
echo "Could not connect to program"
echo "Contact program Support at"
echo "nnnn then xnnnn"
pause
goto noshare

:foundshare
echo "Do not close or exit this window!"
echo "This program started Program"
echo "When you quit program this program will end."

if exist t: net use t: /delete
net use t: \\servername\sharename
start/w t:\directory\program.exe
net use t: /delete

:noshare
echo on
exit
--End of Batch file

I would like to perform these tasks in a vb program.
I don't want to execute the batch file from a vb process, I want to perform
each of these task within a vb form.

Thanks in Advance.

Jim Walker



Wed, 07 Sep 2005 07:45:39 GMT  
 (newbie) Starting a program from a VB.net program
Use the Shell function.

steve

Quote:

> We have an application on a server that must be executed from a mapped
> drive.
> We don't want the drive mapped permanently.

> We are currently using the following batch file.
> This file checks if the program is exists, IE is the server up.
> Map the share as drive T:
> Start the program and wait until it finishes.
> Delete the mapping for drive T:

> --Start of batch file
> echo off
> if exist "\\servername\sharename\directory\program.exe" goto foundshare
> echo "Could not connect to program"
> echo "Contact program Support at"
> echo "nnnn then xnnnn"
> pause
> goto noshare

> :foundshare
> echo "Do not close or exit this window!"
> echo "This program started Program"
> echo "When you quit program this program will end."

> if exist t: net use t: /delete
> net use t: \\servername\sharename
> start/w t:\directory\program.exe
> net use t: /delete

> :noshare
> echo on
> exit
> --End of Batch file

> I would like to perform these tasks in a vb program.
> I don't want to execute the batch file from a vb process, I want to perform
> each of these task within a vb form.

> Thanks in Advance.

> Jim Walker



Sun, 11 Sep 2005 04:20:46 GMT  
 (newbie) Starting a program from a VB.net program
use Process.Start in .NET

--

Dean


Use the Shell function.

steve


Quote:
> We have an application on a server that must be executed from a mapped
> drive.
> We don't want the drive mapped permanently.

> We are currently using the following batch file.
> This file checks if the program is exists, IE is the server up.
> Map the share as drive T:
> Start the program and wait until it finishes.
> Delete the mapping for drive T:

> --Start of batch file
> echo off
> if exist "\\servername\sharename\directory\program.exe" goto foundshare
> echo "Could not connect to program"
> echo "Contact program Support at"
> echo "nnnn then xnnnn"
> pause
> goto noshare

> :foundshare
> echo "Do not close or exit this window!"
> echo "This program started Program"
> echo "When you quit program this program will end."

> if exist t: net use t: /delete
> net use t: \\servername\sharename
> start/w t:\directory\program.exe
> net use t: /delete

> :noshare
> echo on
> exit
> --End of Batch file

> I would like to perform these tasks in a vb program.
> I don't want to execute the batch file from a vb process, I want to
perform
> each of these task within a vb form.

> Thanks in Advance.

> Jim Walker



Mon, 12 Sep 2005 02:42:12 GMT  
 (newbie) Starting a program from a VB.net program
Shell also works.

steve

Quote:

> use Process.Start in .NET

> --

> Dean



> Use the Shell function.

> steve



> > We have an application on a server that must be executed from a mapped
> > drive.
> > We don't want the drive mapped permanently.

> > We are currently using the following batch file.
> > This file checks if the program is exists, IE is the server up.
> > Map the share as drive T:
> > Start the program and wait until it finishes.
> > Delete the mapping for drive T:

> > --Start of batch file
> > echo off
> > if exist "\\servername\sharename\directory\program.exe" goto foundshare
> > echo "Could not connect to program"
> > echo "Contact program Support at"
> > echo "nnnn then xnnnn"
> > pause
> > goto noshare

> > :foundshare
> > echo "Do not close or exit this window!"
> > echo "This program started Program"
> > echo "When you quit program this program will end."

> > if exist t: net use t: /delete
> > net use t: \\servername\sharename
> > start/w t:\directory\program.exe
> > net use t: /delete

> > :noshare
> > echo on
> > exit
> > --End of Batch file

> > I would like to perform these tasks in a vb program.
> > I don't want to execute the batch file from a vb process, I want to
> perform
> > each of these task within a vb form.

> > Thanks in Advance.

> > Jim Walker



Mon, 12 Sep 2005 03:10:54 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. vb.net exe's on NT 4 problem - programs start slow

2. looking for starts reference for program Ms Office from Vb.Net

3. VB.Net Service Qustion: Detecting Program Start/Stop

4. VB .Net program as a started task

5. VB.NET newbie - help with programming serial port

6. vb.net newbie needs help with picture viewer program

7. How to tell if a program was started by another program

8. How to tell if a program was started by another program

9. How to start a program when you connect to the net

10. how to creat a program group/icons in start/programs in VB5

11. Using VB.NET programming ASP.NET

12. Start program automatically when Windows starts

 

 
Powered by phpBB® Forum Software