IFW now triggering UAC prompt from scheduled task?

User discussion and information resource forum for Image products.

IFW now triggering UAC prompt from scheduled task?

Postby timg11 » Sun Feb 25, 2018 10:06 am

On a Windows 7 32 bit system, IFW has worked fine for a long time running from a .CMD script triggered by a scheduled task.
The primary system login (and the account used by the scheduled task) has administrator privileges.

Possibly due to some Windows Update, when IFW is executed from the script, it now triggers the UAC prompt, so it won't run unattended.

I tried checking the scheduled task properties box "Run with highest privileges", but that has a side effect of preventing the script from accessing networks shares.
See https://superuser.com/questions/640962/ ... work-drive

I would rather not globally disable UAC. Is there any way to "whitelist" IFW from causing UAC prompts?
timg11
 
Posts: 170
Joined: Sun Oct 02, 2011 9:31 am

Re: IFW now triggering UAC prompt from scheduled task?

Postby TeraByte Support(PP) » Sun Feb 25, 2018 11:21 pm

Are you using UNC paths with the /login option?
http://www.terabyteunlimited.com/kb/article.php?id=377
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1160
Joined: Thu Aug 11, 2011 5:51 pm

Re: IFW now triggering UAC prompt from scheduled task?

Postby timg11 » Mon Feb 26, 2018 5:22 am

Thanks Paul,

In the IFW manual for /login, it says "Image for Windows also allows you to store an encrypted password to the registry so a clear-text password is not needed. When doing this it's important to use the same user profile that will attempt to login when running Image for Windows because it can only be decrypted by the user that created it."

I thought the reason that the Scheduled Task "Run with highest privileges" cannot access the network with the credentials already stored for the logged in user is because the task is not run as the logged in user. Wouldn't that mean that the /login option in IFW would also fail if it were used from the Scheduled Task with "Run with highest privileges" set?

I'm traveling so I can't immediately test it.
timg11
 
Posts: 170
Joined: Sun Oct 02, 2011 9:31 am

Re: IFW now triggering UAC prompt from scheduled task?

Postby TeraByte Support(PP) » Tue Feb 27, 2018 10:31 pm

When you use the /login option you specify the credentials to use (e.g. for a different account). If you use a saved password then you need to make sure that it was saved in the account that will be used to run the task. For example, if you will run the task under 'admin2' you would run IFW as the 'admin2' user when you save the password so it will be saved in that account.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1160
Joined: Thu Aug 11, 2011 5:51 pm

Re: IFW now triggering UAC prompt from scheduled task?

Postby timg11 » Sat Mar 03, 2018 4:23 pm

Paul,

I'm still not able to make this work.

The manual says "/login:\\server\share*user*password
Use this option to have Image for Windows attempt to automatically login to a share on a server. This would typically be needed when Windows cannot automatically login to the share for the user profile running Image for Windows."

My complete command (called from within a scheduled task run with highest privileges) is this:

start "IMAGE BACKUP" /wait "C:\Program Files\TeraByte Drive Image Backup and Restore Suite\imagew.exe" /b /d:?C: /f:"%destpath%\TV-C.TBI" /max:640MiB /vb /mf /login:\\sun\d*tv*{#tv#}

%destpath% is set destpath=\\sun\d\IMAGES\TV\Auto7, which is the full path to the folder. The server is \\sun, and the share is \\sun\d.
I have saved the username tv, and its password in IFW under Settings / Passwords. I can now see a Stored Password with the name tv.

The command above exits with errorlevel set. The documentation is not clear on how the stored passwords are referenced. Is the {#name#} used for the username, the password or both?

I also tried this format thinking that referencing the stored name would imply the stored password also.

....... /mf /login:\\sun\d*{#tv#}

I then tried this format:
............ /vb /mf /login:\\sun\d*tv*{#tv#}

thinking maybe the user name is used explicity, and the {#tv#} string is replaced with the saved password.

That did not work either,

How is the /login option supposed to work with a saved password?
timg11
 
Posts: 170
Joined: Sun Oct 02, 2011 9:31 am

Re: IFW now triggering UAC prompt from scheduled task?

Postby TeraByte Support(PP) » Sat Mar 03, 2018 5:39 pm

The {#savedname#} style is not currently supported with the /login option. The username itself is the one that's looked up (you don't specify the password). For example:

/login:\\sun\d*tv

(tv is looked up and the saved password associated with it is used)

You should have a 'tv' named saved password in IFW. It's what would be created if you saved it from the command line. For example:
/login:*tv*passwordtexthere
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1160
Joined: Thu Aug 11, 2011 5:51 pm


Return to Image for DOS/Linux/Windows

cron