Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Programm could only load image with administrator permission  (Read 1368 times)

0 Members and 2 Guests are viewing this topic.

Akaras

  • Newbie
  • *
  • Posts: 12
    • View Profile
Programm could only load image with administrator permission
« on: October 26, 2013, 06:38:27 pm »
Hi,
When I load an image by using "loadFromFile("file.jpg")" the programm outputs to the console:
Quote
Failed to load image "image.jpg". Reason : Unable to open file
When I first compile the programm and then start it manually with administrator permissions it works perfectly.
The image and the executable are in the same directory which is not protected..

So is there a way to either do it without administrator permissions or how can I let VS2013 directly start the compiled exe with permission..

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: Programm could only load image with administrator permission
« Reply #1 on: October 26, 2013, 08:28:01 pm »
That's bizarre.  What folder are they in?  Is the image set to read-only (check Properties)?

Having VS start it with admin privileges (if it has that feature) won't be a real solution, unless you never want to distribute this program to any other computers.

Akaras

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Programm could only load image with administrator permission
« Reply #2 on: October 27, 2013, 12:33:58 am »
My Project is in the default Path..
C:\Users\akaras\Documents\Visual Studio 2013\Projects
And it is not set to read-only.. I already checked that..
I want to distribute this programm on my website, so it needs to work without administrator permission..

 

anything