Execute exe file as interactive in remote machines Windows 7,Vista and Windows  server 2008
Hi, How to execute exefile interactively in remote system. Previously i did using WMI scheudled job API which creates scheduled task in remote system.This scheduled task runs as user interactively in remote system(XP). WMI scheudled job API uses AT command to execute file in remote system. But At command is depreciated in windows7 and windows server 2008 and vista. So i am not able to run exe file as interactively in remote machine. help me please.. Thanks in Advance.
April 12th, 2010 3:43pm

First, my Windows 7 has an AT command. I assume you meant "deprecated", but I don't find it so. It was also on my Vista system. What edition of Windows 7 are you using that doesn't have an AT command? In any case, the Computer Management or Task Scheduler snapins can be used to schedule tasks on remote systems. C:\TEMP>at -?The AT command schedules commands and programs to run on a computer ata specified time and date. The Schedule service must be running to usethe AT command. AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]AT [\\computername] time [/INTERACTIVE] [ /EVERY:date[,...] | /NEXT:date[,...]] "command" \\computername Specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.id Is an identification number assigned to a scheduled command./delete Cancels a scheduled command. If id is omitted, all the scheduled commands on the computer are canceled./yes Used with cancel all jobs command when no further confirmation is desired.time Specifies the time when command is to run./interactive Allows the job to interact with the desktop of the user who is logged on at the time the job runs./every:date[,...] Runs the command on each specified day(s) of the week or month. If date is omitted, the current day of the month is assumed./next:date[,...] Runs the specified command on the next occurrence of the day (for example, next Thursday). If date is omitted, the current day of the month is assumed."command" Is the Windows NT command, or batch program to be run. Secondly, with Windows 7 you absolutely CANNOT schedule a command that will interact with the user UNLESS the command is being run under that user's credentials, and it will only interact with the user if the user is logged-in with those same credentials. Are you trying to schedule the command using a sys admin account? If so, that's simply not going to work. -Noel
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2010 10:50pm

how did you get around the /interactive switch belching up this message: Warning: Due to security enhancements, this task will run at the time expected but not interactively. this might do in a pinch: How can I launch an interactive cmd prompt running in SYSTEM context? or maybe this: SysInternals PsExec
April 13th, 2010 10:29pm

Perhaps I answered too generally... Navi_05 said the AT command was deprecated. I just pointed out that it's still around. As you have said, it will emit the message you have noted if you specify /INTERACTIVE. If that was the implication of the "deprecated" comment, I'm sorry I missed that. SCHTASKS seems to have some promise for scheduling a particular task using particular user credentials. C:\TEMP>schtasks /? SCHTASKS /parameter [arguments] Description: Enables an administrator to create, delete, query, change, run and end scheduled tasks on a local or remote system. Parameter List: /Create Creates a new scheduled task. /Delete Deletes the scheduled task(s). /Query Displays all scheduled tasks. /Change Changes the properties of scheduled task. /Run Runs the scheduled task on demand. /End Stops the currently running scheduled task. /ShowSid Shows the security identifier corresponding to a scheduled task name. /? Displays this help message. Examples: SCHTASKS SCHTASKS /? SCHTASKS /Run /? SCHTASKS /End /? SCHTASKS /Create /? SCHTASKS /Delete /? SCHTASKS /Query /? SCHTASKS /Change /? SCHTASKS /ShowSid /? -Noel
Free Windows Admin Tool Kit Click here and download it now
April 14th, 2010 12:06am

Hi Noel, I tried this command from Windows server 2003 to Windows Xp machine. I got error message schtasks /create /tn "Job4" /tr d:\aa\hai.vbs /sc once /st 10:22:00 /s server1 /u ganesh /p passw1 /ru ganesh /rp passw1 ERROR: C:\WINDOWS\system32\kernel32.dll schtasks /create /tn test19 /tr h:\aa\hai.vbs /sc once /st 10:45:00 /s server2 /u ganesh /p passw1 /ru Admin /rp passw1 WARNING: The Scheduled task "test19" has been created, but may not run because t he account information could not be set. Can u pl help me..
April 19th, 2010 8:34am

The /u and /p switches don't make any sense to an XP system. Try it with only the /ru and /rp switches, specifying the account that will be logged-on the XP system when the job is to run. I was able to schedule a job on an XP system from a Windows 7 system this way, and it ran properly: C:\TEMP>schtasks /create /tn "SCTestJob1" /tr "C:\Bin\WinMessage.exe Hello" /sc once /st 09:05:00 /s NoelC32 /ru UserName /rp Pswd SUCCESS: The scheduled task "SCTestJob1" has successfully been created. Unfortunately I don't have a Windows Server 2003 system to test with here. -Noel
Free Windows Admin Tool Kit Click here and download it now
April 19th, 2010 4:08pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics