Call a program via windows service

Hi! I have write a windows service,and it works. I want to call a .exe file,and my .exe file is signature. The program can not work when I call it through my service. How can I solve my problem? Thanks!

Hi Hassan,
Thank you for sharing the code with us! 
As I understand it, your code handles the situation of an user that is already logged on to an interactive window station (those of you, who need to create a UI-process of a user not yet logged on, could use
CreateProcessWithLogon, or
LogonUser to get the token). Because calling CreateProcessAsUser() requires advanced privileges (such as "Replace a process token level", or "Act as part of the operating system", privileges usually not held by a user unless specified so by the security
policy), the code also implies a service running in the local system account (or equivalent).
To make it easier to read, I'll post here the C#-version of your code:
using System;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace WindowsServiceLaunchingExe
class NativeMethods
[StructLayout(LayoutKind.Sequential)]
public struct PROCESS_INFORMATION {
public IntPtr hProcess;
public IntPtr hThread;
public System.UInt32 dwProcessId;
public System.UInt32 dwThreadId;
[StructLayout(LayoutKind.Sequential)]
public struct SECURITY_ATTRIBUTES {
public System.UInt32 nLength;
public IntPtr lpSecurityDescriptor;
public bool bInheritHandle;
[StructLayout(LayoutKind.Sequential)]
public struct STARTUPINFO {
public System.UInt32 cb;
public string lpReserved;
public string lpDesktop;
public string lpTitle;
public System.UInt32 dwX;
public System.UInt32 dwY;
public System.UInt32 dwXSize;
public System.UInt32 dwYSize;
public System.UInt32 dwXCountChars;
public System.UInt32 dwYCountChars;
public System.UInt32 dwFillAttribute;
public System.UInt32 dwFlags;
public short wShowWindow;
public short cbReserved2;
public IntPtr lpReserved2;
public IntPtr hStdInput;
public IntPtr hStdOutput;
public IntPtr hStdError;
[StructLayout(LayoutKind.Sequential)]
public struct PROFILEINFO {
public int dwSize;
public int dwFlags;
[MarshalAs(UnmanagedType.LPTStr)]
public string lpUserName;
[MarshalAs(UnmanagedType.LPTStr)]
public string lpProfilePath;
[MarshalAs(UnmanagedType.LPTStr)]
public string lpDefaultPath;
[MarshalAs(UnmanagedType.LPTStr)]
public string lpServerName;
[MarshalAs(UnmanagedType.LPTStr)]
public string lpPolicyPath;
public IntPtr hProfile;
internal enum SECURITY_IMPERSONATION_LEVEL {
SecurityAnonymous = 0,
SecurityIdentification = 1,
SecurityImpersonation = 2,
SecurityDelegation = 3
internal enum TOKEN_TYPE {
TokenPrimary = 1,
TokenImpersonation = 2
[DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Auto)]
private static extern bool CreateProcessAsUser(IntPtr hToken, string lpApplicationName, string lpCommandLine, ref SECURITY_ATTRIBUTES lpProcessAttributes, ref SECURITY_ATTRIBUTES lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, IntPtr lpEnvironment, string lpCurrentDirectory, ref STARTUPINFO lpStartupInfo, ref PROCESS_INFORMATION lpProcessInformation);
[DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool DuplicateTokenEx(IntPtr hExistingToken, uint dwDesiredAccess, ref SECURITY_ATTRIBUTES lpTokenAttributes, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, TOKEN_TYPE TokenType, ref IntPtr phNewToken);
[DllImport("advapi32.dll", SetLastError = true)]
private static extern bool OpenProcessToken(IntPtr ProcessHandle, int DesiredAccess, ref IntPtr TokenHandle);
[DllImport("userenv.dll", SetLastError = true)]
private static extern bool CreateEnvironmentBlock(ref IntPtr lpEnvironment, IntPtr hToken, bool bInherit);
[DllImport("userenv.dll", SetLastError = true)]
private static extern bool DestroyEnvironmentBlock(IntPtr lpEnvironment);
private const short SW_SHOW = 1;
private const short SW_SHOWMAXIMIZED = 7;
private const int TOKEN_QUERY = 8;
private const int TOKEN_DUPLICATE = 2;
private const int TOKEN_ASSIGN_PRIMARY = 1;
private const int GENERIC_ALL_ACCESS = 268435456;
private const int STARTF_USESHOWWINDOW = 1;
private const int STARTF_FORCEONFEEDBACK = 64;
private const int CREATE_UNICODE_ENVIRONMENT = 0x00000400;
private const string gs_EXPLORER = "explorer";
public static void LaunchProcess(string Ps_CmdLine)
IntPtr li_Token = default(IntPtr);
IntPtr li_EnvBlock = default(IntPtr);
Process[] lObj_Processes = Process.GetProcessesByName(gs_EXPLORER);
// Get explorer.exe id
// If process not found
if (lObj_Processes.Length == 0)
// Exit routine
return;
// Get primary token for the user currently logged in
li_Token = GetPrimaryToken(lObj_Processes[0].Id);
// If token is nothing
if (li_Token.Equals(IntPtr.Zero))
// Exit routine
return;
// Get environment block
li_EnvBlock = GetEnvironmentBlock(li_Token);
// Launch the process using the environment block and primary token
LaunchProcessAsUser(Ps_CmdLine, li_Token, li_EnvBlock);
// If no valid enviroment block found
if (li_EnvBlock.Equals(IntPtr.Zero))
// Exit routine
return;
// Destroy environment block. Free environment variables created by the
// CreateEnvironmentBlock function.
DestroyEnvironmentBlock(li_EnvBlock);
private static IntPtr GetPrimaryToken(int Pi_ProcessId) {
IntPtr li_Token = IntPtr.Zero;
IntPtr li_PrimaryToken = IntPtr.Zero;
bool lb_ReturnValue = false;
Process lObj_Process = Process.GetProcessById(Pi_ProcessId);
SECURITY_ATTRIBUTES lObj_SecurityAttributes = default(SECURITY_ATTRIBUTES);
// Get process by id
// Open a handle to the access token associated with a process. The access token
// is a runtime object that represents a user account.
lb_ReturnValue = OpenProcessToken(lObj_Process.Handle, TOKEN_DUPLICATE, ref li_Token);
// If successfull in opening handle to token associated with process
if (lb_ReturnValue) {
// Create security attributes to pass to the DuplicateTokenEx function
lObj_SecurityAttributes = new SECURITY_ATTRIBUTES();
lObj_SecurityAttributes.nLength = Convert.ToUInt32(Marshal.SizeOf(lObj_SecurityAttributes));
// Create a new access token that duplicates an existing token. This function
// can create either a primary token or an impersonation token.
lb_ReturnValue = DuplicateTokenEx(li_Token, Convert.ToUInt32(TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_QUERY), ref lObj_SecurityAttributes, SECURITY_IMPERSONATION_LEVEL.SecurityIdentification, TOKEN_TYPE.TokenPrimary, ref li_PrimaryToken);
// If un-successful in duplication of the token
if (!lb_ReturnValue) {
// Throw exception
throw new Exception(string.Format("DuplicateTokenEx Error: {0}", Marshal.GetLastWin32Error()));
else {
// If un-successful in opening handle for token then throw exception
throw new Exception(string.Format("OpenProcessToken Error: {0}", Marshal.GetLastWin32Error()));
// Return primary token
return li_PrimaryToken;
private static IntPtr GetEnvironmentBlock(IntPtr Pi_Token) {
IntPtr li_EnvBlock = IntPtr.Zero;
bool lb_ReturnValue = CreateEnvironmentBlock(ref li_EnvBlock, Pi_Token, false);
// Retrieve the environment variables for the specified user.
// This block can then be passed to the CreateProcessAsUser function.
// If not successful in creation of environment block then
if (!lb_ReturnValue) {
// Throw exception
throw new Exception(string.Format("CreateEnvironmentBlock Error: {0}", Marshal.GetLastWin32Error()));
// Return the retrieved environment block
return li_EnvBlock;
private static void LaunchProcessAsUser(string Ps_CmdLine, IntPtr Pi_Token, IntPtr Pi_EnvBlock) {
bool lb_Result = false;
PROCESS_INFORMATION lObj_ProcessInformation = default(PROCESS_INFORMATION);
SECURITY_ATTRIBUTES lObj_ProcessAttributes = default(SECURITY_ATTRIBUTES);
SECURITY_ATTRIBUTES lObj_ThreadAttributes = default(SECURITY_ATTRIBUTES);
STARTUPINFO lObj_StartupInfo = default(STARTUPINFO);
// Information about the newly created process and its primary thread.
lObj_ProcessInformation = new PROCESS_INFORMATION();
// Create security attributes to pass to the CreateProcessAsUser function
lObj_ProcessAttributes = new SECURITY_ATTRIBUTES();
lObj_ProcessAttributes.nLength = Convert.ToUInt32(Marshal.SizeOf(lObj_ProcessAttributes));
lObj_ThreadAttributes = new SECURITY_ATTRIBUTES();
lObj_ThreadAttributes.nLength = Convert.ToUInt32(Marshal.SizeOf(lObj_ThreadAttributes));
// To specify the window station, desktop, standard handles, and appearance of the
// main window for the new process.
lObj_StartupInfo = new STARTUPINFO();
lObj_StartupInfo.cb = Convert.ToUInt32(Marshal.SizeOf(lObj_StartupInfo));
lObj_StartupInfo.lpDesktop = null;
lObj_StartupInfo.dwFlags = Convert.ToUInt32(STARTF_USESHOWWINDOW | STARTF_FORCEONFEEDBACK);
lObj_StartupInfo.wShowWindow = SW_SHOW;
// Creates a new process and its primary thread. The new process runs in the
// security context of the user represented by the specified token.
lb_Result = CreateProcessAsUser(Pi_Token, null, Ps_CmdLine, ref lObj_ProcessAttributes, ref lObj_ThreadAttributes, true, CREATE_UNICODE_ENVIRONMENT, Pi_EnvBlock, null, ref lObj_StartupInfo, ref lObj_ProcessInformation);
// If create process return false then
if (!lb_Result) {
// Throw exception
throw new Exception(string.Format("CreateProcessAsUser Error: {0}", Marshal.GetLastWin32Error()));
To use the code, create a new windows service project, and add code like the following one:
using System;
using System.Diagnostics;
using System.ServiceProcess;
using System.Timers;
namespace WindowsServiceLaunchingExe
public partial class ExeLauncherSvc : ServiceBase
public ExeLauncherSvc() {
InitializeComponent();
Timer timer;
protected override void OnStart(string[] args) {
timer = new Timer(5000);
timer.Elapsed += (sender, e) => {
try {
timer.Stop();
EventLog.WriteEntry("WindowsServiceLaunchingExe", "Launching process...");
NativeMethods.LaunchProcess(@"C:\Windows\notepad.exe");
} catch (Exception ex) {
EventLog.WriteEntry("WindowsServiceLaunchingExe", ex.Message);
timer.Start();
protected override void OnStop() {
Because NativeMethods.LaunchProcess() throws exceptions on errors, be sure to enclose calling code in a try/catch-block.
I also would recommend reading this:
Stephen Martin - The Perils and Pitfalls of Launching a Process Under New Credentials
http://asprosys.blogspot.com/2009/03/perils-and-pitfalls-of-launching.html
Stephen Martin - Launch Process From Service (code download)
http://www.asprosys.com/Downloads/LaunchProcessFromService.zip
Marcel

Similar Messages

  • Call RFC from DELPHI Windows Services Program

    Hi all,
    Are there any way to call RFC from DELPHI Windows Services Program?
    Best regards.
    Munur EBCIOGLU

    Hi again Bhagat,
    1. Yes, it's included on 7.4 ABAP Stack (SAP NetWeaver 7.4 SP8 - Optimized for SAP HANA, Cloud and Mobile - Service Release 2 available now!). In a recent customer, SAP licences GW by user but there are other license model like session licensing: https://store.sap.com/sap/cp/ui/resources/store/html/SolutionDetails.html?pid=0000009470&catID=&pcntry=US&sap-language=EN&_cp_id=id-1385059687642-0
    2. You could install as an AddOn on your 7.3 system, there are many options depending on your desired infrastructure: SAP Gateway deployment options in a nutshell For example our customer have deployed Central Hub Gateway in a standalone stack ABAP to act as an standalone oData bridge between ABAP/nonAbap systems.
    3. You could deploy SAPUI5 apps in 7.x, Java Web Servers or HTTP Web Servers. You must consider your SSO scenario:
    - SSO Logon Tickets. You will need to configurate SSO Logon Tickets between SAP NW Portal & SAP NW Gateway & your backend (ECC, etc). In order to pass SAP session cookie you will need setup SAP Web Dispacther and access portal & gateway throught SAP WD with the same domain.
    - SAML2 Tickets. This scenario lets you provide portal & gateway on different domains enabling SSO. You could configure SAP NW Portal as an Identity Provider and other systems must trust SAP Portal as IdP.
    Cheers

  • Calling Illustrator from a Windows Service

    Hello,
    A project I'm working on has an internal document conversion process that uses Adobe Illustrator.  The conversion script is in Javascript and uses the Illustrator SDK to go through the document and extract some information. We have a script that initiates this by calling Illustrator and instructing it to run the Javascript file.  This whole process works well.
    To make this easier for people to use, we have a program that runs on a server and watches a special directory.  When a file is dropped into that directory, this program notices, runs the script, and saves the output in another folder.  This process works well, too.
    To ensure that this program stays running and starts immediately when the system boots, we would like to run it as a Windows Service.  This is where we run into trouble.  Our program runs fine as a service, except that when we call Illustrator, it just hangs without executing our script.
    I don't see any output or error messages that would help us diagnose the problem.
    I was wondering if anybody else had tried calling Illustrator from a Windows Service, and maybe had some suggestions for getting it working?
    Thanks!
    -----Scott.

    I'm afraid I don't know anything that might help you on this one. I wouldn't have thought Illustrator was doing anything that unusual that might cause running from a Service grief. The only two suggestions I can think of are ones you may already have tried:
    1) check the event viewer -- there might be something there that doesn't show up in stderr or stdout
    2) Try posting in the Scripting forum; it feels like they might be more likely to have tried something like this than people in here. This is typically for plugin development, thoug I don't blame you at all for posting here -- it certainly would have seemed worth a shot to me Anyways, the AI Scripting forum is in:
    http://forums.adobe.com/community/illustrator/illustrator_scripting
    Hopefully someone there will have tried this and can help you out. Good luck!

  • Calling OCCI from a windows service

    Hello, I am trying to call OCCI from a windows service. And as soon as I put in the createEnvironment call the service will not load. I get an Error 1053: The service did not respond to the start or control request in a timely fashion. Anyone else seen this problem? Any ideas?

    I'm using 10.2.0.1.0 downloaded a couple of weeks ago.
    My english is not so good to completelly understand your last sentence.
    Nobody directed me in using OCCI in a service. I had to face the proble to let my I.R. engine write XML data into an XMLTYPE object in Oracle, I downloaded the OCCI library and samples and build some code for my test.
    Everityhing seems to work properly using Clob containers, while XMLType columns can be created but I can't read the value as the result of a select.
    Anyway, OCCI 10.2.0.1.0 compiled with Visual C++ 2008 (VC9) with a couple of tricks with manifest to use oraocci10.lib (built for VC8) works for me even as a service.
    I have to say that this code is in a DLL that I dynamically load and use.
    Does it make sense for you?

  • Call another proxy via business service of first proxy

    I have a proxyservice1. I want to call another proxy service (proxyservice2) via business service (businessservice1).
    My proxyservice1 routes to businessservice1.
    So in my businessservice1 I have mentioned the below URL in "Transport Configuration"/"Endpoint URI" in "Business Service Configuration" .
    My proxy service "proxyservice2" url to be called:
    http://localhost:7001/projectname1/foldername1/ServiceName1
    I have logging in proxyservice2 as first step. But I don't see the traces of "proxyservice2" getting called from businessservice1 of proxyservice1.
    Is the format of url for the proxy "proxyservice2" correct? Also is the above procedure valid?

    Hi,
    Why dont you create the business service 1 upon the proxy service 2?..There is an option in Business service configuration where u can create a BS upon a PS.
    Have you tested proxy service 2 using test console?..can u see the reports?..
    If yes test BS1 and check if you can see the reports...
    Atlast u can check if testing PS1 shows u the reports of PS2.
    I think this shoul wok...Please let us know of any problems..
    Regards.

  • Different thread/memory limits when running Java via Windows Service?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

    My company is developing a Java application that employs a "black-box" interface, which generates several memory-intensive threads. When we run the application via a batch file, the threads seem to run in parallel on a quad-core server. However, when we install the application as a Windows Service on the same server, it appears that we hit a hard limit of 35 threads, and the process pegs out one of the server's CPU's at 100%. Does anyone know why we don't see the parallelism when we run it as a Windows Service? Does anyone know if Windows imposes different memory or thread restrictions on services, as opposed to normal desktop applications?

  • Error while trying to load Crystal report via Windows service

    Hi,
    I am trying to generate PDF file using crystal reports. I have developed a console application which works absolutely fine, however when I converted the code to work as windows service (wcf hosted in Windows service), this below error I see from stack trace:
    Load report failed.
    at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened()
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename)
    at AtDataWindowsService.GetData.generatePDF(DataTable dt)
    The code used is:
    CrystalDecisions.Shared.ExportFormatType exportFormat;
    ReportDocument reportObj = new ReportDocument();
    exportFormat = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
    //Load the Crystal Report
    reportObj.Load("CrystalReport.rpt");
    reportObj.SetDataSource(dt);
    What might be going wrong here?

    Hello,
    Thank you for your post.
    Based on your description, I am afraid that the issue is out of support of VS General Question forum which mainly discusses
    WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    I suggest that you can consult your issue directly on SAP Crystal Reports:
    http://scn.sap.com/community/crystal-reports/content?filterID=content~objecttype~objecttype[thread]
      for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Calling a CAF program via web service generates QName cannot be null error, but only for 1/5 of the same call in a parallel for loop.

    I'm calling 5 identical web service calls using a parallel for loop in BPM. Obviously the data in each slightly differs. Why would this call suspend the process and give the following errors:
    handleCommunicationError( ErrorContextData, Throwable, TransitionTicket ): A technical error occurred.
    Interface namespace = myNamespace
    Interface name = myService
    Operation name = myOperation
    Connectivity type = WS
    Application name = myAppName
    Reference name = 8bd95deb-8cf1-453d-94e5-0576bb385149
    Message Id = null
    WS style = DOC
    Start time of WS call = 2014-02-26 17:51:23.297
    Return time of WS call = 2014-02-26 17:51:23.412
    Principal name = SAP_BPM_Service
    Root error message = local part cannot be "null" when creating a QName
    Error message = Could not invoke service reference name 8bd95deb-8cf1-453d-94e5-0576bb385149, component name myComp application name myappname
    com.sap.engine.interfaces.sca.exception.SCADASException: Could not invoke service reference name 8bd95deb-8cf1-453d-94e5-0576bb385149, component name
    myCompname
    at com.sap.engine.services.sca.das.SCADASImpl.invokeReference(SCADASImpl.java:341)
    at com.sap.glx.adapter.app.ucon.SCADASWrapperImpl.invoke(SCADASWrapperImpl.java:101)
    at com.sap.glx.adapter.app.ucon.UnifiedWebServiceCallObject.invokeWebServiceOperation(UnifiedWebServiceCallObject.java:101)
    at com.sap.glx.adapter.app.ucon.UnifiedWebServiceCallClass.invoke(UnifiedWebServiceCallClass.java:178)
    at com.sap.glx.core.dock.impl.DockObjectImpl.invokeMethod(DockObjectImpl.java:657)
    at com.sap.glx.core.kernel.trigger.config.Script$MethodInvocation.execute(Script.java:248)
    at com.sap.glx.core.kernel.trigger.config.Script.execute(Script.java:798)
    at com.sap.glx.core.kernel.execution.transition.ScriptTransition.execute(ScriptTransition.java:78)
    at com.sap.glx.core.kernel.execution.transition.Transition.commence(Transition.java:196)
    at com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:163)
    at com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)
    at com.sap.glx.core.resource.impl.j2ee.J2EEResourceImpl$Sessionizer.run(J2EEResourceImpl.java:261)
    at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:152)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:337)
    at com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:149)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
    Caused by: java.lang.IllegalArgumentException: Could not process message for operation myOperation in web service plugin module.
    at com.sap.engine.services.sca.plugins.ws.WebServiceImplementationInstance.accept(WebServiceImplementationInstance.java:228)
    at com.sap.engine.services.sca.das.SCADASImpl.invokeReference(SCADASImpl.java:314)
    ... 19 more
    Caused by: java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
    at javax.xml.namespace.QName.<init>(QName.java:246)
    at javax.xml.namespace.QName.<init>(QName.java:190)
    at com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceImpl.getInterfaceInvoker(DInterfaceImpl.java:126)
    at com.sap.engine.services.webservices.espbase.wsdas.impl.WSDASImpl.<init>(WSDASImpl.java:43)
    at com.sap.engine.services.webservices.espbase.wsdas.impl.WSDASFactoryImpl.createWSDAS(WSDASFactoryImpl.java:39)
    at com.sap.engine.services.sca.plugins.ws.tools.wsdas.WsdasFactoryWrapper.createWsdas(WsdasFactoryWrapper.java:30)
    at com.sap.engine.services.sca.plugins.ws.WebServiceImplementationInstance.initWsdas(WebServiceImplementationInstance.java:256)
    at com.sap.
    Surely if it was the service group unassign then reassign issue then none of the calls would have worked?

    Hi David,
    While a random error is still an error it will be difficult for support to find a problem for an error which is not reproducible. It is always a faster resolution if you can determine how to provoke the error and provide those details. If we can reproduce an error on internal systems then we can fix the problem quickly and without having to access your system.
    regards, Nick

  • Linking two programs via Windows API

    I am writing a program to enhance the usability of an already written program. Someone suggested that I interface the two via the windows API: The program I would like to add functionality to was not written in java and I do not have access to the source code. What was suggested to me was that I track down the handles for the buttons on the program (the buttons being the only important features I need access to) and connect that way.
    This seemed like a good idea....except I have no idea what this guy was talking about! Can someone explain this to me or at least point me in the right direction?
    Thank you very much,
    Plastech

    So how would I find out how to access the buttons
    found in the other application? What is all this
    talk of handles? I am really not very familiar with
    the windows api.Neither am I. After all, this is a Java board.
    And how is it possible that I could access those
    handles from a different program?The "different program" needs to allow you to access them, of course, by offering the appropriate interface.

  • Error while calling ABAP program from Data Services

    Hi All,
    We have a ABAP program which accepts two parameters 1] a date 2] a string of comma separated ARTICLE numbers .
    We have used a ABAB transform in ABAP dataflow which refers this ABAP program.
    If I pass a string of 6 articles as second parameter the job executes successfully
    But if i pass 9 articles as follows
    $GV_ITEM_VALUES='3564785,1234789,1234509,1987654,1234567,2345678,3456789,4567890,5456759';
    i get the following error
    ABAP program syntax error: <Literals that take up more than one line are not permitted>.
    The error occurs immediately after ABAP dataflow starts, ie even before the ABAP job gets submitted to ECC
    I am using BODS 4.2 . The datatype of $GV_ITEM_VALUES is varchar(1000).
    The ABAP program that gets generated by the DS job has the following datatype for this parameter
    PARAMETER $PARAM2(1000) TYPE C
    Is there a different way to pass string characters to ABAP transform in data services?
    I have attached the screen shot of trace log and error
    Regards,
    Sharayu

    Hi Sharayu,
    The error your getting is because the  literals exceeds more than 72 characters.
    It seems that the length of the string is exceeding more than 72 character.
    Can you check the following in ECC GUI
    Go to Transaction SE38=>Utilities=>Settings=>ABAP Editor=>Editor=> Downwards -Comp.Line  Length(72).
    The checkbox which defines length 72 must be clicked so the error is coming. Can you uncheck the checkbox and then try passing the parameter $GV_ITEM_VALUES using the BODS job
    Regards
    Arun Sasi

  • Launching java program via windows right click

    I've written a Java Applicaton to display some data files we get from our cash registers. The app is stored in a jar file, with a manifest file. Double-clicking the jar file runs the program. Then we can select open from the file menu adn open our data files.
    What I would like to add is the ability to right-click a data file in Windows, have the Java app appear in the Open With... menu in the popup menu, and then have windows launch the jar file.
    I understand I would have to change the program to accept a parameter, and I know how to do that from the command line.
    Is it possible to add a jar file to the popup menu in windows, and pass the path of the file into the main class in the jar file?
    I did some Google searches this morning but couldn't find anything.
    Thanks
    Bill

    Well purely speaking no. But then you can do most anything you like if you are clever with C++ and JNI.

  • Problem in executing client application as windows service

    Hi
    I have a client program that sends client ip address to server.
    My Requirement is to run this client program as windows service.
    For this, i have created a jar and after that i have created a .exe file.
    now using sc command in DOS i was created a service named as ClientService
    But when i am trying to start this service like other services, it is giving error saying that "The Service did not respond to the start in a timely fashion"
    Please help me in this issue

    1.Can i lock my mobile phone from J2Me Application.In J2ME you can not.
    2.How can i register J2ME application as service,means
    it started when mobile start and continously Run on my
    mobile. can these problem have a solution ,if yes then
    how..I haven't seen any device that lets you run a J2ME app at start up as a service like windowsNT. May be you can do the above two things if you dig more in to Symbian OS programming.
    Good luck
    Manas

  • Not able to OBIEE11gAnalytics after AdminSe is converted as windows service

    Hi all,
    I recentry intalled obiee1g. All is working fine. However, I followed
    http://gerardnico.com/wiki/dat/obiee/windows_service_11g to obiee11g Admin service as windows service. I made it successfully.
    My service name: My service name: beasvc bifoundation_domain_AdminServer
    I am able to start this service via windows service. However I am not able to connect to Analytics or any other service after this service is created. I am not sure what is going on.
    Can you please help me?
    Thank you
    Raja

    Hi Krishna,
       Once you install NW04S,you can login using j2ee_admin user,but as you said that you are getting Authentication error.You can Activate Emergency user to login.
    Follow this link  <a href="http://help.sap.com/saphelp_nw04/helpdata/en/3a/4a0640d7b28f5ce10000000a155106/content.htm">Activating Emergency User</a>
    Let me know if you have any issues further
    Please Assign points if Helpful
    Regards
    Rani A

  • To call external program

    I would like to know if exists a way of to call external program in windows ce. I'm using cvm J9.

    I don't know how is configured Windows CE, but Windows ME is MIDP 2.0, and formRequest(URL) do it (but work only since MIDP 2.0).
    It's work, but in my case, i try to add arguments, and it doesn't work with : URL = "/Program Files/MyProg/myProg.exe arg1 arg2". If somebody have found a solution...

  • I am not able to login afer making obiee Admin service as windows service

    Hi all,
    I recentry intalled obiee1g. All is working fine. However, I followed
    http://gerardnico.com/wiki/dat/obiee/windows_service_11g
    to obiee11g Admin service as windows service. I made it successfully. I am able to start this service via windows service. Now I m not able to on any obiee11g tool. Can you please help me?
    Thank you
    Raja

    Hi all,
    I recentry intalled obiee1g. All is working fine. However, I followed
    http://gerardnico.com/wiki/dat/obiee/windows_service_11g
    to obiee11g Admin service as windows service. I made it successfully. I am able to start this service via windows service. Now I m not able to on any obiee11g tool. Can you please help me?
    Thank you
    Raja

Maybe you are looking for