+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 39
Scripts Thread, HTA For Controlling Workstation Internet Access in Coding and Web Development; Attached is the public release of RPKiller. Please let me know what you think (ie. does it even work for ...
  1. #1

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    HTA For Controlling Workstation Internet Access

    Attached is the public release of RPKiller. Please let me know what you think (ie. does it even work for you 8) )

    The RPKiller Manual is also available separately in PDF format.

    EDIT: Latest version: 1.2 (30.11.2005 09:30)
    * Remote task listing now works (highlights "processes to kill" if they're running on remote machines)
    * Ping function added to check for dead machines (when executing an action like Remote tasks) with 1 second timeout.
    * "Kill Process" now uses WINMGMTS (quicker) rather than a batch file + taskkill.exe
    * Browser (that is altered with CACLS.EXE) can be specified in a variable (line 45)
    * Option added to include the "Process to kill" list with the Internet On/Off command

    Coming soon: Wake On LAN; Option to use AD instead of flat-file room list; Settings stored in INI file instead of variables - no more editing the HTA should be necessary.
    Attached Files Attached Files

  2. #2
    mark's Avatar
    Join Date
    Jun 2005
    Posts
    3,983
    Thank Post
    268
    Thanked 52 Times in 46 Posts
    Blog Entries
    2
    Rep Power
    47

    Re: Disabling internet in one room.

    I cant run the .hta! The file associations are correct - is it a security level issue?

  3. #3

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: Disabling internet in one room.

    Quote Originally Posted by mark
    I cant run the .hta! The file associations are correct - is it a security level issue?
    Probably, yes :?. I'm not using SP2/firewall atm... If you are, I'd perhaps look for "IE6 SP2 HTA" issues on Google as I can't test it with an SP2 machine.

  4. #4
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,993
    Thank Post
    120
    Thanked 286 Times in 263 Posts
    Rep Power
    107

    Re: HTA For Controlling Workstation Internet Access

    Can you edit you message and put the working version up please .

  5. #5
    sahmeepee's Avatar
    Join Date
    Oct 2005
    Location
    Greater Manchester
    Posts
    795
    Thank Post
    20
    Thanked 70 Times in 42 Posts
    Rep Power
    34

    Re: HTA For Controlling Workstation Internet Access

    I managed to get this working as instructed in your message edit and it looks nice. Unfortunately Windows doesn't seem to let .hta files "run as..", so I have to be logged on under an admin account to do the good stuff (shutdown PCs etc). Anyone got any ideas?

    Feature request: It would be hella cool if you could put a "prune" button down near "Select all" and "Select all" to ping (or similar) each of the listed PCs in turn and work out if they're turned on. Otherwise trying to shut down a whole room of PCs will almost certainly end in a VBScript error when it hits one that's already off.

    Definitely keep at it!

    PS: Wake-on-LAN would be nice too!

  6. #6

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: HTA For Controlling Workstation Internet Access

    Quote Originally Posted by sahmeepee
    I managed to get this working as instructed in your message edit and it looks nice. Unfortunately Windows doesn't seem to let .hta files "run as..", so I have to be logged on under an admin account to do the good stuff (shutdown PCs etc). Anyone got any ideas?

    Feature request: It would be hella cool if you could put a "prune" button down near "Select all" and "Select all" to ping (or similar) each of the listed PCs in turn and work out if they're turned on. Otherwise trying to shut down a whole room of PCs will almost certainly end in a VBScript error when it hits one that's already off.

    Definitely keep at it!

    PS: Wake-on-LAN would be nice too!
    Thanks very much for the ideas - I understand about the timeouts and it's something I'd like to introduce. We have a machine in one of the rooms and it slows things down.

    As for WOL, I've already made an ASP version on our server which works great. /wol.asp?whs=true (wake whole site) turns on every machine in the school at 7:45am. This uses an ActiveX object downloaded from the web, and combines Active Directory, DHCP and DNS and a batch file scheduled on the server to update the CSV of MAC addresses - it can get a bit messy once machines start to get rebuilt etc. I'll investigate what other WOL options are out there and look at putting it into the script

    There may be a way to specify a username/password with elevated rights for certain tasks, but I'm not sure.

    I'm already working on running task list for remote machines as well, shouldn't be long.

    Our Network Manager would also like a script that'd clear ('X' amount of) profiles from workstations - anyone else after one of these?

    In the mean time, thanks very much for the feedback and keep the suggestions coming

    Latest version will re-posted at the top of the thread (incase we get more than 1 page on here )

  7. #7
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: HTA For Controlling Workstation Internet Access

    Great work Webman!

    Suggestions

    - Link to AD to obtain computer names (use ADSI to query AD)
    - Does the Internet block work for Firefox?
    - Could the Internet block be achieved by renaming iexplore.exe (rather than CACLing it)? If so, it could be replaced by a small .EXE which says 'Internet is disabled' or something like that.

    Finally a question, why HTA? You know you can get VisualBasic Express for free???

  8. #8

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: HTA For Controlling Workstation Internet Access

    Thanks ajbritton

    Quote Originally Posted by ajbritton
    - Link to AD to obtain computer names (use ADSI to query AD)
    I could have a look at this - would certainly make life simpler in the long run. I've used loads of ADSI with ASP on the servers, hopefully it'll be as easy with VBScript.

    Quote Originally Posted by ajbritton
    - Does the Internet block work for Firefox?
    No, but it could do. It's simply a matter of changing a few lines of code. I'll add a variable in the HTA you can change to specify your browser in the next version

    Quote Originally Posted by ajbritton
    - Could the Internet block be achieved by renaming iexplore.exe (rather than CACLing it)? If so, it could be replaced by a small .EXE which says 'Internet is disabled' or something like that.
    I don't think this would work for a couple of reasons. First, a teacher may still want access to IE, whereas with CACLS it simply removes the student group. Secondly, IIRC, iexplore.exe is guarded with Win File Protection and would be replaced.

    I wasn't aware of VisualBasic Express to be honest. I knew HTA, knew VBScript and wanted something that'd work no matter which machine one of us logged on to. It's definately something I'd consider using in the future though, thanks for the suggestion [/quote]

  9. #9
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,993
    Thank Post
    120
    Thanked 286 Times in 263 Posts
    Rep Power
    107

    Re: HTA For Controlling Workstation Internet Access

    Having it in this format as well would allow other people to contibute as well. I can do quiete a lot in VBScript and it's realted technologies but dont ask me to do the same in vb.net as everything is completely different and I havent got round to learning it much yet depite having the learning edition for a good few months now ops:

  10. #10
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: HTA For Controlling Workstation Internet Access

    @ChrisH: Lightweight ;-)

  11. #11
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    4,993
    Thank Post
    120
    Thanked 286 Times in 263 Posts
    Rep Power
    107

    Re: HTA For Controlling Workstation Internet Access

    If time permitted I would of by now you work by yourself?

  12. #12
    StewartKnight's Avatar
    Join Date
    Jun 2005
    Posts
    1,587
    Thank Post
    2
    Thanked 27 Times in 21 Posts
    Rep Power
    30

    Re: HTA For Controlling Workstation Internet Access

    I find that the "internet OFF" process only kills the current internet session, and that all you have to do is click on ie again, and you're back on the internet.

    Is it just me, or should the internet be turned off permanently?

  13. #13

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: HTA For Controlling Workstation Internet Access

    Hi Stewart,

    Part of the script should remove the read ACL for your student group on the network. You should see the following in the command window that opens:

    processed file: K:\Program Files\Internet Explorer\IEXPLORE.EXE
    processed file: K:\windows\system32\MSHTML.DLL
    processed file: K:\program files\Windows Media Player\wmplayer.exe
    processed file: K:\program files\Windows Media Player\mplayer2.exe
    processed file: K:\windows\system32\atl.dll
    You may need to get the exact name of your students group and add this to line 41/42 of the .HTA file.

  14. #14
    StewartKnight's Avatar
    Join Date
    Jun 2005
    Posts
    1,587
    Thank Post
    2
    Thanked 27 Times in 21 Posts
    Rep Power
    30

    Re: HTA For Controlling Workstation Internet Access

    Hi Webman,

    With a little tweaking, i've got the process list to look like yours, but the internet still doesn't remain off! Any ideas please?

    Is there away of changing the script to point internet explorer to a null proxy?

  15. #15

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,413
    Thank Post
    642
    Thanked 964 Times in 664 Posts
    Blog Entries
    2
    Rep Power
    327

    Re: HTA For Controlling Workstation Internet Access

    Hi Stewart,

    You can test to see if it works by running it on your machine.

    Remove IE 'read' ACL (Internet Off) (off.cmd)
    Code:
    @echo off
    cacls "C:\program files\internet explorer\iexplore.exe" /e /d YOUR_USER_GROUP
    pause.
    Re-apply IE 'read' ACL (Internet On) (on.cmd)
    Code:
    @echo off
    cacls "C:\program files\internet explorer\iexplore.exe" /e /p YOUR_NT_USERGROUP:r
    pause.
    Replace YOUR_NT_USERGROUP with the group you belong to. When running the Internet off - you should then no longer have rights to run iexplore.exe. You must also have admin rights to be able to use cacls.exe.

SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Enable/Disable workstation internet access from shortcut
    By the_mighty_boosh in forum Netware
    Replies: 3
    Last Post: 28th January 2011, 09:34 AM
  2. Replies: 4
    Last Post: 17th January 2011, 02:36 PM
  3. disabling Internet Access help!
    By Gardinho in forum Windows
    Replies: 3
    Last Post: 5th July 2007, 02:17 PM
  4. Internet Access Captchas
    By pete in forum Jokes/Interweb Things
    Replies: 0
    Last Post: 5th April 2007, 07:02 PM
  5. Controlling the Internet
    By neilenormal in forum Educational Software
    Replies: 8
    Last Post: 13th November 2005, 11:58 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •