Starting a c#.net window app (no UI) using window script host shell 
Author Message
 Starting a c#.net window app (no UI) using window script host shell

Hi,

I have a VBScript that shell out another C#.net application.
When I run my script at the command line or the run command, all are
well.

However, when another application (say application A) triggers the
script, my app does not start.

Could anyone give me some pointer as to why that would be?  

Could it be security issue with user account that WSH is using not being
verified by .net framework policy?  

I know the user account used by the application A can run the c#.net
application because I logged into Win2k server using that account and
run the script at command line.

Any idea?  All suggestion will be very helpful.  Thanks a lot in
advance.

The script:

**************
#!vbscript

Const ScriptName = "testscript.vbs"

Function Main
Dim WshShell, ShellCMD

ShellCMD = "C:\script\myapp.exe"

Main = False ' Set the default return code to failure
Set WshShell = CreateObject("WScript.Shell")
WshShell.Logevent 4, "Spawning: " & ShellCMD
WshShell.Run ShellCMD
Main = True
End Function
***************

End script.

The c# application only enter some data into sql server.

Thanks very much.

Baoha Bui

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Wed, 07 Dec 2005 01:39:52 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Research: Windows Script Host or Windows Scripting Host

2. Problems Installing Windows Script 5.0 and Windows Script Host 2.0 Beta on Windows NT 4.0

3. Windows Script Host Shell Object (Malacious script detected)

4. Windows Script Host Shell Object

5. Windows scripting host - Checking a service in Windows NT 4

6. Windows Scripting Host on Windows 95 OSR2

7. Windows 95 OSR1 and Windows Scripting Host

8. Windows Scripting Host for Windows 98 Book

9. Schedulling using Windows Script Host WSH and vbs

10. Microsoft Windows Script Host 2.0 by Using Javascripts

11. Using Scripting Host in my own apps

12. Hosting JScript in a Dot Net App

 

 
Powered by phpBB® Forum Software