Hello Kay,

O/S: Windows 7 Pro (x64)
SuRun version: v1.2.1.0

I use ERUNT registry backup software to backup the registry at each bootup at the start of the day. I set it up in Task Manager to run a batch file that starts the ERUNT program at logon. In Task Manager, I check the box: "Run with highest privileges". The batch file uses this command:

"C:\Program Files (x86)\ERUNT\AUTOBACK.EXE" C:\Windows\ERDNT\#Date# /noconfirmdelete /days:14

I get a Windows error when the batch file tries to run, it states:

"Unable to create folder:
C:Windows\ERDNT\6-3-2013"

In SuRun, I give AUTOBACK.EXE, ERUNT.EXE, ERDNTRegBackup.cmd and cmd.exe administrator rights. This seems to be a new error, it didn't happen before. In Windows XP, I use SuRun v1.2.0.6 with ERUNT and I do not receive this error, AUTOBACK.EXE is able to write to the C:\Windows\ERDNT directory ok. I even upgraded from v1.2.1.0 to v1.2.1.1b7 but it still gives the error. Interestingly enough, if I double-click on ERDNTRegBackup.cmd in the C:\Program Files (x86)\ERUNT directory, the batch file runs ok. So it appears SuRun is giving administrator rights on the batch file ok, but it just won't autorun without producing the write-access error. Can you test ERUNT in SuRun on Windows 7 (x64) with an autorun batch file? Thanks.
Hello LP,

I guess that the AutoRun entry is started in HKLM\Software\Windows\Currentversion\RUN.
This entry is started by csrss.exe in which SuRun does not set a hook into.
You need to change the AutoRUN entry to
"%WINDIR%\SuRun.exe" "C:\Program Files (x86)\ERUNT\AUTOBACK.EXE" C:\Windows\ERDNT\#Date# /noconfirmdelete /days:14
to make SuRun start the backup.

If you mean "Task Scheduler" with the name "Task manager"... You can set the Task to run with elevated rights, or just prepend %windir%\surun.exe as in the example above.
Thank you for your reply.

Sorry, I meant 'Task Scheduler' not 'Task Manager'. Yes, ERUNT is setup in 'Task Scheduler' to run with 'elevated rights'.

It looks like that did it, adding "%windir%\SuRun.exe" to the batch file enables the ERUNT program to run, but now I get a SuRun dialog box needing authorization. In SuRun settings, I always check the box: 'User can only run predefined programs with elevated rights'. So now when the batch files runs, I receive a SuRun error:

SuRun options restrict you (TEST-PC\LimitedUser) to run specified applications only. You are not permitted to start "C:\Program Files (x86)\ERUNT\AUTOBACK.EXE" C:\WINDOWS\ERDNT\#Date# /noconfirmdelete /days:14 with elevated rights.

If I uncheck the box 'User can only run predefined programs with elevated rights', I receive the SuRun dialog box: 'Authorization Required' that needs to be clicked ok, but the options at the bottom are grayed out.

In SuRun, I have added the following programs to run with admin rights:

C:\Program Files (x86)\ERUNT\AUTOBACK.EXE
C:\Program Files (x86)\ERUNT\ERDNTRegBackup.cmd
C:\Program Files (x86)\ERUNT\ERUNT.EXE

We're getting closer, it looks like we're almost there.
4 Tage später
I've got ERUNT running in Windows 7 x64 using a shortcut in "C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup". The shortcut is "C:\Windows\SuRun.exe "C:\Program Files (x86)\ERUNT\AUTOBACK.EXE" %SystemRoot%\ERDNT\AutoBackup\#Date# /noconfirmdelete /noprogresswindow /days:7".

In SuRun settings, I have 2 rules:
""C:\Program Files (x86)\ERUNT\AUTOBACK.EXE" C:\Windows\ERDNT\AutoBackup\#Date# /noconfirmdelete /noprogresswindow /days:7"
and
""C:\Program Files (x86)\ERUNT\AUTOBACK.EXE" %SystemRoot%\ERDNT\AutoBackup\#Date# /noconfirmdelete /noprogresswindow /days:7".

I can't recall why there are 2. I don't have any issues with permissions using SuRun this way. I'm not sure why you're using Task Scheduler or a cmd file to kick off ERUNT, but I would suggest trying to just use a start menu shortcut.

I hope this helps!
Hello 0strodamus,

Thank you for your reply.

Yes, your method worked. I have always used a batch file in Windows 7 (x64) either from the startup folder or running from Task Scheduler with elevated rights with no issues. The error I have been receiving is recent, so it must have something to do with Windows updates.

In the workplace, I setup Windows limited user accounts along with Software Restriction Policies to lock down the workstations to prevent malware and to prevent the user from installing unauthorized software. I use SuRun to enable various authorized programs to run with admin rights such as ERUNT. Using a .lnk file (with the correct path) instead of a .cmd file did cross my mind when I was troubleshooting, but I didn't try it because I thought it wouldn't work, my mistake.

Thanks again for your suggestion. Maybe I can return the favor someday.
Hi LeastPrivileges.

I'm just glad that my suggestion worked for you. Your kind thank you is repayment enough! :-)

Take care...
Eine Antwort schreiben…
Impressum, Datenschutz