![]() | Register | FAQ | Members | Social Groups | User Map | Calendar | Search | Today's Posts | Mark Forums Read |
| Notices |
Windows
Windows forum sponsored by |
| | | LinkBack | Thread Tools | Search Thread | Language |
| | #16 |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | It is to do with the .net securities... bugger It's starting to look like I may have to rewrite it all as a vbscript, which is a pity, cause I was so proud of my little .exe |
| |
| | #17 | |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | Quote:
| |
| |
| | #18 |
![]() Join Date: Mar 2008 Location: London
Posts: 180
Thanks: 9
Thanked 12 Times in 11 Posts
Rep Power: 4 | Why not use the vbs to call a webpage and pass info to it (in the url?), then process it using whatever script you like - asp, php etc. Almost tempted to knock something up myself, but am against time atm. EDIT: Or share from webserver and run a script file that way which does what you want Last edited by kesomir; 17-08-2008 at 12:59 PM.. |
| |
| | #19 | |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | Quote:
Could you elaborate a little more on the running a script from a webserver bit please? The one thing that keeps niggling at me is that I need to just bite the bullet and do it properly using vbscript + odbc, i'm just worried about the ODBC availablility to connect to mysql on each client | |
| |
| | #20 |
![]() Join Date: Mar 2008 Location: London
Posts: 180
Thanks: 9
Thanked 12 Times in 11 Posts
Rep Power: 4 | I run *nix webservers, so in my instance I would create a samba share with a batch file, php file, perl file etc that manipulates the database with the parameters it's passed. The advantage first method of calling the webpage is that it's probably very familiar for the variable passing, but you may need to launch a webbrowser (then close it) to do it?? The second method is basically the same implementation as your .exe but calling a script on the webserver. This avoids the problems with your .net security. Advantage of doing it on *nix is that the script can be almost any flavour you want - including php. If you were doing it on windows, you're a bit more restricted in the languages you can use - I don't know if you can execute php from the command line in windows but you can easily on a shell. it would look something like this: calling 'concurrent_users.sh type username hostname' Code: #!/usr/local/bin/php -q
<?php
//grab the parameters
//type
$type = $argv[1];
//username
$username = $argv[2];
//hostname
$hostname = $argv[3];
// execute the database call and make the write from the passed parameters
switch($type){
case 'logon':
//check to see if logged on and if time isn't beyond auto expire
//write logon data inc time etc
//allow logon
data['permit'] = TRUE;
//or not
data['permit'] = FALSE;
data['other_host'] = xxx;
break;
case 'logoff':
//delete instance of user on this hostname
break;
}
return $data;
?>
Thats a rough outline, the problems to solve would involve the returned data and the execution of the logon script. EDIT: heh - easiest way would prob be using text files as an intermediary, which I think is the current solution. This sophisticates the whole thing by adding the database, configurable settings etc. Last edited by kesomir; 17-08-2008 at 03:15 PM.. |
| |
| The Following User Says Thank You to kesomir For This Useful Post: | Nick_Parker (17-08-2008) |
| | #21 |
![]() Join Date: Oct 2007 Location: Auckland, New Zealand
Posts: 1,722
Thanks: 59
Thanked 253 Times in 230 Posts
Blog Entries: 2 Rep Power: 55 | To access a MySQL DB you would need the ODBC connector installed on each machine, luckily though it is provided as a MSI so deploying it with GP would be a snap: MySQL :: MySQL Connector/ODBC 5.1 Downloads The web idea is an interesting one though as it would limit your requirements for connecting to only one server. |
| |
| The Following User Says Thank You to SYNACK For This Useful Post: | Nick_Parker (17-08-2008) |
| | #22 |
![]() Join Date: Sep 2007 Location: UK
Posts: 152
Thanks: 5
Thanked 7 Times in 6 Posts
Rep Power: 4 | The only issue I can see with using a DB of any kind is ghost sessions, where the kids don't bother to logoff but simply shut the PC down. You might want to add some way to easily clear a session from the database if you are going to do it that way - as for me, I'm looking at a bunch of text files that can easily be deleted if we have issues or can easily free up sessions based on PC identity rather than user identity - but this is all ideas in my head and I need manglement approval to implement something like this. Az |
| |
| | #23 | |||
![]() | Quote:
Better yet (i think) is when a kid says "umm it says im logged in somwhere else" i can say "so what happened to the computer?" or "why did you press the power button?" and 90% of the time its a spot on inference. Also lets me know when a computer is freezing up etc. Quote:
Quote:
Hope this helps mate! (PS: I actually quite like the web page medium for user logon/offs -- well done Kesomir) | |||
| |
| The Following User Says Thank You to amfony For This Useful Post: | Nick_Parker (18-08-2008) |
| | #24 | |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | Quote:
There will always be problems, but hopefully limiting concurrent logons will be a bigger benefit | |
| |
| | #25 | |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | Quote:
I tried reading up on it, the one article says that it isn't actually installed until a user tries to use it, what would happen if a script tried to call it? | |
| |
| | #26 |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | Just an FYI : Getting a WSH vbscript to connect to MySQL is a mission in itself Edit: Turns out if you specify {MySQL ODBC 5.1 Driver } instead of {MySQL ODBC 3.51 Driver} it works better Last edited by Nick_Parker; 18-08-2008 at 09:18 PM.. Reason: I'm an idiot |
| |
| | #27 | |
![]() Join Date: Oct 2007 Location: Auckland, New Zealand
Posts: 1,722
Thanks: 59
Thanked 253 Times in 230 Posts
Blog Entries: 2 Rep Power: 55 | Quote:
Right click on the Software installation container and select New > Package Now navigate to were you stored the MSI using network accassable UNC paths like \\server\dist$ and select the msi file. Under the install method you want to use "Assigned" as that will install the program at startup for all users. It depends on how the package is built as to how it behaves but it is most likely to just install the whole thing when using this method, if not you could use Orca to create a MST file that would force it to. The install relys on group policy refreshing before a system reboot so it can take up to three reboots of a client to start deploying. You can speed this up by typing gpupdate /force at the command line of the client which will do it immediately. If it did not install completely it will depend on the package advertising that it can provide teh ODBC provider, if it does then when the script is run it will trigger a full install silently. Last edited by SYNACK; 18-08-2008 at 09:42 PM.. | |
| |
| The Following User Says Thank You to SYNACK For This Useful Post: | Nick_Parker (18-08-2008) |
| | #28 |
![]() Join Date: Mar 2008 Location: London
Posts: 180
Thanks: 9
Thanked 12 Times in 11 Posts
Rep Power: 4 | Perhaps when you have it working you could post a howto on the wiki - or on the forums with teh code |
| |
| | #29 |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | |
| |
| | #30 |
![]() Join Date: Jan 2008 Location: Dainfern, South Africa
Posts: 112
Thanks: 28
Thanked 4 Times in 2 Posts
Rep Power: 2 | Success I have a working vbs script that creates sessions in a MySQL DB, then deletes the session when the user logs off. You just call the script and enter the relevant arguments: example: in your logon script: WSHShell.Run "\\FileServer\NetLogon\NetworkSessions\NetworkSess ions.vbs add " & objNetwork.username & " " & objNetwork.ComputerName & " " & strGroup, 0, TRUE and in your logoff script: WSHShell.Run "\\FileServer\NetLogon\NetworkSessions\NetworkSess ions.vbs delete " & objNetwork.username & " " & objNetwork.ComputerName, 0, TRUE I am doing a some testing on it over the next few days, writing a readme, tidying up the code a bit and POSSIBLY a PHP Backend and then I'll upload to edugeek if people are interested? |
| |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Concurrent logons | mrforgetful | Networks | 7 | 28-02-2008 06:33 PM |
| Maximum concurrent connections in XP Pro? | Ben_Stanton | Windows | 5 | 30-08-2007 09:56 AM |
| Concurrent user logins on 2k3 domain | doco | Windows | 4 | 26-06-2007 11:33 AM |
| Tool to restrict concurrent application usage | meastaugh1 | Network and Classroom Management | 9 | 29-01-2007 10:23 AM |
| Wide Area Networks & Domain Logons | RobC | Networks | 4 | 16-12-2005 01:40 PM |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search Thread |
|
|




