Technology Get the latest on technology, electronics and software…

Windows Bash Script

Old Oct 2, 2009 | 09:37 AM
  #1  
jumper_bl's Avatar
Thread Starter
who is your daddy?
 
Joined: Feb 2004
Posts: 323
Likes: 0
From: NH
Windows Bash Script

Hey,

I have a work laptop which does not allow me to stop the screensaver from coming up after not using it for 15 minutes. They took away admin previleges. I was thinking about writing a windows bash script which would move the mouse using the Mousekeys. Is there anyone who knows how to send number keys in bash script?
Reply
Old Oct 2, 2009 | 09:47 AM
  #2  
zeroday's Avatar
Race Director
 
Joined: Dec 2001
Posts: 17,921
Likes: 15
I definitely don't condone bypassing security controls your company put in place but:

http://support.microsoft.com/kb/151715

use this to create a looping numlock on/off script. it will have the effect you are looking for.
Reply
Old Oct 2, 2009 | 10:16 AM
  #3  
jumper_bl's Avatar
Thread Starter
who is your daddy?
 
Joined: Feb 2004
Posts: 323
Likes: 0
From: NH
That seems a bit risky to add to Autoexec.bat or Config.sys. Is there anything easier that this?
Reply
Old Oct 2, 2009 | 10:21 AM
  #4  
zeroday's Avatar
Race Director
 
Joined: Dec 2001
Posts: 17,921
Likes: 15
ok try this one then:

place these two lines in a file and save it as numlock.vbs:
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"

place that in a looping batch script, ie:

@echo off
:loop
numlock.vbs
sleep 10
goto loop

Reply
Old Oct 2, 2009 | 10:32 AM
  #5  
stogie1020's Avatar
Needs more Lemon Pledge
 
Joined: Mar 2005
Posts: 52,768
Likes: 2,000
From: Phoenix, AZ
:ibOPgetsfired:
Reply
Old Oct 2, 2009 | 10:40 AM
  #6  
Billiam's Avatar
Big Block go VROOOM!
 
Joined: Oct 2003
Posts: 8,578
Likes: 1
From: Chicago Burbs
Instead of a looping script, couldn't you just set a regular Windows scheduled task to run every 14 minutes with task duration of 23 hours 59 minutes? That would probably also give a greater degree of freedom as to what's actually run to keep the screen saver off.
Reply
Old Oct 2, 2009 | 10:55 AM
  #7  
jumper_bl's Avatar
Thread Starter
who is your daddy?
 
Joined: Feb 2004
Posts: 323
Likes: 0
From: NH
Thanks...

Originally Posted by zeroday
ok try this one then:

place these two lines in a file and save it as numlock.vbs:
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{NUMLOCK}"

place that in a looping batch script, ie:

@echo off
:loop
numlock.vbs
sleep 10
goto loop

Reply
Old Oct 2, 2009 | 10:57 AM
  #8  
stogie1020's Avatar
Needs more Lemon Pledge
 
Joined: Mar 2005
Posts: 52,768
Likes: 2,000
From: Phoenix, AZ
Jumper, clearly your employer has determined that there is something on your laptop that is sensitive enough to warrant the protection.

Subverting this is a really bad idea in the event someone gains access because your machine was not locked...

What type of company do you work for and what type of info are they trying to protect on the laptop?
Reply
Old Oct 2, 2009 | 11:35 AM
  #9  
zeroday's Avatar
Race Director
 
Joined: Dec 2001
Posts: 17,921
Likes: 15
lol watch, this guy probably works at my company and I'm telling him how to circumvent the controls I put in place.
Reply
Old Oct 2, 2009 | 11:48 AM
  #10  
Shalooby's Avatar
Secret Agent
 
Joined: Aug 2006
Posts: 4,298
Likes: 31
From: N Va
There's a million technical ways to make this happen. But you don't need a battleship to sink a rowboat. Reminds me of a complex solution that accomplished the same thing as turning off the light.

Open Notepad, or Word or hell, even a email. Take a small piece of paper and jam the "A" key, ( or any key for that matter ) so it just repeats. Then minimize the window.

Done.

Anyone can make the simple complex. The real brilliance is when you make the complex simple.
Reply
Old Oct 2, 2009 | 11:57 AM
  #11  
zeroday's Avatar
Race Director
 
Joined: Dec 2001
Posts: 17,921
Likes: 15
Yeah brilliant Shalooby. Maybe you should post that on http://thereifixedit.com/ lol
Reply
Old Oct 2, 2009 | 01:30 PM
  #12  
Anachostic's Avatar
Safety Car
 
Joined: Jul 2007
Posts: 4,845
Likes: 145
Originally Posted by Shalooby
There's a million technical ways to make this happen. But you don't need a battleship to sink a rowboat. Reminds me of a complex solution that accomplished the same thing as turning off the light.

Open Notepad, or Word or hell, even a email. Take a small piece of paper and jam the "A" key, ( or any key for that matter ) so it just repeats. Then minimize the window.

Done.

Anyone can make the simple complex. The real brilliance is when you make the complex simple.
Anything worth doing is worth overdoing. I suggest using a concrete block instead of a piece of paper.
Reply
Old Oct 2, 2009 | 03:01 PM
  #13  
Shalooby's Avatar
Secret Agent
 
Joined: Aug 2006
Posts: 4,298
Likes: 31
From: N Va
Originally Posted by zeroday
Yeah brilliant Shalooby. Maybe you should post that on http://thereifixedit.com/ lol
Hey, I can't help it if I got a few redneck genes running around. Comes in handy sometimes.
Reply
Old Oct 2, 2009 | 04:45 PM
  #14  
mcflyguy24's Avatar
Suzuka Master
 
Joined: Feb 2007
Posts: 5,846
Likes: 24
From: Oreland, Pa
Originally Posted by zeroday
Yeah brilliant Shalooby. Maybe you should post that on http://thereifixedit.com/ lol
Hahaha that site is hilarious!

My favorite:



And the comment:
Fixer Vexarr says, “While grounded in concern, I feel your criticism is insulated from the realities of the field. I’m sure the load was line balanced and work conducted in a positive manner. No reason to get short. I see no reason to be alternating from their current policies."

^I didn't know people from Acurazine were posting on there as well
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
le^2
5G TLX (2015-2020)
32
Mar 17, 2026 05:06 AM
iRaw
ILX Photograph Gallery
30
Aug 5, 2016 04:41 PM
xsilverhawkx
2G TL Problems & Fixes
4
Oct 5, 2015 11:00 AM
xsilverhawkx
2G TL Problems & Fixes
5
Sep 28, 2015 06:51 PM
AcuraKidd
Non-Automotive & Motorcycle Sales
0
Sep 25, 2015 11:18 PM



All times are GMT -5. The time now is 07:42 PM.