# at command help



## G-Stress (Feb 4, 2008)

Having a bit of an issue not sure what exactly the problem is. What I'm trying to do is create a scheduled task for a reverse vnc connection to automatically connect to me or at least try to every 30 minutes or at a specific hour throughout the dat, etc.

I would use the windows task scheduler but it requires authentication to run a task. I create the task just fine using the at command (this is my first time using the at command) but it just never runs the task.


```
at 00:00 %windir%\reversevnc\run.bat cmd.exe
```


```
at \\%computername% 00:00 /every:M,T,W,Th,F,S,Su cmd "%windir%\reversevnc\run.bat"
```
Then in a shell just typing "at" it displays the job added no problem it just doesn't run it.

run.bat

```
@echo off
winvnc.exe -connect hostname.dyndns.org:5500
exit
```


----------



## TheOutcaste (Aug 8, 2007)

G-Stress said:


> ```
> at \\%computername% 00:00 /every:M,T,W,Th,F,S,Su cmd "%windir%\reversevnc\run.bat"
> ```


That should be

```
at \\%computername% 00:00 /every:M,T,W,Th,F,S,Su cmd [B][COLOR="Red"]/c[/COLOR][/B] "%windir%\reversevnc\run.bat"
```
Also, "%windir%\reversevnc\run.bat" does exist on \\%computername%, and not just on your PC, right?

When you run cmd /? look closely:
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
*[*[/S] [/C | /K] string*]*

When using string, you must use either /s or (/c or /k)

HTH

Jerry


----------



## G-Stress (Feb 4, 2008)

hmmm... I guess that makes sense I did just recently learn that little trick when running ipconfig directly from run to do it cmd /k ipconfig. Anyhow for some reason this still will not connect to me. 

When using the path %windir%\reversevnc\run.bat it did nothing. When using the .exe 

%windir%\reversevnc\winvnc.exe -connect 192.?.?.?:5500 

it beeps when it should be running and in scheduled tasks it shows it's running, but it doesn't connect to me. It shows it's running as the SYSTEM user. This will work fine if I specify the currently logged on user it will run just fine, but other then that it won't 

Oh thanks for the quick reply and all help, advice I did also try /k and /s if I manually run the bat file it connects so I assume it has something to do with the SYSTEM account.


----------

