Question : Keep Windows active with either VBScript or Batch file

Hello,

I have a PC in work, which is connected to a network outside my office. I do not have Administrator privileges.

For security reasons, if the user isn't active for 15 minutes, Windows enters that standby mode where you have to press Ctrl+Alt+Del, enter the password and log back in.

My problem is that a specific program that is connected to this outside network disconnects when Windows logs out (after 15 minutes being idle), so when I log back in, I have to restart the whole thing in order to get the program to connect again.

I tried canceling this automatic standby thing, but the user rights I have don't let me change these things (doesn't even let me cancel the screensaver etc.). So I thought of a simple bypass - if I could run some vbscript or batch file (anything that comes with a simple XP setup, I can't isntall new software or connect to the internet) that keeps Windows active, making XP think I'm using the computer, it won't log out and my problem is solved

I tried a batch file that pings many times, but pinging doesn't count as active, as it thinks it's idle and logs out.

Any help would be great..

Answer : Keep Windows active with either VBScript or Batch file

Hi urzica,

I have written a small HTA app that will press the num-lock key twice in quick succession every n seconds.  The same as if every n seconds, you then press num lock twice.  This means that the computer will remain in the num-lock state it was in.

Copy the code below and save to a text file called KeepAlive.hta

Then run the hta file and enter the number of seconds for the interval for the program to press the num-lock key.  I would suggest you use 600 (10 minutes).  Then Click OK and minimize the program.

Hope this helps,
Daz.

P.S. tested on WinXP only.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:



 
  Keep Alive  1.1
 
  
 

 
  
 
  
 

 

  Keypress frequency:    secs.

Random Solutions  
 
programming4us programming4us