Using Shell command in ASP.Net

R

RJN

Hi

I'm trying to create a windows task through code. I could do this
through the shell command and the WMIService in .net exe. But the same
doesn't work from asp.net. Any idea? This is the code

--WMI
strComputer = "."
objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
objNewJob = objWMIService.Get("Win32_ScheduledJob")
objNewJob.Creat("C:\test.exe", "********200000.000000+330", False, , ,
False, iRet)

--Shell
Shell("AT 19:00 /every:13 C:\test.exe")

Regards

rjn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top