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 

Scheduling a task without password

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



Joined: 27 Mar 2004
Posts: 2

PostPosted: Sat Mar 27, 2004 6:06 pm    Post subject: Scheduling a task without password Reply with quote

I need to schedule a task for a user. I know what their username is, but I don't know what their password is. Is there a way I can schedule a task without this piece of information? I have not been able to figure it out. I am currently using the trial version of this product, and I will be buying it if I can get this to work!
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Sun Mar 28, 2004 5:37 am    Post subject: Reply with quote

If user has password then task should has it as well in order to run. But it is not possible to detect the user password. So you may try to configure tasks to be executed without account information. So just set account and password to empty values and then it should be possible to execute task.
Hope this helps.
Back to top
View user's profile Send private message
jkeck



Joined: 27 Mar 2004
Posts: 2

PostPosted: Mon Mar 29, 2004 12:13 pm    Post subject: Reply with quote

Hello, thank you for your prompt response. When I set account and password to empty values, the scheduled task is not able to run. Is there something I am missing? I am using Win XP.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Tue Mar 30, 2004 8:13 am    Post subject: Reply with quote

It is highly recommended to use non-empty account name and password as only
in this case a task runs under existing account, allows user input, and has
access rights corresponding to its account. However, it is possible to
schedule a task with empty account and password. This task would run under
SYSTEM account. Note, in order to schedule such a task you must run your
application under Administrator account! Another important point is if you
set blank account/password your task must be scheduled WITHOUT the flag
tfRunOnlyIfLoggedOn. So the setting account information might look as
follows:
Code:
...
if (Trim(wsAccount) = EmptyStr) and (Trim(wsPassword) = EmptyStr) then
  FTask.Flags := FTask.Flags - [tfRunOnlyIfLoggedOn]
else
  FTask.Flags := FTask.Flags + [tfRunOnlyIfLoggedOn];
FTask.SetAccountInformation(wsAccount, wsPassword);
...
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