Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Process class and DOS command
Message
De
24/02/2014 16:20:03
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Process class and DOS command
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01595074
Message ID:
01595074
Vues:
63
I use the Process class to execute a DOS command.

The command is like this:

c:\Windows\System32\cmd.exe /c if not exist y: net use y: \\1.1.1.1\h$

So, basically, if the y: drive does not exist, it will map it. This works well from the CMD window.

But, if I try the same from a .NET application, I get this:

y: has a remembered connection to \\1.1.1.1\f$. Do you
want to overwrite the remembered connection? (Y/N) [Y]:

So, basically, it seems from the .NET application, it does not recognize that y: already exists. So, it executes the command thus resulting in this output.

Anyone would have an idea of what is going on here?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform