473,803 Members | 3,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Initiate .cmd file from asp.net

106 New Member
Hi
I have Install Web content extractor on my pc. Web Content Extractor exe has the following path
C:\Program Files\Web Content Extractor\WCExt ractor.exe

Now I used cmd file to initiate Web Content Extractor.

I created cmd file and write the following text to file

"C:\Program Files\Web Content Extractor\WCExt ractor.exe" "D:\ASP.NET\tea chnetwork\manag er\Scrapfiles\a bc-teachers.wcepr" -dr -rt -s -ddr -qe -ex"

and save the file as abc-teachers.cmd on drive C

When I double click on cmd file It initiate my web content extractor. Also On my pc(win xp) the following code run abc-teachers.cmd which initiate Web content extractor. but on windows Vista This code does not work. While double clicking the cmd file on windows Vista also works.



Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim myProcess As System.Diagnostics.Process
  3.             Dim myInfo As New System.Diagnostics.ProcessStartInfo
  4.             myInfo.FileName = "C:\\abc-teachers.cmd"
  5.             myInfo.RedirectStandardOutput = True
  6.             myInfo.UseShellExecute = False
  7.             myProcess = System.Diagnostics.Process.Start(myInfo)
  8.             'myProcess.Start()
  9.             myProcess.Close()
  10. %>
  11.  
Any Help in this issue
Thanks in advance
Aug 13 '08 #1
4 3644
Curtis Rutland
3,256 Recognized Expert Specialist
You realize that this code is going to execute on the server, right?

If this has been working for you on the client, it is because you are serving the page from the same machine that you are viewing it from. If you put this on your webserver, and ran it from a different computer, this code is going to execute on the server, not the client.
Aug 13 '08 #2
Frinavale
9,735 Recognized Expert Moderator Expert
I don't know what your WCExtractor does exactly.......

But it requires sufficient permissions to run. Most of the time any applications run through an ASP.NET application are run under an account with minimal permissions and low trust.

If your asp.net application requires this program for processing, I recommend looking into using impersonation to run the application using an account that has sufficient permissions to execute it.

The same problem will exist in vista.

It would probably be best to implement your asp.net application in such a way so that it does not depend on this console application.

-Frinny
Aug 13 '08 #3
Hamayun Khan
106 New Member
I don't know what your WCExtractor does exactly.......

But it requires sufficient permissions to run. Most of the time any applications run through an ASP.NET application are run under an account with minimal permissions and low trust.

If your asp.net application requires this program for processing, I recommend looking into using impersonation to run the application using an account that has sufficient permissions to execute it.

The same problem will exist in vista.

It would probably be best to implement your asp.net application in such a way so that it does not depend on this console application.

-Frinny
Thanks for reply

I m not asp.net expert. I don't know whether it is possible to run WCExtractor.exe
with the following parameters.

"D:\ASP.NET\tea chnetwork\manag er\Scrapfiles\c lick4teachers.w cepr" -dr -rt -s -ddr -qe -ex with out using console.

Also I try impersonation but it did not work for me. I add the following line to config file

<identity impersonate="tr ue" userName="xxx" password="xxxx"/>
Can you help me please.
Sep 9 '08 #4
Hamayun Khan
106 New Member
I also used the following

[
Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim info As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo("C:\\Program Files\\Web Content Extractor\\WCExtractor.exe", """C:\\Documents and Settings\\hama\\Desktop\\Teachnetworkscrapjobs\\Scrapfiles\\abc-teachers.wcepr"" -dr -rt -s -ddr -qe -ex")
  3. Dim p = System.Diagnostics.Process.Start(info)
  4. p.Start()
  5. %>
  6.  
]

This code work on my pc successfully. On windows vista this does not initiate the exe. When i look into task manager processes. I find WCExtractor.exe running as Network services. (Network services below the user tab of task manager) While I did not see the WCE window on my desktop.
Please help Its urgent.
Sep 10 '08 #5

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

Similar topics

0
2341
by: Roger Bonine | last post by:
Can anyone point me to C# or (even better) VB.NET code to offer remote assistance to a WinXP workstation? I'm writing a helpdesk app and I want the helpdesk user to be able to initiate a Remote Assistance session. I found sample code to do this on MSDN, but it is for C and VBscript only, and I'd like to find a framework-specific solution if possible. Basically, I want to emulate the performance of this link: ...
4
10837
by: jef | last post by:
I have a page (I call FileDownload" that intitiates a download of the filename passed to it. I called it from another page via javascript: window.open("FileDownload?file=blahblh"); it works fine but opens a blank browser window when it pops up the download dialog (my target browser is IE).... someone suggested I use an Iframe on the calling page so the blank browser window doesn't appear. So i created a hidden frame on the page, but...
6
1381
by: martin | last post by:
I want to initiate a union and and have the problem that I sometimes need to use float and sometimes an int. The float values (u.fval) turns up ok but not the ints (u.ival). I tried typecating it as below but it does not seem to do the trick. Would be happy if anyone has a solution for this problem. struct str { int i;
2
1414
by: Larry | last post by:
how to use a class variable without initiate for example: ClassA { int var1; }
1
2503
by: Jordan | last post by:
I'm trying to initiate Postback from client-side script, and here's what I have that doesn't work: I have an <asp:Button> on the same page named btnSave that the user can click (its functionality works fine). I want to call the button's server-side functionality from the client-side script (in response to things happening in the client other than the user clicking on the save button). function DoSomethingInClient() { Do Some Stuff Here
17
2742
by: Zvi Danovich | last post by:
Hi, I am a newby in ASP.NET, and till now wrote only simple "classic" WEB-sites. But - the time came, and now I need that: 1. Server will "listen" for some events on its local machine 2. According to event received (say - event ID), it will update client pages, that need updating based on this ID (if currently there exist clients that are interesting in specific ID). The good example of such site - airport flight information, when...
2
5181
by: Steve | last post by:
Hi, I'm trying to design a web server where users can login, initiate long running processes on uploaded files, monitor the progress via a web page and download some results when the process has finished. My first attempt was to do the file processing in the servlet, but the browser timed out eventually! I appreciate this is not the way to solve it! I was wondering if there is a common mechanism for doing this sort of thing
2
1745
by: jwf | last post by:
I am developming a web application in ASP.NET (VB) and am looking to develop functionality where a user clicks on a link to download a file but at no point can the user see the actual URL link to the file. When the file is originally uploaded to the webserver it will be given a unique random filename and the link to the file + description sill be stored in sql server. Basically the system must be secure so that a user MUST go through...
0
1306
by: Bazza Formez | last post by:
Hi, Can anyone suggest a technical solution to this tricky business requirement.... I am developing an online ordering system using ASP.NET. (Orders are entered online from the web by registered users). Here is a summary of what I want to happen :
0
9700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10310
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9121
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7603
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6841
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.