Jump to content

Scheduled launch W8.1 failing


Recommended Posts

I'm out of ideas persuading a scheduled backup run to appear to the logged in user, ie. me where I do not run as an administrator.


Direct usage is no problem, such as executing the same script from the keyboard.


Clarifying, the schedule fires, perhaps starting a network client backup but never appears to the logged in user or asks for media. I can see it in tasks.


I originally installed from my usual account, worked as above.

Tried uninstall and install logged in as admin, same result.

Tried all I think of to do with permissions.


This is V7.7, last upgraded shortly before 8 was released, and run on locked down XP Pro without more than the usual problems. In this case it is running under 8.1 Home.

I don't see why this version will not work, does all I need.

Link to comment
Share on other sites

When Retrospect Autolaunches, the program opens under the System account. Under Windows Vista or later, Windows will not allow the currently logged in user to view programs running under user accounts that are different from the currently logged in user account. Because of this, you are unable to view the Retrospect user interface when the program automatically opens for a scheduled backup.


The best workaround is to manually open Retrospect and leaving it running prior to a scheduled backup operation. This will give you full access to the user interface so that you can view what Retrospect is doing and troubleshoot any issues that may come up during a backup, such as a media request dialog box.

Link to comment
Share on other sites

Oh. Thank you (really) for the news on life is like that :-)


Bit of a whoops. Thinking about this it only makes partial sense so lets try and figure it out.

A system task isn't able to launch a UI for the logged in user. (whether this is strictly so cannot as a negative be proven) However, if the user has the UI open it can interact with a system task which starts. On the other hand if the system task has started a newly started UI cannot interact but does know something is active.


This implies the scheduler is not a lot of use so maybe external control is a viable idea. Not so far. The MS scheduler silently fails to run Retrospect, although to be fair there is little it will run if it has a GUI.


A solution of leave the Retrospect UI open not acceptable. I'll think on what to do.

Link to comment
Share on other sites

Having thunk and fiddled, it is worse than I assumed. If a scheduled item fires it jams, has to be manually killed as a task under admin before the UI can be run at all.


There are a pair of candidate workarounds: -


1. Ignore the Retrospect scheduler and write an external invoker, not quite triival where there are rotating back sets.


2. No dice so far but if the Restrospect scripting or something else can send a message *before* trying to launch the UI and get jammed waiting for a "carry on". The message receiver does the UI launch.

I find the scripting a bit opaque but so far as I can see it doesn't send before trying the UI.



Or hairier fixers.


Any ideas?

Link to comment
Share on other sites

Possible but slow, unergonomic, UI causes me problems. I'm steering clear of anything slowing shutdown, slow as it is.


I didn't reply immediately, wanted to see how things panned out.


It tripped WOL, and went through to wanting media so all being well I have a workaround.


Thrown away the Restrospect scheduler, written out run scripts for all rotate versions of all versions of backup. I'd have written them on the fly but it turns out there are dirty tricks going on, can't figure it so this is simplest. (what appear to be plain scripts have secret baggage, file contents and size differ)


Win Scheduler calls a Lua script at one of the backup start times, it figures out which backup set based on time and date and invokes Retrospect which asks for a password. A variety of ways of doing this, Lua is to hand and is flexible.

Link to comment
Share on other sites

For reference

Scenario, Windows later than XP, user runs without administrator privileges, user does backup needing interactions such as to DVD.


Retrospect is unable to schedule launch the Retrospect UI, reason, Retrospect cannot bypass UAC, a security crossing.

One workaround is open the Retrospect UI before a scheduled backup. Unfortunately if this is not done and a schedule runs it opens a "silent" UI for admin with the only cure a forcible process termination by admin.


The following workaround has been tested on W8.1 with R, 7.7, backup to DVD. Multiple backups, some via network and with rotating backup media sets.

Unfortunately this requires some degree of programming skill, perhaps adjustment of disk system permissions.


The basic idea is use Microsoft Scheduler to launch Retrospect. This is done indirectly. The scheduler runs a user script or program which looks at the system clock and launches Retrospect with the correct backup to be done for that day and perhaps time.  The Retrospect scheduler is not used at all.


Lets assume we have two rotating backups run alternate weeks on a Tuesday and to two backup sets, A and B.


In Retrospect create a script with backup up and to those sets A and B, perhaps with WOL (wake on lan) enabled, software compression enabled, and eject media enabled, definitely a checksum disk check if it is DVD. No schedule.

(Retrospect handles failed file checksum by marking it not backed up, is not forgotten, either needs a second run or will get backup next time, provided you are careful with disks, no problems, I used +RW, improve with use, good for 100+ and maybe many more rewrites, just don't drop or touch or scratch)


Now, go to menu Run and select the script. Select say backup set A and create a run script, carefully saving in the run script directory with an edited filename eg.

Fred backup.rrr ==> Fred Backup A.rrr

And do it again selecting backup set B

Fred backup.rrr ==> Fred Backup B.rrr


If you were to doubleclick Fred Backup B.rrr the UI would open and a backup would start.


You have to produce a program which sees the date, works out the day of week and on alternate weeks executes the cmd Fred Backup A.rrr or Fred Backup B.rrr


Doing this is obviously involved but there are the basics. When the UI opens it will demand an admin password.


The user program could do lots of things. As it stands it will show itself on the taskbar as well as Retrospect, this is fixable. A log file might be useful.

In theory it could even be done using batch language, lots of tool choices.


Windows scheduler, set this up for the user who will be logged in, not for admin. Be a good idea to set the working directory to the script directory.

You might find it useful to have the directory where the script reside in admin documents but with the logged in user granted access rights to that directory.


Tip to stop headache, getting the computer date is left as an exercise and so is converting the date to a julian date.

local select = (julian % 7) % 2

Modulo 7 gives weeks, modulo 2 gives 0 or 1 for even or odd weeks, working around Gregorian calender nonsense (Julian days are a contiguous.number set, no year breaks)

I already have d.wday

if d.wday == 4 then -- in this case is Wednesday


In this case where fn is set, ret = os.execute('"' .. fn .. '"')

That adds quotes around the Retrospect filename... because it may contain spaces.


If you _really_ have UAC problems there are workarounds involving Scheduler and calling Shortcuts... which call what you finally want. Shortcuts allow permissions.


Foolproof? No.


Good luck.

Link to comment
Share on other sites

  • 5 months later...

Adding information.


W8.1 and W10 still suffer erratic power profiles and erratic scheduler, maybe maybe not, maybe tomorrow, etc.


Backup is likely to be disrupted by the computer going to sleep. (when the computer _will_ decide to notice the power settings :-) )


If you are scripting backup an answer is switch power plan.


Create a backup power plan, can be done via the GUI.


A command which can be executed via script or by hand from a console is



powercfg /LIST

Returns a list of plans, with the active one marked with a *


powercfg /S <GUID>

Set a plan active.


So, get the plans, parse.

Save the active plan GUID, set backup plan, do the backup, restore old active plan.


(decided I don't like W10, reverted to 8.1)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...