Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2006
    Posts
    7

    Grin Problem w/File.IsInUse on Win 2K

    File.IsInUse seems to work fine on XP but always returns TRUE on 2000. The program is definately not running already. Has anyone else encountered this? If so, what was the solution? Am I doing something wrong? Any help is greatly appreciated.

    in_use_result = File.IsInUse(SessionVar.Expand("%AppFolder%\\MyPro gram.exe"));
    if (in_use_result ~= true) then

    .
    .
    .
    .
    The grass may not be greener on the other side . . . but it just might have less weeds.
    Last edited by Puppet; 03-16-2006 at 10:48 PM.

  2. #2
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    In the code you posted you do not check if your File.IsInUse is true... just that it is not true (which could mean false or nil). Also, there seems to be an extra space in your action:

    Code:
    in_use_result = File.IsInUse(SessionVar.Expand("%AppFolder%\\MyProgram.exe"));
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  3. #3
    Join Date
    Mar 2004
    Location
    Toronto, ON CANADA
    Posts
    696
    FYI, that extra space sometimes occurs with this forum script (and others) when you don't place your code within the [ code ] and [ /code ] tags.

  4. #4
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Thanks Tek.

    Sorry if i misdirected...
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  5. #5
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Darryl or Mark,

    Could this one be a cousin to the File.Install() issue?
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  6. #6
    Join Date
    Feb 2006
    Posts
    7
    Thanks TJS. You definitly didn't misdirect. The program name in the .sf7 script is fine in regards to there being no spaces. It was my fault, I should have used the proper tags. I'll put future code pastes inside the tags.

    The script works fine every time in XP it's just in 2k, desktop or server, it never works. I have tried over and over. Used task manager to ensure the file was not running. There is one thing I would like to add. The exe that I'm checking if already running by using file.isinuse is a file that's part of the archive setup.exe. Is it possible that some file handle (or something similar) is left open to the file after it is extracted and is inherent in 2K and not XP? Is there a sf7 function that could "release" or "close" a file after is has been unarchived?

    I'm going to change the code to check for a condition of true as recomended by TJS. I hope that does the trick.
    Last edited by Puppet; 03-17-2006 at 09:07 PM.

  7. #7
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    np Puppet... This could be a red herring but the File.Install issue I referenced above was one that I believe IR fixed in a previous version of TrueUpdate 2.0.0.0 (shares a lot of code with SF7). The issue seemed to lock files when they shouldn't have been and prevent copying. Here's the thread...

    http://www.indigorose.com/forums/sho...ghlight=mcgill

    What version of SF7 are you running?
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  8. #8
    Join Date
    Feb 2006
    Posts
    7
    TJS, as I was looking to change the code to check for a true condition and realized that the conditional statement always returns TRUE (True) in 2K. Unfortunately that's the problem - it always true. That is why my conditional statement is the way it is. I'll take anything but true in 2k; nil, false, voltzwagen, anything - but it's always true.

    If I could unlock it would be great but I guess that won't do either since if the file is really in use, as it sometimes is, it would defeat the purpose of the isinuse check.

    The version is 7.0.1.0
    Last edited by Puppet; 03-17-2006 at 09:45 PM.

  9. #9
    Join Date
    Oct 2005
    Location
    MI
    Posts
    524
    Great scott!!! 7.0.1.0 was released in October.... of 2004! Just for giggles, try the upgrade... they've addressed tonnes of issues:

    http://www.indigorose.com/forums/showthread.php?t=15407

    http://www.indigorose.com/files/suf70/readme.htm
    Yeah right. Who's the only one here who knows the illegal ninja moves from the government?

    ()))))))))o)))))))==============================================

  10. #10
    Join Date
    Feb 2006
    Posts
    7
    I just though of something else to try. I'm doing the check on post install. I'm going to move the inuse check to pre-install and set a variable (yes, no -or- true,false) to use in a condition to decide the actions during post install.

  11. #11
    Join Date
    Feb 2006
    Posts
    7
    Yes, it's a vintage version.

Similar Threads

  1. PROBLEM: Setup Starts and then Crashes
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-15-2002, 03:02 PM
  2. PROBLEM: Setup Requests Disk 2 in a Single File Setup
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-09-2002, 02:04 PM
  3. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM
  4. Problem with AutoPlay and Win 2k
    By TJ_Tigger in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 09-12-2002, 07:59 AM

Posting Permissions

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