473,396 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Runing Dos Commands

Was hoping to get some help with this problem.

What I have is a website that will be used to create DFS links on a DFS server from a asp 2.0 web site. The user puts in the share name and then selects the link location. Currently the only way I know of to insert the link is to run DFSCMD in dos currently I have a script that does this. The syntax is cmd \c DFSCMD /add "\\DFSServer\DFSGroup\Share" "\\TrueServer\Path" I also have a C# console app that works so i just took the code from it and tried to put it into a web app

Expand|Select|Wrap|Line Numbers
  1. using System.Security;
  2. using System.Diagnostics;
  3. public string createDFSlinke(string root, string link)
  4.     {
  5.         string arg = "/add \"" + root + "\" \"" + link + "\"";
  6.  
  7.         Process.Start("DFSCMD",arg);
  8.         return arg;
  9.  
  10.     }
it does appear as the app is launched and if i watch the processes on the server i see it launch how ever I keep getting this error on event log
Event Type: Information
Event Source: Application Popup
Event Category: None
Event ID: 26
Date: 1/22/2007
Time: 4:21:07 PM
User: N/A
Computer: MyWebServer
Description:
Application popup: DFSCMD.exe - Application Error : The application failed to initialize properly (0xc0000142). Click on OK to terminate the application.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Does anyone know how I could run a dos application with command arguments from the webserver.
Jan 22 '07 #1
1 1438
kenobewan
4,871 Expert 4TB
What OS is your server running? I don't believe that this will work on W2K, however this article may help for W3K R2:
DFS for Webfarm Usage - Content Replication and Failover
Jan 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Gregory S. Williamson | last post by:
If anyone has any advice on building Postgres 7.4 for a freeBSD box it surewould be welcome. TIA, Greg Williamson DBA GlobeXplorer LLC ----------------------
3
by: dahuzizyd | last post by:
Hi all I want to judge an application is runing or not when another application start . If the application is running , get focus. I use the Pinvoke to invoke the FindWindow function ,I...
1
by: Joey | last post by:
I am using the below code to run a dos based program. While it is running you can hit ctrl-c to cancel the process. Does anyone know how I can send the same keystroke to the already runing...
5
by: mastar | last post by:
Hi all im trying to run a file localy on my server (2003) using asp , this is the code : <%@ LANGUAGE = "JAVASCRIPT" %> <% var commandLine = "File_NAME.EXE"; var WshShell =...
6
by: Peted | last post by:
Hi wondering what is the best way to do this Need a user to click a button, that sends 3 or 4 string based commands via a TCP/ip socket link I can connect to the ip device no problems, am...
2
by: atiq | last post by:
why isn't my Access giving me warning before runing the delete, append or update query because usually it warns you that you are about to append, update or delete the following number of records. It...
0
by: smugcool | last post by:
hi, I have made a project on vb 6.0. And i have made a setup file for the same. When i am runing this file in WINDOWS XP, its running absolutly fine. But the same setup file when i try to run...
0
by: PanchalRakesh | last post by:
Dear All, I am Developing a window service in which i am continously check which program runing currently in my computer memory for how many time , in which memory address and when it start and...
7
by: colin | last post by:
Hi, Ive written a 3dmodel editor, and it works fairly well it harldy uses any cpu exept when its loading a texture from bitmap in the debugger, at all other times it hardly uses any cpu but from...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.