Hi All, I have some Windows GUI programs that need to write into a folder that the user may not have the required privileges to write to. I think there is a way to ask Windows, with a prompt to the user, to up the privileges to allow the write of a file to the folder. I will do some research on this but maybe someone here has already done this and can save me some time. Thanks, Lou You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Friday, June 5, 2015 at 8:49:13 AM UTC-7, Louis LaBrunda wrote:
--
If a specific user has need to write to a specific folder, adjust the security settings for that folder to permit the user to write.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Hi Richard,
-- Thanks for the suggestion but those kinds of changes are out of my hands and tech support can change things at any time. I would like to use some call to windows, get the user to okay the change in privileges to save the file and be done. Lou On Friday, June 5, 2015 at 12:07:54 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Friday, June 5, 2015 at 9:19:36 AM UTC-7, Louis LaBrunda wrote:
--
It appears this is not possible as stated. http://stackoverflow.com/questions/573086/how-to-elevate-privileges-only-when-required However, there is no particular reason you cannot write the file in one place and copy it to another (using XCOPY, for example, with elevated privileges).
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Thanks Richard. I wanted to avoid thinks like XCOPY but I will look into it.
-- Lou On Friday, June 5, 2015 at 12:26:51 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
On Friday, June 5, 2015 at 9:41:08 AM UTC-7, Louis LaBrunda wrote:
--
The bottom line appears to be that a program must be started with the privileges it needs. So you either start you application with that privilege or you spawn another program with what it needs.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Richard, you are of course correct...we must start the application with the required privileges.
-- But I have a similar issue to solve as Louis. One thought I had, was to determine if the program had been started with administrator privileges (ie. Run as Administrator) or not. If not, the user could then be prompted to restart the program with the correct rights. Do you happen to know if there is a means by which we can determine if our program has the required privileges? Perhaps a Windows API call? Regards, Julian Ford On Friday, June 5, 2015 at 12:48:59 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Administrator
|
No idea at all! I suspect (am guessing!) you could try an operation which requires the privilege and catch the error. That is rather clumsy, so I would not be surprised to find there is a better way. Check Stack Overflow, or Google in general. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Thanks, Richard. I appreciate the reply.
-- I had, of course, thought of that...but was really hoping for something a bit more elegant. I will certainly check into Stack Overflow. Perhaps I can find something there that can then be ported to VAST. Thanks again! Regards, Julian On Friday, July 24, 2015 at 1:40:49 AM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Richard Sargent
Hi Julian,
I would start to check out this method OsCall lookupPrivilegeValue: lpSystemName lpName: lpName lpLuid: lpLuid Hope this helps, Sebastian On 2015-07-23 10:40 PM, Richard Sargent
wrote:
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at http://groups.google.com/group/va-smalltalk. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |