jcarle Posted August 9, 2007 Share Posted August 9, 2007 Like I said, I think it would be best to keep the configuration strictly in HKLM. If the settings don't exist in HKLM then it should exit. That would force proper configuration of the app for each user. But that's just the way I would do it... Well, in this case HKLM always has precedance... so it's almost the same. Link to comment Share on other sites More sharing options...
Railman5 Posted August 9, 2007 Share Posted August 9, 2007 (edited) jcarle.The attachment now includes a folder with 5 files:SessionManager.exe - The program executableInstall.bat - A batch file to copy the executable to C:\Windows\system32Remove.bat - A batch file to remove the executable from C:\Windows\system32Add To Startup.reg - A registry file which you can import to set the session manager to run from the current userRemove From Startup.reg - A registry file which you can import to remove the session manager from the current userBasically, if you throw this on say a USB stick or something, all you need to do after is run Install.bat to copy the program file, login as the user you want to limit, run Add To Startup.reg. Logout and login into any other additional users you want to limit and run Add To Startup.reg again.does your latest session manager iteration download still work as you discussed to me earlier. Iin other words do I just follow the steps as above but using this latest download or are we still a 'work in progress'. this is generating much interest in all my friends who have kids who dont know when enough pc is enough - hence my desire to get this thing working as you originally posted. Many thanks to all you brainheads working all this out.Cheers guys Edited August 9, 2007 by Railman5 Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted August 9, 2007 Share Posted August 9, 2007 I'm almost done with the configuration utility. It currently won't work in a domain environment (because I've specifically excluded domain users when it parses the users). I had to figure out how I was going to handle enumerating the users and then how I was going to prompt for the information. Now that I've figured that out I need to update it to actually write the registry entries.Can someone verify that REG.EXE does exist on XP Home Edition? I'm pretty sure it does...I just don't have access to an XP Home machine right now to check. Link to comment Share on other sites More sharing options...
jcarle Posted August 9, 2007 Share Posted August 9, 2007 (edited) does your latest session manager iteration download still work as you discussed to me earlier. Iin other words do I just follow the steps as above but using this latest download or are we still a 'work in progress'. this is generating much interest in all my friends who have kids who dont know when enough pc is enough - hence my desire to get this thing working as you originally posted. Many thanks to all you brainheads working all this out.Cheers guys Let's just wait and see what nmX.Memnoch has brewing. If he's finished his installer or not... Edited August 9, 2007 by jcarle Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted August 9, 2007 Share Posted August 9, 2007 I hope to have the configuration utility and the installer finished up tonight. But for now...off to my side job! Link to comment Share on other sites More sharing options...
jcarle Posted August 10, 2007 Share Posted August 10, 2007 I hope to have the configuration utility and the installer finished up tonight. But for now...off to my side job!Every woman's favorite chipmunk? Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted August 10, 2007 Share Posted August 10, 2007 (edited) Errr... Back to the task at hand. Is there any possiblity of changing the LoginsPermitted and SessionLength keys to REG_SZ as opposed to REG_DWORD? If not then I may end up having the script convert the decimal input to hex. Not that I can't do that...but I'd like to preserve what little of my sanity I still have left. It's going to be at least one more night. I know how I'm going to handle most everything with the configurator now...I'm just too spent to finish up the coding tonight. Edited August 10, 2007 by nmX.Memnoch Link to comment Share on other sites More sharing options...
Railman5 Posted August 10, 2007 Share Posted August 10, 2007 Great work guys.should be a real hummer when its done Link to comment Share on other sites More sharing options...
jcarle Posted August 10, 2007 Share Posted August 10, 2007 Errr... Back to the task at hand. Is there any possiblity of changing the LoginsPermitted and SessionLength keys to REG_SZ as opposed to REG_DWORD? If not then I may end up having the script convert the decimal input to hex. Not that I can't do that...but I'd like to preserve what little of my sanity I still have left. It's going to be at least one more night. I know how I'm going to handle most everything with the configurator now...I'm just to spent to finish up the coding tonight. It has to remain REG_DWORD.As for Hex conversion:Func toHex($dec) If $dec < 16 Then Return Hex($dec,1) Else Return toHex($dec/16) & toHex(Mod($dec,16)) EndIfEndFuncAnd from Hex to Decimal:$dec = Dec("49E9AB20") Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted August 10, 2007 Share Posted August 10, 2007 (edited) Turns out the latest version of AutoIt has a built in function for hex conversion... $H = Hex($DEC)Edit:If you're going to use that to write a registry value, then you have to add the "0x" to the beginning:$H = "0x" & Hex($DEC) Edited August 10, 2007 by nmX.Memnoch Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted August 12, 2007 Share Posted August 12, 2007 (edited) Here it is...it's only been tested on my machine so I hope it doesn't disappoint. Instead of running in each user's "Run" key, I changed it to a StartUp shortcut. There's a local group created by Setup. When a user is configured, the user is added to this group. The StartUp shortcut checks to see if the user is a member of this group. If so, then it starts SessionManager. If not, it just exits.Uninstalling the application completely removes all user configurations and the local group.Domain accounts aren't supported by the configurator at this time so manual configuration would still be required.Also, keep in mind this is jcarle's application...I only created the installer and configurator. Download here Here are some screenshots: Edited August 12, 2007 by nmX.Memnoch Link to comment Share on other sites More sharing options...
Zxian Posted August 12, 2007 Share Posted August 12, 2007 This looks excellent... great work both of you. This is the kind of stuff that happens when MSFN's best put their minds together. Link to comment Share on other sites More sharing options...
jcarle Posted August 12, 2007 Share Posted August 12, 2007 First off... awesome. Thanks Memnoch. Great work. Instead of running in each user's "Run" key, I changed it to a StartUp shortcut. There's a local group created by Setup. When a user is configured, the user is added to this group. The StartUp shortcut checks to see if the user is a member of this group. If so, then it starts SessionManager. If not, it just exits.Which startup is this created in? All Users or the individual user's account? Just curious... wondering if the "restricted" user can just right-click delete the shortcut in the startup account.Also, keep in mind this is jcarle's application...I only created the installer and configurator. So in otherwords, send the s*** my way, eh? I wonder what ever happened to the original poster... haven't seen him reply in this thread, which ironically, was the reason for developing the session manager. Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted August 13, 2007 Share Posted August 13, 2007 (edited) This looks excellent... great work both of you. This is the kind of stuff that happens when MSFN's best put their minds together. Thanks...we aim to please. First off... awesome. Thanks Memnoch. Great work.Thanks and you're welcome. Instead of running in each user's "Run" key, I changed it to a StartUp shortcut. There's a local group created by Setup. When a user is configured, the user is added to this group. The StartUp shortcut checks to see if the user is a member of this group. If so, then it starts SessionManager. If not, it just exits.Which startup is this created in? All Users or the individual user's account? Just curious... wondering if the "restricted" user can just right-click delete the shortcut in the startup account.It's in the All Users so a regular/restricted user can't delete it. The Configurator also won't run if a non-admin account attempts to run it. In other words, the account MUST be in the Administrators group to run the Configurator, otherwise it'll give a warning message and exit. Here's the code for the StartUp script (it's compiled into an executable by AdminScriptEditor):If InGroup("@WKSTA\SessionManager") Shell '%COMSPEC% /C START "" "%PROGRAMFILES%\SessionManager\SessionManager.exe"'EndIfThinking about it I should make a slight modification to that so that it checks for the existance of the configuration key for that user as well. It's another level of error checking that may not be necessary, but I'll add it anyway.The installer also sets custom permissions on %PROGRAMFILES%\SessionManager and all files within it so that a regular user can't edit or delete anything in it (everything is compiled into EXE's anyway).Also, keep in mind this is jcarle's application...I only created the installer and configurator.So in otherwords, send the s*** my way, eh? Not at all...I just don't want to take credit for something that isn't mine. I wonder what ever happened to the original poster... haven't seen him reply in this thread, which ironically, was the reason for developing the session manager.I noticed that as well...but other people seemed interested anyway. Edited August 13, 2007 by nmX.Memnoch Link to comment Share on other sites More sharing options...
nmX.Memnoch Posted August 13, 2007 Share Posted August 13, 2007 (edited) Done. The StartUp Utility has been updated for additional error checking. The user must be completely configured for it to start (the account must exist in the SessionManager user group and the registry entries must exist). Download Here If you've already downloaded and installed you can simply install over the previous installation. If InGroup("@WKSTA\SessionManager") And KeyExist("HKLM\SOFTWARE\SessionManager\@WKSTA\@USERID") Shell '%COMSPEC% /C START "" "%PROGRAMFILES%\SessionManager\SessionManager.exe"' EndIfjcarle: Let me know if you want a copy of all the source scripts. Edited August 13, 2007 by nmX.Memnoch Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now