Forum: SuRun English speaking RSS
ERUNT software with SuRun
The Windows directory is still read-only
LeastPrivileges #1
Mitglied seit 06/2013 · 26 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
Betreff: ERUNT software with SuRun
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.
Kay (Administrator) #2
Benutzertitel: Weltverbesserer
Mitglied seit 11/2007 · 1469 Beiträge · Wohnort: Magdeburg
Gruppenmitgliedschaften: Administratoren, Mitglieder
Profil anzeigen · Link auf diesen Beitrag
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.
LeastPrivileges #3
Mitglied seit 06/2013 · 26 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
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.
Avatar
0strodamus #4
Mitglied seit 11/2012 · 6 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
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!
LeastPrivileges #5
Mitglied seit 06/2013 · 26 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
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.
Avatar
0strodamus #6
Mitglied seit 11/2012 · 6 Beiträge
Gruppenmitgliedschaften: Mitglieder
Profil anzeigen · Link auf diesen Beitrag
Hi LeastPrivileges.

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

Take care...
Schließen Kleiner – Größer + Auf diesen Beitrag antworten:
Prüfcode: VeriCode Gib bitte das Wort aus dem Bild ins folgende Textfeld ein. (Nur die Buchstaben eingeben, Kleinschreibung ist in Ordnung.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Weitere Zeichen:
Gehe zu Forum
Nicht angemeldet. · Kennwort vergessen · Registrieren
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Seite erstellt in 98,1 ms (51,4 ms) · 73 Datenbankabfragen in 20,1 ms
Aktuelle Zeit: 18.10.2017, 20:28:10 (UTC +02:00)