Jump to content

srochford

Members
  • Posts

    3,226
  • Joined

Everything posted by srochford

  1. Search the registry for a key part of the text - that should show you where the message is stored and you can just edit it to suit.
  2. Not sure I understand. What has robocopy got to do with this? Are you just copying files with robocopy but you also want to check the contents of the file? What I posted before was assuming you were running robocopy and getting a log fille - you then wanted to get something out of the log. Could you try and describe a bit more what you're trying to do?
  3. It says a lot; sadly, what it says is b*llocks!! There are people who make up stupid H&S rules but there aren't anywhere near as many as some of the press would have you believe. Too often stories (like the one quoted saying death rates haven't changed) are simply lies - sadly, they're then picked up, quoted and they spiral and it becomes "fact" when actually, it's just NOT TRUE!!!
  4. Yes; look up curl - the example here will probably do what you want: PHP: Using PHP's cURL module to fetch the example.com homepage - Manual
  5. If your main page can be ASP or PHP then it's easy - you get the public web server to call the pages from each of the internal devices. something like this should work (save this as status.asp on your web server, for example) <% response.write GetPage("http://192.168.0.1/statuspage") response.write GetPage("http://192.168.0.2/statuspage") Function Getpage(sURL) Set oXML = CreateObject("Msxml2.ServerXMLHTTP") oXML.Open "GET", sURL, False 'false means wait for page oXML.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oXML.Send GetPage=cstr(oXML.responseText) Set oXML = nothing end function %>
  6. Agreed but what you also get are the people with no *&^!"& common sense! Safety is all about risk assessment - "how likely is it that X could happen" and "if X happens, how bad would it be" In the sun cream case you're saying "how likely is it that it could be splashed or transferred onto someone else who could be harmed" and "if it splashed on someone else, what harm would it do" The likelihood is not very high - kids in a playground do bump into each other but most won't come to any harm from it. The harm it would do is pretty minute; in most cases there might be mild itching. The sensible response would be to do something like making sure that the school is notified of severe allergies and you then take steps to protect those children (perhaps isolate them or make sure they are covered up when other children are using sun cream) It seems that too few people can do the basic maths involved in working out risk (I'd guess that's the reason so many people play the lottery etc) and so we get nonsense like this case!
  7. Don't think that's what Zak asked :-) If group policy is being applied then you should either get a message saying "success" (and then you have to troubleshoot why the policy was applied but it didn't do what you expected - gpresult helps here) or you get a message saying "failure" and it might give a clue what failed (userenv logging helps here) the third possibility is that the PC isn't even realising that it should be picking up group policies at all - you then have to start checking if the machine is in the right OU, are you filtering on security groups and the machines not in the right group (or are there other "wrong" filters). DNS issues are possible here (although unlikely if the machine is just using DHCP and the others are all working)
  8. Not sure what you're doing, but I used to use robocopy to backup servers and the following subroutine was used to scan the logs (which could be massive!) to find the error line. It's called with the name of the log file to check; oFSO is the filesystemobject and it's writing a block of HTML in a variable called sSummary. This is then written to a web page that can be quickly checked to see if there are errors. It starts by scanning backwards looking for the normal ending block (it has a row of dashes then the stats; this should happen less than 20 lines from the end of the file). If it doesn't find this then it knows that the backup failed to complete. If robocopy completed, the script then keeps scanning the log looking for "ERROR: RETRY LIMIT EXCEEDED" - if it finds this then it writes the previous lines to the sSummary variable. grep and findstr work well and they're quick; the downside is that they don't give you context (so you may know an error occurred but you don't know what it was). This was designed so that IT Support staff could quickly glance at a web page and see if there were any errors and what they were. sub ScanFile(sFile) iLine = 0 set oScanFile = oFSO.OpenTextFile(sfile, 1) sText=oScanFile.readall aFileLines=split(sText,vbcrlf) oScanFile.Close iLine = Ubound(aFileLines) sSummary="" do while left(aFileLines(iLine),10)<>string(10,"-") and iFooter<20 sSummary=aFileLines(iLine) & vbcrlf & sSummary iLine=iLine-1 iFooter=iFooter+1 loop if iFooter>=20 then iSlash=instrrev(sFile,"\") sJob=mid(sFile,iSlash+1,len(sFile)-iSlash-10) sSummary="Backup not completed" sSummary=sSummary & " To re-run this backup, type \\student\adminscripts\back.wsf /job:" & sJob & "" sSummary=sSummary & " at a prompt on computer " & sBackupServer & "" iLine=Ubound(afileLines) else sSummary="" & sSummary & "" end if ofile.writeline "" For l=iLine to LBound(aFileLines) Step -1 if instr(aFileLines(l),"ERROR: RETRY LIMIT EXCEEDED.")>0 then oFile.writeLine aFileLines(l-3) oFile.writeLine aFileLines(l-2) ' oFile.writeLine aFileLines(l-1) oFile.writeLine aFileLines(l) l=l-4 end if if instr(aFileLines(l)," ERROR ")<>0 then ' if isdate(left(aFileLines(l),8)) then oFile.writeLine aFileLines(l) oFile.writeLine aFileLines(l+1) ' end if end if Next oFile.write "" & sSummary end sub
  9. I don't know of any PSU which can report the power it's providing but it's got to be possible to do it. Laptop batteries now contain "stuff" so that they can communicate with the computer about what state they're in - I'm guessing you need something along the same lines (no idea how the power meter works but it must be doing something to do with measuring draw from the battery and linking that to info about the charge stored in the battery. I know it's not totally accurate but it's going the right way) Found a link to this Zalman ZM-MFC2 Multi Fan Controller - PWM Fan Ready - FrozenCPU.com from Tom's Hardware. It monitors voltage and current to give you power consumption. As far as I can see, it just displays it on the PC but it can't be much more work for someone to make that readable with WMI or similar.
  10. It is useful - learning new stuff is always good and I'd never noticed that log parser can query a file system!
  11. They don't call me Mr Elegant for nothing :-)
  12. If you can guarantee that all machines will be switched on "today" to do the uninstall and then "tomorrow" you remove that GPO and do the install then you can carry on like this. Stage 2 is to develop the process so it copes with the situation where you're not sure when stuff will be switched on. In essence, you add a check to the process - there are loads of ways to do this but one would be to have a folder in which you put flag files. Your uninstall batch file then looks something like this: if not exist %windir%\schoolname md %windir%\schoolname if exist %windir%\schoolname\packagename.1 goto end msiexec.exe /x {an-extremely-long-product-code} /q echo uninstalled > %windir%\schoolname\packagename.1 :end First line just makes sure your flag file folder is there (call it what you want - if you use your school name then hopefully you'll remember what it's for :-)) Next checks for a flag file; if it's there you just skip to the end (put whatever the package is called; you can then use the same idea for different packages) uninstall command exactly as before Next line creates a flag file and just puts the word "uninstalled" in it; the date stamp on the file will show you when it ran if you ever need to know. Why is there a ".1" at the end of the filename? Well, this allows you to just change it to ".2" when you need to remove this package and upgrade it (or when it all goes wrong and you need to do it a second time ...) Now you've got a startup script, you'll find there are loads of other things you can do and you'll wonder how you ever managed without :-)
  13. Playing devil's advocate a bit, but there are lots of situations where teachers will require access to pupil names, addresses etc and almost none where an IT person needs that access (they need to be able to backup data etc but there's no reason for them to have access to the information contained in those files) I'm guessing this follows on from the thread elsewhere where someone asked about if IT staff should have access to the head teacher's home area. Ultimately, it comes down to trust.
  14. Definitely no problem - all you're doing is updating a database and the data has to be the same on each of the controllers (32/64)
  15. Definitely. Most printers have an "ignore A4/Letter mismatch" setting somewhere (often buried deep in other menus but if you hunt it down you will find it ...) As others have said, get *all* the regional settings right when you first install a machine - it really helps later! If you really want to clean out printer drivers it's worth looking at this Kyocera driver deleter which deletes all known printer drivers cleanly. There was a fantastic bug in an early version of Word where if you pasted any text into a document it would reset the page size to letter ...
  16. elegance needs the case statement and a little bit of tweaking :-) sCompPath = oAdSysInfo.ComputerName sBits=split(sCompPath,",") 'split up the name at the commas and store in an array sOU=lcase(sBits(1)) 'take the second bit of the name (item 0 is the computername) select case sOU case sOU="ou=r19" sPrinter="\\server\printerr19" case sOU="ou=r20" sPrinter="\\server\printerr20" case else sPrinter="\\server\mainlibrary" end select WShNetwork.AddWindowsPrinterConnection sPrinter WShNetwork.SetDefaultPrinter sPrinter Note that this also allows you to have a default if there's nothing specific ("mainlibrary" at the end)
  17. Remember that this is a very small school so it is likely that a non-IT person would need "second admin". If the head has said that the second person shouldn't be this teacher then it stops there - the IT manager (whatever their title) should absolutely accept that instruction. Just out of interest, what bit of the DPA says a teacher is less likely to be trustworthy in terms of access to data than a member of the IT Support Team?
  18. Do you have a machine startup script configured for machines in your domain? If so then you can add this to that script. if not, then now is a good time to get one :-) In group policy management console, right click at the top of the domain and choose create and link a GPO here - call it something like "machine startup settings". Edit the GPO and under Computer Configuration, Windows Settings you'll find "Scripts Startup/Shutdown" Double click on the startup option and you'll get a screen where you can add a script. I like to keep scripts for a GPO in the GPO folder (others don't ...) so click on show files to get an explorer window for this location. Right click and choose New text file. Name it "uninstall.cmd" (make sure it isn't uninstall.cmd.txt) and then edit it. In the notepad window which comes up, paste in your uninstall command and save the script. Shutdown and restart a machine and at startup the batch file should run and uninstall your software. (Note: it's probably safest to test this by initially linking your GPO to an OU with just one test PC in it - that way you don't mess up the entire network. The other thing is that this will run at every startup; ideally you only want it to run if it's not run before but if you can be sure that all the machines will be turned on in a day you can just leave it in place for one full day then remove the GPO)
  19. Virgin do 30p per day for "unlimited" access - details Virgin Mobile (fair use is 25Mb per day) They do a range of deals for minutes/data from about £10 per month on 1 month rolling contracts. Only possible problem is that you don't get a phone included.
  20. Sorry; never used Notes. (but I'm sure the answer is yes :-))
  21. What do you need to achieve? Is it just that you want to join 2 domains so they become one? If you've got domain controllers and file servers at each site and you can confine network traffic to the site then you may not need huge bandwidth (just enough for DC replication which is quite small) Do you have line of sight between your two locations? If so, you can look at laser/microwave links. They can be quite expensive to install (c. £10,000) but there are no rental costs and you can easily get 100 Mbit links. If you can't do that then as Stephen says you need to look at what the telecomms companies can offer. If you don't have Virgin in your area then it will have to be BT fibre but note that this is resold by other companies - eg Thus - and often for less than BT will charge (which is barking mad but that's the way it goes!)
  22. Annoying, but hardly the end of the world - it's not something most people need to do on a regular basis! I think it's always easy to look back and say "version X was rubbish; version X+1 was way better" but (normally!) we don't move through time like that - we start with version X, use it and find that it was better than version X-1. Eventually, X+1 comes along and we wonder why we ever put up with X, let alone X-1 There are exceptions and, sadly, Vista was one of those. It brought loads of good ideas but most of them weren't visible to most users (things like the huge number of group policy settings are completely irrelevant to a home user; the much better tablet support is seen by a tiny number of users; better power management doesn't matter if you use a desktop and so on). What they actually saw was an OS that ran abysmally slowly on hardware that was excellent with XP and kept prompting them whenever they made system changes (even though that behaviour is very similar to Mac OS which most people think is the bestest, shiniest OS ever :-))
  23. If the question is "how do I use a script to find out XXX about my PC" then the answer is almost always "use WMI" :-) Given that little acronym, googling just becomes so much easier! A really good way to find out what you can do with WMI is to use the Microsoft Scriptomatic tool
  24. Yes, but that kind of messes things up when someone's made the effort to be creative and make something that will look wrong when it's stretched :-)
  25. they think they're people with a brain and some common sense! How exactly will a system like this "protect the children"??? Just remember (and it was a point made by Philip Pulman as well as many others before) that the vast majority of attacks on children come from parents and other relatives - we don't bother to do any checks on them!
×
×
  • Create New...