Announcement

Collapse
No announcement yet.

Button to launch executable only works for some users...? (File.Run issue)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Button to launch executable only works for some users...? (File.Run issue)

    Help! - I created a utility that lets users change some parameters about print locations with various txt files - then has a button to launch the executable once they are ready...

    The button to launch it only works on some PCs - although the executable is in the same directory as the utility I wrote - and they can launch it manually..

    The project is set with administrator privilege invoked.

    The script on the button is as follows:
    result = File.Run("r:\\SAMSVision\\cheqm64o.exe", "./././", "r:\\SAMSVision\\", SW_SHOWNORMAL, false);

    Al users have full access to r:\SAMSVision area and as mentioned can run the executable manually - but the button only works for a couple of them..??

  • #2
    Seems to be tied to UAC - but turning it off is not an option - we invoke administrator privilege in the application settings...

    Can anyone assist?

    Comment


    • #3
      You may want to make sure that the drive R: is mapped for the elevated account as well, not just the user starting the application. If the drive isn't mapped for both, this is precisely what might happen. You could test and log exactly what error code / message you are getting when the File.Run() action fails.

      http://support.microsoft.com/kb/937624

      Ulrich

      Comment


      • #4
        Interesting - would using the UNC path make a difference then?

        Comment


        • #5
          I think that it is worth a try.

          Ulrich

          Comment


          • #6
            Hmmm - same bizarre issue - works on 4 out of 7 computers - all Windows 7 PCs on the same domain - all users have same permission levels..

            Is there a better way to call a batch file in AutoPlay than using file.run?

            Comment


            • #7
              I would open cmd.exe with "Run as administrator", and then execute the same commands you are attempting to run from the AutoPlay application after requesting elevation. If there are permission and/or mapping issues, you might get a better look at the problem.

              Ulrich

              Comment

              Working...
              X