SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with the component in Windows 7

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent
View previous topic :: View next topic  
Author Message
rm.ramiro



Joined: 20 Apr 2011
Posts: 7

PostPosted: Tue Sep 06, 2011 8:18 pm    Post subject: Problems with the component in Windows 7 Reply with quote

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
Back to top
View user's profile Send private message
rm.ramiro



Joined: 20 Apr 2011
Posts: 7

PostPosted: Mon Sep 12, 2011 2:48 pm    Post subject: Re: Problems with the component in Windows 7 Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Sep 16, 2011 7:44 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
rm.ramiro



Joined: 20 Apr 2011
Posts: 7

PostPosted: Wed Sep 28, 2011 2:30 pm    Post subject: Reply with quote

Yes but to put OFF RUN_ONLY_IF_LOGGED in previous versions automatically prompts the user and password, is not doing this just gives the user error and / or password. In the demo that has the component is exactly the same under Windows-7.
Help me please.
a greeting
Ramiro
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Thu Sep 29, 2011 1:58 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
rm.ramiro



Joined: 20 Apr 2011
Posts: 7

PostPosted: Thu Sep 29, 2011 7:12 pm    Post subject: Reply with quote

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]
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Sep 30, 2011 6:23 am    Post subject: Reply with quote

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:

Code:

  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;


In this way the OS won't raise the incorrect user name/password error.

Hope this helps.
Back to top
View user's profile Send private message
rm.ramiro



Joined: 20 Apr 2011
Posts: 7

PostPosted: Fri Sep 30, 2011 6:52 pm    Post subject: Reply with quote

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 Very Happy Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group