Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    572

    i need to stop a process but why the code not work?

    processes = System.EnumerateProcesses();

    for j, file_path in processes do
    file = String.SplitPath(file_path);
    if (String.Lower(file.Filename..file.Extension)) == "Babylon.exe" then
    System.TerminateProcess(j);
    end
    end

  2. #2
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    processes = System.EnumerateProcesses();

    for j, file_path in processes do
    file = String.SplitPath(file_path);
    if (String.Lower(file.Filename..file.Extension)) == "babylon.exe" then
    System.TerminateProcess(j);
    end
    end

    if you use String.Lower() then your condition should have all lower case characters.
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

Similar Threads

  1. help please code doesnt work
    By GoOgLe in forum AutoPlay Media Studio 7.5
    Replies: 9
    Last Post: 12-24-2008, 05:52 AM
  2. can't get version 6 code to work in 7
    By jenny62 in forum Setup Factory 7.0
    Replies: 1
    Last Post: 09-30-2005, 09:23 AM
  3. All my code was deleted upon build...
    By Protocol in forum AutoPlay Media Studio 5.0
    Replies: 17
    Last Post: 03-02-2004, 07:39 PM
  4. Search for running process ?
    By cyberwebwerks in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 09-08-2003, 01:15 PM
  5. Software Unlock code autogeneration
    By kaylward in forum AutoPlay Media Studio 4.0
    Replies: 11
    Last Post: 02-07-2003, 12:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts