This component system with Windows XP works like a charm, with windows vista gave some problems, but with windows 7 professional I can not schedule a task and run unattended if you have not logged on. Other parameters of the task once programmed, go to taskschd.msc and there are various parameters that are not from the component. This is unfortunate. Is this the decline of the component?. I thought with version 2.0.6 this would be resolved, but remains the same.
Regards,
Ramiro Hernandez
Problems with the component in Windows 7
Re: Problems with the component in Windows 7
First and foremost I want to apologize to the authors of the component members of the forum, the tone in the post, but being several months since last mayo'2011 trying to work properly under Windows 7 and having had problems with the flag and still not be RUN_ONLY_IF_LOGGED resolved after 2.0.6 update, my anger comes to be spectacular.
Well now if I disable / enable flag RUN_ONLY_IF_LOGGED but when I hit the Apply button or OK, show me a message saying: Error Logon, Unknown user name or bad password (not previously requested the username and password under which to run the task).
With the demo application that takes the same thing happens. I'm desperate.
I put my trust on the component and as I said, it worked like a charm and saved me a lot of work, so I have it running on many of my applications now do not handle well the windows task scheduler, losing sense many of them.
Please help.
Regards,
Ramiro Hernandez
Well now if I disable / enable flag RUN_ONLY_IF_LOGGED but when I hit the Apply button or OK, show me a message saying: Error Logon, Unknown user name or bad password (not previously requested the username and password under which to run the task).
With the demo application that takes the same thing happens. I'm desperate.
I put my trust on the component and as I said, it worked like a charm and saved me a lot of work, so I have it running on many of my applications now do not handle well the windows task scheduler, losing sense many of them.
Please help.
Regards,
Ramiro Hernandez
Hello,
Thank you for your message. All of the new task settings appeared in Vista\Windows 7 are accessible through TaskDefinition property of TaskItem.
When setting flag RUN_ONLY_IF_LOGGED to OFF you need to provide account information that OS will use to run the task. So you can just setup this by calling SetAccountInformation() with proper account details before turning off this flag. The forthcoming version will include the support for creating tasks under "system" account which won't require any account settings at all.
Hope this helps.
Thank you for your message. All of the new task settings appeared in Vista\Windows 7 are accessible through TaskDefinition property of TaskItem.
When setting flag RUN_ONLY_IF_LOGGED to OFF you need to provide account information that OS will use to run the task. So you can just setup this by calling SetAccountInformation() with proper account details before turning off this flag. The forthcoming version will include the support for creating tasks under "system" account which won't require any account settings at all.
Hope this helps.
Best regards,
Igor Siticov.
Igor Siticov.
I'm not sure if I properly understood you, but turning this flag under Windows XP or earlier doesn't prompt for user name and password. It just silently won't run if you don't provide login details for the task.
Almost the same behavior under Windows Vista and later BUT OS requires you to setup user name and password when you configure the task to run when user is not logged in.
Demo project doesn't prompts any user name or password when you torn on/off this flag.
Almost the same behavior under Windows Vista and later BUT OS requires you to setup user name and password when you configure the task to run when user is not logged in.
Demo project doesn't prompts any user name or password when you torn on/off this flag.
Best regards,
Igor Siticov.
Igor Siticov.
When I create the task, I assign the username and password (last step). However when I make the change by turning off the flag "when to start only user logged on", pressing the Apply button gives the error message - Error login: unknown user name or bad password. Not that I'm doing wrong or where I'm doing wrong, or how to correct the problem.
Regards,
Ramiro Hernandez[/img]
Regards,
Ramiro Hernandez[/img]
As a sample you can use the following:
1. Open Props.pas unit from Demo project.
2. In procedure TPropsDlg.SetVistaProperties; add the following code before FTask.SetTriggers; line:
In this way the OS won't raise the incorrect user name/password error.
Hope this helps.
1. Open Props.pas unit from Demo project.
2. In procedure TPropsDlg.SetVistaProperties; add the following code before FTask.SetTriggers; line:
Code: Select all
if not (tfvNeedLogon in tfvNeedLogon) then
begin
[Add a code for dialog to request user name and password for the task]
FTask.SetAccountInformation([PROVIDED_USERNAME], [PROVIDED_PASSWORD]);
end;
Hope this helps.
Best regards,
Igor Siticov.
Igor Siticov.
Yes, yes, yes, now I do. Now it works without error relating to user and password. The code added to PropsDlg:
if not (tfvNeedLogon in tfs) then
begin
FormUsrPwd: = TFormUsrPwd.Create (nil);
FormUsrPwd.EdUsuario.Text: = FTask.AccountName;
FormUsrPwd do with
begin
ShowModal;
asUsr: = edUsuario.Text;
asPwd: = edPassword.Text;
end;
FTask.SetAccountInformation (asUsr, asPwd);
FormUsrPwd.Free;
end;
Thank you, thank you, thank you.
Ramiro
![Very Happy :D](./images/smilies/icon_biggrin.gif)
if not (tfvNeedLogon in tfs) then
begin
FormUsrPwd: = TFormUsrPwd.Create (nil);
FormUsrPwd.EdUsuario.Text: = FTask.AccountName;
FormUsrPwd do with
begin
ShowModal;
asUsr: = edUsuario.Text;
asPwd: = edPassword.Text;
end;
FTask.SetAccountInformation (asUsr, asPwd);
FormUsrPwd.Free;
end;
Thank you, thank you, thank you.
Ramiro
![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Very Happy :D](./images/smilies/icon_biggrin.gif)