Re: Need way to change user to access protected folder

2020-10-28 Thread Alan Bourke
There's no way to elevate an already running process, so you have to encapsulate that in a separate EXE and run that with elevated permissions. This could be as simple as creating a batch file and in there use the 'runas' command. runas /noprofile /user:mymachine\administrator myexe.exe Then

Re: Need way to change user to access protected folder

2020-10-28 Thread Fred Taylor
Hmm, vaguely remember doing this through the API more than 15+ years ago from a VFP app, but I did not take that code with me when I left as my work was ""owned" by my employer. I know it can be done, but I don't remember the details. Fred On Wed, Oct 28, 2020 at 2:09 AM Alan Bourke wrote: >

Re: Need way to change user to access protected folder

2020-10-28 Thread Alan Bourke
To be honest, for me this is a failing of network permissions policy. If your app is trusted to access this location by spawning an elevated process, why don't they just trust it to access the location all the time? -- Alan Bourke alanpbourke (at) fastmail (dot) fm ___

RE: Need way to change user to access protected folder

2020-10-28 Thread Tracy Pearson
This might be what you are looking for: https://github.com/VFPX/Win32API/blob/master/samples/sample_554.md -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Fred Taylor Sent: Wednesday, October 28, 2020 10:36 AM To: profoxt...@leafe.com Subject: Re: Ne

Re: Need way to change user to access protected folder

2020-10-28 Thread Fred Taylor
I found this on the fox.wikis.com: https://fox.wikis.com/wc.dll?Wiki~RunAsAnotherUser~VB Fred On Wed, Oct 28, 2020 at 8:38 AM Tracy Pearson wrote: > This might be what you are looking for: > https://github.com/VFPX/Win32API/blob/master/samples/sample_554.md > > > -Original Message- >