Jump to content

srochford

Members
  • Posts

    3,226
  • Joined

Everything posted by srochford

  1. Picasa is absolutely brilliant at face detection and if you just want to say "these pictures contain faces" and you can them move, delete, whatever those pictures then I think it will do the job. Be warned that it can take quite a bit of time if you've got thousands of photos!
  2. key thing which isn't always obvious is that you don't put the name of the domain -ie it's just "/domain" not "/name.of.my.domain" Excel is your friend here - get a list of usernames in column A and then in B1 put: ="net user " & A1 & " /domain /active:no" fill down, copy and paste the contents of column B into notepad save as a batch file and job done. When you want to reverse it, just put "/active:yes" in the formula and job done :-)
  3. Maybe a useful command to know is: net localgroup administrators It will show you who has local admin rights (anyone can run this command) - if it's got anything other than "administrator" and "domain admins" and you don't know what the other groups or users are there for then do some checking. If there are only the expected groups there then do: net group "domain admins" /domain again, do you recognise the people in the list? If not - find out who they are!
  4. Pretty sure there are no regulations concerning who can work in a private training company - they wouldn't offer you the job if there were. I'd guess the only worry you might have is how stable the company is. There are plenty of training companies that have been around a long time and are very good but there are some who are not. If there's a local FE college offering similar courses, will they get enough students at your company? It's quite possible that the company will offer far better training than an FE College (I've worked in one that was very mixed - some brilliant lecturers and some rather less so...) and students will flock to it. If that's the case then you should have a good, stable, enjoyable job!
  5. You certainly shouldn't need the FQDN - I've never used them but I have only used networks which have WINS installed. If you're not running WINS then have a look at How DFS Works: Remote File Systems - "How DFS Works in Environments Without WINS"
  6. Try: WshShell.RegDelete "HKLM\software\classes\Directory\Background\shellex\ContextMenuHandlers\igfxcui" but I think HKCR should work (HKCR is just an alias to the "real" location) Error 0x80070002 means "not found" so are you sure of the spelling??
  7. OK; plan B :-) Original idea was to make the script universal so that nothing had to be changed, it would run on any network. Trouble is you can't do that easily (if at all!) - you can't find the current domain name if you're not a domain member (which is kind of obvious and I'd guess I just didn't have enough coffee yesterday). This script needs 3 changes in the lines at the beginning. The first is the name of your domain, the second is the Netbios name of the domain (the bit that shows in the drop down when you go to log on) and the third the name of a domain controller. sDNS="dc=ic,dc=ac,dc=uk" sDomain = "IC" sDC="ICADS2" sUser=wscript.arguments.named("user") sPassword=wscript.arguments.named("password") sGroup=wscript.arguments.named("group") const ADS_SECURE_AUTHENTICATION = 1 const ADS_SERVER_BIND= 512 'find the distinguished name of this user 'will return N/A for either no user or wrong password sDN=getdn(sUser,sPassword,sDomain) if sDN="N/A" then wscript.echo "Can't find user" wscript.quit end if 'username and password are valid; is the user in the group 'bind to user object set oLDAP=getobject("LDAP:") set oUser=oLDAP.opendsobject("LDAP://" & sDC & "/" & sDN,sDomain & "\" & sUser,sPassword, ADS_SECURE_AUTHENTICATION + ADS_SERVER_BIND) 'assume user is not in group bInGroup=false for each oGroup in oUser.groups 'check for each group - make lcase just to avoid problems with case if lcase(oGroup.samaccountname)=lcase(sGroup) then bInGroup=True exit for end if next 'process appropriately for in/out of group if bInGroup then wscript.echo "In group, mapping drives" else wscript.echo "Not in group " & sGroup wscript.quit end if function getDN(sNTName,sPassword,sDomain) 'kludgy but saves unwanted errors on error resume next sResult="N/A" sBase="" 'set up connection to Active Direcotry set oCommand=createobject("adodb.command") sAttributes = "distinguishedName" Set oConn = CreateObject("ADODB.Connection") oConn.Provider = "ADsDSOObject" oConn.Properties("User ID") = sDomain & "\" & sUser oConn.Properties("Password") = sPassword oConn.Open oCommand.ActiveConnection = oConn set oRS=createobject("adodb.recordset") sFilter = "(samaccountname=" & sNTName & ")" 'query built here has domain name; filter based on username; only attribute needed is distinguished name and subtree means search whole directory sQuery = sBase & ";" & sFilter & ";" & sAttributes & ";subtree" oCommand.CommandText = sQuery Set oRS = oCommand.Execute 'will be EOF if not found if ors.eof then sresult="N/A" else sResult=ors("distinguishedname") end if ors.close 'return either N/A for not found or error (eg bad password) and distinguished name otherwise getDN=sResult on error goto 0 end function
  8. Can't see any reason why you shouldn't be able to use the IP address! the GPSI process is going to take the UNC, look up the server name and then connect to the server by using that IP. I wouldn't do it like that - makes life unnecessarily difficult when you want to move to new IPs (and I wouldn't use the server name either; I'd use DFS - much, much easier when you want to replace the server!) What does it say in the event log? It should have logged a reason for the install fail.
  9. Running 64 bit Windows 7 on a Lenovo laptop at home and an HP DC7800 desktop at work and it works well. Make sure that drivers are available for any existing hardware - shouldn't be a problem for the actual computer but if you want to use an existing printer, scanner, webcam etc then you might have problems (although big manufacturers are there; my Canon printer works fine as does my HP scanner) No 16 bit software will work - probably not an issue but watch out. If you use One Note then you need to know that "print to One Note" won't work unless you have 64 bit Office 2010 and that brings a whole extra bundle of problems with COM objects etc As ever, check the software you want to use with the hardware and don't buy 64 bit Windows if you've got packages that won't run with it.
  10. I might just be being stupid, but I can't see a check for password on any of the scripts so far - ie I say I'm user jbloggs and it just accepts that! The script below takes user, password and group on the command line (eg checkpassword.vbs /user:jbloggs /password:ReallyReallySecret /group:year13) and does stuff if username and password are correct and user is in the group. I've tried to add helpful comments but shout if it's not clear! sUser=wscript.arguments.named("user") sPassword=wscript.arguments.named("password") sGroup=wscript.arguments.named("group") Const ADS_NAME_INITTYPE_GC = 3 Const ADS_NAME_TYPE_1779 = 1 Const ADS_NAME_TYPE_NT4 = 3 set rootDSE=GetObject("LDAP://rootDSE") 'get the DNS name of the domain - eg dc=ic,dc=ac,dc=uk sDNS=rootdse.get("defaultNamingContext") 'now find the NETBIOS name of the domain so we can do \user later on Set oTrans = CreateObject("NameTranslate") oTrans.Init ADS_NAME_INITTYPE_GC, "" oTrans.Set ADS_NAME_TYPE_1779, sDNS sDomain = oTrans.Get(ADS_NAME_TYPE_NT4) 'find the distinguished name of this user 'function will query LDAP anonymously - quits if the user is not there sDN1=getdn(sUser,"", "",true) if sDN1="N/A" then wscript.echo "Can't find user" wscript.quit end if 'now we know the user exists; is the password they gave us valid? 'carry out the same query but this time connect to the domain using the password sDN2=getdn(sUser,sPassword,sDomain,false) if sDN1<>sDN2 then 'password is not valid wscript.echo "Wrong password" wscript.quit end if 'username and password are valid; is the user in the group 'bind to user object set oUser=getobject("LDAP://" & sDN2) 'assume user is not in group bInGroup=false for each oGroup in oUser.groups 'check for each group - make lcase just to avoid problems with case if lcase(oGroup.samaccountname)=lcase(sGroup) then bInGroup=True exit for end if next 'process appropriately for in/out of group if bInGroup then wscript.echo "In group, mapping drives" else wscript.echo "Not in group " & sGroup wscript.quit end if function getDN(sNTName,sPassword,sDomain,bAnon) 'kludgy but saves unwanted errors on error resume next sResult="N/A" sBase="" 'set up connection to Active Direcotry set oCommand=createobject("adodb.command") sAttributes = "distinguishedName" Set oConn = CreateObject("ADODB.Connection") oConn.Provider = "ADsDSOObject" 'are we doing anon bind? if not bAnon then oConn.Properties("User ID") = sDomain & sUser oConn.Properties("Password") = sPassword end if oConn.Open oCommand.ActiveConnection = oConn set oRS=createobject("adodb.recordset") sFilter = "(samaccountname=" & sNTName & ")" 'query built here has domain name; filter based on username; only attribute needed is distinguished name and subtree means search whole directory sQuery = sBase & ";" & sFilter & ";" & sAttributes & ";subtree" oCommand.CommandText = sQuery Set oRS = oCommand.Execute 'will be EOF if not found if ors.eof then sresult="N/A" else sResult=ors("distinguishedname") end if ors.close 'return either N/A for not found or error (eg bad password) and distinguished name otherwise getDN=sResult on error goto 0 end function
  11. I have an advert here for Viagra. Would that help :-)
  12. Got to be worth checking with the leasing company? I'd guess some would be horrified at the idea but I can't imagine most leasing companies will do much with laptops at the end of the lease so they're not going to lose much money even if they have to write them off.
  13. I'd run screaming from anything which says: and doesn't make the same points about any other VLE (or whatever they're trying to sell you instead of open source software) Fronter may or may not be better than Moodle (I don't know; I've never even seen it) but neither package runs by magic and at least with Moodle you don't have to pay for the software.
  14. You're right about newsid not changing the necessary info, but whether or not the WSUS SID is set shouldn't affect getting updates. What it does affect is the reporting - basically, it will look as if only one machine has got the updates but in reality they may all have updated. This is because WSUS is not a push system - Windows Updates are always pulled down by the client. This means that if your WSUS server publishes updates then your clients will pull them down - it's just that you won't know it's worked.
  15. No; the repair isn't the same - in many ways it's better because it's almost completely automatic but if the automatic stuff fails there doesn't seem to be an option to do the repair that you used to be able to do in XP.
  16. I sort of agree - I disliked the decision in earlier versions of MS Office to hide menu items which you didn't use and that's why I think the ribbon is better. The problem is, how many things can you put on a menu? If I right click on a folder in Explorer I get 10 choices (and about half of those have fly out menus with more choices) At some point, the menus get too big so by saying you have to press a modifier key to get the advanced options you can keep the menu simple. I don't think expecting people to know about shift clicking makes it particularly difficult - we're used to the fact that pressing shift while typing has a different effect so for a mouse click to do something different if we press shift seems logical and not difficult to find out.
  17. You can rename a DC - netdom is an option (but I've never used it with a DC) Assuming you've got more than one DC you can do it by moving FSMO roles to another DC, dcpromoing it down to a standalone server, renaming it and then dcpromoing it back up (leave about 15 minutes between each of the steps to allow the other DCs to catch up) What you might want to do is look at DFS Although the "D" stands for "distributed" you can use it on 1 server. This allows you to have home directories as \\\ rather than \\\ The next time you change server you just go into your DFS console, change the to be homed on the new server and magic happens :-)
  18. Also, for right click you'll see the name of the app appear in this list. Right click that and you get a couple more options including "run as admin" - handy for when you want to open a command prompt or whatever as admin.
  19. The "un-minimise all" doesn't work with Windows 7 but does work on XP - not sure about Vista (and not going to install it to find out!) Maybe instead of adding to the wiki, we could just look at the MS web site :-) http://www.microsoft.com/enable/products/keyboard.aspx
  20. The F2 key is useful in all sorts of places - as you say, it renames files etc but it also is used in Excel and Access to start editing in a cell. I reckon you should always press every key, left click, right click, double click on every object just to see what it does - that way you can often learn new and exciting things :-)
  21. Have a look at one of the machines to see how the package can be uninstalled - run regedit and browse to HKLM\software\microsoft\windows\currentversion\uninstall Find the ISA client under there (probably search for "ISA") - you'll find a batch of info on the right hand side. Check that you've got the right thing by looking at the "displayname" value. Now look at the uninstall string; it will probably something like msiexec /x {GUID - big set of numbers} Make note of that string. At a prompt type: msiexec /q /x {GUID} to uninstall the program. When you're sure that works, you can put it in a machine startup script. Ideally, you want to only run it if the software is installed so you can do something like: if not exist "c:\program files\microsoft isa client\isaclient.exe" goto end msiexec /q /x {GUID} :end - the first line is checking to see if the program is still there; you will need to change the file for one that would really be there on a system with the ISA client.
  22. I would have thought there's a good case for setting the machines to download and automatically install all critical updates. That way, it doesn't matter how good or bad the support company is; the updates will just be installed. Of course, this might lead to the odd machine failing due to a faulty update but the risk of that is massively less than the risk of an unpatched machine being let loose on the internet!
  23. I don't think it's being lazy or ripping off the customer. Most users don't want a web site which is built, finished and then that's it - they want to be able to add to it as time goes on (news items, new photos, whatever). Given that, what most users want (even though they may not know it!) is a CMS. There are several good CMS packages out there - does it really make sense to write your own? Who benefits if you do? Not the customer; it'll probably take you longer (ie cost the customer more) than using an off the shelf package. Maybe you benefit as developer - you've learned some new skills but is it worth it? I think someone's already posted something along the lines of "do you expect a plumber to make their own copper pipe?" and it's a reasonable analogy; using a CMS off the shelf is just about taking one of many tools and using it to do the job the customer wants.
  24. Not even point and click for some of it! We've gone from setting ports and IRQs with jumpers on network cards to doing it point and click to having it all done for us. Not long now before the computers take over and we can all be disposed of :-)
×
×
  • Create New...