5 replies
by it_girl_47 Accepted solution
by it_girl_47 Accepted solution
by jruby Accepted solution
This reply assumes a domain environment, workgroups could use something similar if their set up right.
Have you looked at using SCHTASKS to schedule the tasks from a central location? From your workstation (logged in with appropriate Domain Admin access), you can schedule tasks to run on other workstations. You will have to put in your credentials in order to schedule the tasks, but those would only be visible on your workstation, not the end-user stations.
A simple example:
SCHTASKS /create /S remoteworkstationname /sc once /tn alert /tr alertscript.vbs /RU domain\profile /RP password
There's a couple of parameters missing from the command line, but they will depend on your environment so I excluded them for clarity.
Hopefully this helps you out.
Jim
by larryd4 Accepted solution
I'm a bit confused.. Do you want to schedule a VB Script on a PC remotely? Or perhaps do you want to schedule a VB script remotely for all the PC's in your network.
This script will schedule a task on the PC but if its a network wide VB script, why not put it in the GP or as a log in script. So everytime the user logs in it checks and runs the script?
Anyway here is the VB code that schedules a task locally.
strComputer = "."
Set objService = GetObject("winmgmts:" & strComputer)
Set objNewJob = Service.Get("Win32_ScheduledJob")
errJobCreated = objNewJob.Create("Monitor.exe", "********123000.000000-420",
True , 1 OR 4 OR 16, , , JobID)
If Err.Number = 0 Then
Wscript.Echo "New Job ID: " & JobID
Else
Wscript.Echo "An error occurred: " & errJobCreated
End If
by it_girl_47 Accepted solution
I am going to use GP to deploy the script. I was not getting the task to run at all with the following script because I did not include the credentials. I would like 2 tasks to run so that the users are notified a few times of their password expiration. (That is what my intentions for this script are)
schtasks /create /SC Weekly /D FRI /TN Test2 /TR c:\pwd.vbs /ST 12:00:00 /SD 06/03/2008
schtasts /create /SC weekly /D WED /TN Hello /TR C:\pwd.vbs /ST 12:00:00 /SD 06/24/2008
xcopy P:\IT\test.vbs c:\test.vbs /I /H /K /Y
I will try your VB code as well. Thank you
This discussion is closed to new replies.
Trending Software posts
Sort by Trending