473,782 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Managed Code / Shell

am working on a project now for a client that requires all managed code.
I have rewritten about 60% of the code and functionality in C# and have
now come to the complicated part of picking apart the existing stored
procedure and "managing" it. Two tasks that I am outing from the stored
procedure are as follows:

1) execution of a .vbs that creates a .txt file (CSV) of user
information
2) loading of said text file into an .exe and executing

I can achieve the same result as 1 with a streamwriter. This shouldn't
be too complicated. Number 2 is what I am worried about. The .exe will
reside on the same server where my application exists. What would be
the best way to accomplish this task in a managed way?

I tried opening the exe on the server by double-clicking it and got the
following error:

"%E: Cannot find "\Ent=' parameter on the command line."

So there is no GUI. It seems as if this is a simple console application.

Here is the line from the old stored procedure:

SET @LaunchImportSt ring = '\\' + @AppServer +
'\applicationNa me\sys_exe\ga_i mp2.exe /GO /Ent=' + cast(@EntID as
varchar(20)) + ' /Store=1'
exec master..xp_cmds hell @LaunchImportSt ring, no_output
Thanks in advance,

- Will
*** Sent via Developersdex http://www.developersdex.com ***
Jun 17 '06 #1
2 1933
Will,

Funny finding you here.... One thing that you might look at is using SQL
CLR. It is definately "managed" and might allow you to write out your text
file from within SQL. Another option would be to call the new Windows
command shell aka Monad. Not sure on that and it is still in beta but it
might provide a managed environment I think?

Jennifer is still feeling pretty good so we might just join you for the BBQ.
What can we bring?

--
Andrew Robinson
http://blog.binaryocean.com
"Will Asrari" <wi*********@de vdex.com> wrote in message
news:OZ******** ******@TK2MSFTN GP04.phx.gbl...
am working on a project now for a client that requires all managed code.
I have rewritten about 60% of the code and functionality in C# and have
now come to the complicated part of picking apart the existing stored
procedure and "managing" it. Two tasks that I am outing from the stored
procedure are as follows:

1) execution of a .vbs that creates a .txt file (CSV) of user
information
2) loading of said text file into an .exe and executing

I can achieve the same result as 1 with a streamwriter. This shouldn't
be too complicated. Number 2 is what I am worried about. The .exe will
reside on the same server where my application exists. What would be
the best way to accomplish this task in a managed way?

I tried opening the exe on the server by double-clicking it and got the
following error:

"%E: Cannot find "\Ent=' parameter on the command line."

So there is no GUI. It seems as if this is a simple console application.

Here is the line from the old stored procedure:

SET @LaunchImportSt ring = '\\' + @AppServer +
'\applicationNa me\sys_exe\ga_i mp2.exe /GO /Ent=' + cast(@EntID as
varchar(20)) + ' /Store=1'
exec master..xp_cmds hell @LaunchImportSt ring, no_output
Thanks in advance,

- Will
*** Sent via Developersdex http://www.developersdex.com ***

Jun 17 '06 #2
PS: I realize that the BBQ is next weekend....

--
Andrew Robinson
http://blog.binaryocean.com
"Will Asrari" <wi*********@de vdex.com> wrote in message
news:OZ******** ******@TK2MSFTN GP04.phx.gbl...
am working on a project now for a client that requires all managed code.
I have rewritten about 60% of the code and functionality in C# and have
now come to the complicated part of picking apart the existing stored
procedure and "managing" it. Two tasks that I am outing from the stored
procedure are as follows:

1) execution of a .vbs that creates a .txt file (CSV) of user
information
2) loading of said text file into an .exe and executing

I can achieve the same result as 1 with a streamwriter. This shouldn't
be too complicated. Number 2 is what I am worried about. The .exe will
reside on the same server where my application exists. What would be
the best way to accomplish this task in a managed way?

I tried opening the exe on the server by double-clicking it and got the
following error:

"%E: Cannot find "\Ent=' parameter on the command line."

So there is no GUI. It seems as if this is a simple console application.

Here is the line from the old stored procedure:

SET @LaunchImportSt ring = '\\' + @AppServer +
'\applicationNa me\sys_exe\ga_i mp2.exe /GO /Ent=' + cast(@EntID as
varchar(20)) + ' /Store=1'
exec master..xp_cmds hell @LaunchImportSt ring, no_output
Thanks in advance,

- Will
*** Sent via Developersdex http://www.developersdex.com ***

Jun 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1327
by: Falk | last post by:
Is it possible to use / integrate a C++ DLL from C# code like it is possible with JNI at Java? Is there any technology like that?
4
12660
by: Tommy Vercetti | last post by:
I've been trying to convert a Standard C++/MFC application to Managed C++/Forms (the application is pretty complex but the GUI is just a simple status dialog). I created a new project shell and have been slowly adding in new code. The code compiles perfectly but now when I try to run or debug I get the error: "The application failed to initialize properly (0xc000007b). Click on OK to terminate the application."
2
4147
by: YeJianWei | last post by:
I need to wrap a MFC extension Dll with export class(let's suppose it's named CA) so we could use it in C#. The dll is provided by third party vendor which means I couldn't modify it. A managed c++ library project was created to wrap this dll with a __gc class(let's suppose it's named CGA). class CGA contain an instance of class CA and explicitly delegates implementation to the CA's methods The problem is any call to methods of class...
13
5056
by: bonk | last post by:
Hello, I am trying to create a dll that internally uses managed types but exposes a plain unmanaged interface. All the managed stuff shall be "wrapped out of sight". So that I would be able to use that dll from pure unmanaged code (for example inherit from classes in that dll). Is something like that possible. I heared something called ManWarp tried that approach. If it is possible, how can I do that. Maybe there is a small litttle
8
3653
by: quortex | last post by:
Hi all, I have a native class which has a single instance controlled via the singleton pattern. I need to call this from both native C++ and from mixed mode visual studio 2005 c++ CLI. At the moment I have a MC++ unit test project which accesses the singleton. What I seem to be finding is that the singleton accessed directly from the unit test project is not the same instance as the singleton accessed from native code.
5
2444
by: dovgani | last post by:
I have an unmanaged MFC project. The output is static lib. I would like to compile using /clr option. The native lib size is 64 megs and with /clr and /O1 options is 940 megs. Is it possibly Metadata enlarge size so dramaticlly? And I would like to know any suitable solution of my problem.
2
2810
by: noel.phillips | last post by:
Hi, I am porting a C++ console application to managed C++ dll - for now basically wrapping it in a class. The console app has the option to write to a file or stdout using fwrite. So, how do I bridge the managed gap? I really want to be able to pass a BinaryStream to the managed C++ code from the calling C# code...can this be done, and how do I go about modifying the C++ code to handle it?
0
7128
by: vve | last post by:
I'm discovering a strange behaviour in an C# project using ZedGraph (https://sourceforge.net/projects/zedgraph/). After adding a signal to it, it seems that the clr goes mad for some reason. I don't get a nice exception in the debugger - instead I get a message in the output window "The program 'XXX.exe: Managed' has exited with code -1073741819 (0xc0000005)." and the application silently exits. I ran the compiled program with windbg...
1
1247
by: Patrick Philippot | last post by:
Hi, According to this discussion: http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/ it is very unsafe to write shell extensions in managed code (and I can understand why). However, Microsoft themselves are providing such extensions and are giving examples in the SDK. So what? I have to make a design decision about a new product and I'm rather puzzled by this.
0
9641
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
10313
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9944
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
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...
0
6735
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
5378
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
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.