We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

blaze
Posts: 16
Joined: Wed May 23, 2007 7:16 pm
Location: Macrovision
Contact: Website

Creating password for Scheduled Tasks

I need to register several Scheduled Tasks to run when the current user is not logged in. This is for an internal product so I am not overly concerned with passing passwords in the clear if necessary. I had initially tried passing a password property as a command line argument and later today tried entering the password with a Dialog and Edit Box. With either mode it appears that the raw password text is invalid. Does the password need to be passed to a crypt routine first? How?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

When using a property to set the password for a scheduled task make sure you use a public property (upper cases). This is because only public properties are passed from UI to InstallExecute Sequence.

Also note that you can configure the task to run in the System context. For this leave the "User" field empty.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
blaze
Posts: 16
Joined: Wed May 23, 2007 7:16 pm
Location: Macrovision
Contact: Website

Hello,

1. While writing this reply I understood how what you wrote so I am now using the System context for my Scheduled Tasks. Thanks!!!

2. If I had still wanted to pass in the password I am not certain how this would be accomplished as passing in the raw text fails. I have verified that the value of my property contains the correct clear text password, but during install I get the error message:
"A Scheduled Task could not be created because: Access is denied."
I note that when a password is provided in the AI dialog the resulting XML file contains a cypher string rather than the original text. I am still assuming that failure to cypher the raw text is why my tests failed.

Thank you
--Blaze
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi Blaze,

You can set the password for a scheduled task in two way:
1. Plain Text when "Use predefined password" radio is checked. This is crypted in the AIP and MSI files.
2. As a property when "Use property to set password" radio is checked. This is not crypted.

So in what field you type the property? And note that the property must be a public one (in upper cases).

Best Regards,
Gigi
_______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
blaze
Posts: 16
Joined: Wed May 23, 2007 7:16 pm
Location: Macrovision
Contact: Website

Hello,

Note: I am not going to go back and test this now that I have the Scheduled Tasks installed as system.

I had a property named PASSWORD defined as an Install Parameter. I had a Prerequisite rule verifying that the property did not equal "Your Value". I then had the property displayed within an Edit Box. Finally the property was used five times with the "Use a property to set password." selection of Scheduled Tasks.

--Blaze

Return to “Common Problems”