Important Notice: On February 29th, this community will be put into read-only mode. All existing posts will remain but customers will be unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

How to deploy a scheduled task via PDQDeploy

Im trying to deploy a sheduled task to defrag our users Win XP computers.

The task below runs manually, but on running through PDQDeploy it does not create the schedule as the logged on user.

I have tried entering the cld line below, and also putting it in a batch file and running it. Neither way allows me to create the task as the user.

schtasks /create /TN DEFRAG /SC Monthly /MO 1 /RU SYSTEM /TR "%windir%\system32\defrag.exe c:" >c:\defrag.txt

The log file tells me its created but I cannot see it as the user.

I guess its created as the admin user used to deploy the package.

Is there a way around this ?

Also, what is the best way to run batch files in PDQDeploy ? Convert to VBS ? Suggestions please.

Thanks a lot for your help.

Regards,

Mike.

 

0

Comments

1 comment
Date Votes
  • Mike,

    Deployments run as the admin user, so anything that gets modified for the "current user" will be in its profile.  We are working on the capability of running the deployment as the logged on user. In the meantime there is a free tool called OWExec that will let you run a command as the logged on user.  Very handy for this purpose, you would just need to include it as part of the deployment or have it on a file share that you can access from the deployment.

    PDQ Deploy can run batch files directly, so there's no need to convert to VBS.  As long as the commands run silently then you should be okay

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post