I was able to make a Windows Scheduled Task to run the batch file with elevated permissions. The only problem is you can't see it working. When we run the batch file by hand, we can see commands run in the console, and 4D start and stop. We can probably make this work by piping info out to logs, but it's awkward to test and monitor.
The steps are here. It works on an old 2008 R2 server, and we will try it on a 2012 R2 server soon. https://www.tenforums.com/tutorials/57690-create-elevated-shortcut-without-uac-prompt-windows-10-a.html Jim On Wed, Mar 20, 2019 at 6:57 AM Jim Hays <[email protected]> wrote: > Things I've tried: > > - 4D service running under local system account and under the domain > administrator account > - making a shortcut to our batch file that uses "runas.exe /savecred > /user:domain\username build_and_test.bat" > (it is supposed to run under the account and save credentials so it > doesn't ask for password the next time around) > - I tried making a Windows scheduled task but couldn't get it working - > I'll check into that again. > > I've read that there are tools from Microsoft that will let you turn off > UAC for a single application > > https://docs.microsoft.com/en-us/windows/deployment/windows-adk-scenarios-for-it-pros > > Jim > > On Tue, Mar 19, 2019 at 6:02 PM Stephen J. Orth < > [email protected]> wrote: > >> Jim, >> >> Most likely a security issue with the user account your using. How is >> the account configure? Have you tried using Windows scheduler to run this >> and see what happens? >> >> >> Steve >> >> ********************************************* >> Stephen J. Orth >> The Aquila Group, Inc. Office: (608) 834-9213 >> P.O. Box 690 Mobile: (608) 347-6447 >> Sun Prairie, WI 53590 >> >> E-Mail: [email protected] >> ********************************************* >> >> -----Original Message----- >> From: 4D_Tech <[email protected]> On Behalf Of Jim Hays via >> 4D_Tech >> Sent: Tuesday, March 19, 2019 4:55 PM >> To: 4D iNug Technical <[email protected]> >> Cc: Jim Hays <[email protected]> >> Subject: Kick off compile and build on remote server >> >> We're having trouble with "net stop" and "net start" running from a batch >> file on a Windows Server. >> >> Unless we right-click and run as Administrator, access is denied to stop >> or start a service, but we want this to happen "unattended" on the server. >> We could kick it off from a client, or have it run nightly at a certain >> time. >> >> This used to work for us a while ago, but it seems Windows security is >> tighter now. >> >> Does anyone have this working? >> >> Thanks, >> >> Jim >> ********************************************************************** >> 4D Internet Users Group (4D iNUG) >> Archive: http://lists.4d.com/archives.html >> Options: https://lists.4d.com/mailman/options/4d_tech >> Unsub: mailto:[email protected] >> ********************************************************************** >> >> ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

