Before posting, and to avoid disappointment, please read the following:

  • This forum is not for 2BrightSparks to provide technical support. It's primarily for users to help other users. Do not expect 2BrightSparks to answer any question posted to this forum.
  • If you find a bug in any of our software, please submit a support ticket. It does not matter if you are using our freeware, a beta version or you haven't yet purchased the software. We want to know about any and all bugs so we can fix them as soon as possible. We usually need more information and details from you to reproduce bugs and that is better done via a support ticket and not this forum.

How to enforce programs to run with admin rights with a profile

For technical support visit https://support.2brightsparks.com/
Post Reply
hithere
Newbie
Newbie
Posts: 2
Joined: Tue Mar 22, 2016 11:52 am

How to enforce programs to run with admin rights with a profile

Post by hithere »

How to launch batch files with admin rights, defined to run before/after performing a Syncback task?

SyncBack itself is running with admin rights.

Background: I want to unlock a bitlocker protected backup drive and lock it after performing the backup with a batchfiles:

Unlock bitlocked drive batch file contents:

Code: Select all

manage-bde -unlock g: -rp 0123456-0123456-138952-233849
Lock bitlocked drive:

Code: Select all

manage-bde -lock g:
Those commands when launched manually with elevetad rightts but don't work if launched by SyncBack profile.
cliffhanger
Expert
Expert
Posts: 606
Joined: Tue May 31, 2011 5:59 pm

Re: How to enforce programs to run with admin rights with a profile

Post by cliffhanger »

Hi, the problem isn't related to any lack of elevation (assuming Pro is run that way, which it is by default, and as you obviously expect that, I assume it still is).

If you use the Test button in Programs-Before, you should get a 'file not found' error (that's the clue). The problem is that the manage-bde program you are asking Pro to call lives in \System32\ folder and because of this syndrome, Windows is redirecting Pro's call from \system32\ to \SysWOW64\ instead (where manage-bde doesn't exist - thus, the 'not found' error).

If you use the \sysnative\ path alias mentioned in the KB article, e.g.

Code: Select all

C:\windows\sysnative\manage-bde -unlock g: -rp 0123456-0123456-138952-233849
(likewise for the lock command), you should find it works. I just tried it & both commands work fine for me, but fail if I don't use the path alias.
hithere
Newbie
Newbie
Posts: 2
Joined: Tue Mar 22, 2016 11:52 am

Re: How to enforce programs to run with admin rights with a profile

Post by hithere »

Cliffhanger, I can see a huge amount of awesomeness in your postings. Thanks a lot. That helped!
rizrashdi
Newbie
Newbie
Posts: 1
Joined: Thu Oct 20, 2016 9:43 pm

Re: How to enforce programs to run with admin rights with a profile

Post by rizrashdi »

Actually I have a follow up if I may. I'm running into the same symptom. I run a simple batch file which compresses a PST file before doing the actual backup.

Code: Select all

C:\Users\xxxxx\Desktop\xxx\Email\rar a -ep -rr10%% "C:\Users\xxxxx\Desktop\xxx\Email\SDGE Archive 2016.rar"
When I manually run the batch file from windows explorer it runs fine. However when I run it using the "TEST" button through syncbackpro i get the below access denied message highlighted in yellow (I added a pause statement to see the message).
10-20-2016 2-48-40 PM.png
10-20-2016 2-48-40 PM.png (5.23 KiB) Viewed 6659 times
Syncback tells me the return code was 0 so it thinks all is well and dandy. This is on a work laptop so I do have to run things with a separate administrator login at times when I need elevated privileges. This used to work fine but I'm sure sometime along the way they pushed some new policy onto these laptops and since then I get this error. But the fact that I can double click run the file makes me think clicking the "Test" button in syncback should be ran under my same credentials. Right?....

Syncback is installed under "C:\Program Files\2BrightSparks\SyncBackPro\SyncBackPro.exe". Running SyncBackPro v7.6.8 on win7 32bit. If it helps any I use WinRAR and it uses "C:\Users\xxxxx\Desktop\xxx\Ftp\Temp" as the folder for temporary files.
Swapna
2BrightSparks Staff
2BrightSparks Staff
Posts: 992
Joined: Mon Apr 13, 2015 6:22 am

Re: How to enforce programs to run with admin rights with a profile

Post by Swapna »

Hi,

Please submit a support zip with debug logs for the profile in-question by using the Contact Support links in this article and attach the support zip file for further investigation.

http://support.2brightsparks.com/knowle ... ation-file

If your Zip is over 30MB, contact us for alternate instructions, advising the actual size. Do not try to attach to the ticket!

Do not post (nor links to) Support Zips on this open forum.

Thank you.
Post Reply