Jump to content

srochford

Members
  • Posts

    3,226
  • Joined

Everything posted by srochford

  1. Provided that you only have one Outlook profile on your machine and that the user doesn't need to enter a username/password (shouldn't need to if your staff machines are domain joined) then it's easy(ish!) Add this to the login script set oOutlook=createobject("Outlook.Application") set oNameSpace= oOutlook.GetNamespace("mapi") iCount=oNameSpace.GetDefaultFolder(6).unreaditemcount 'folder 6 is inbox if iCount<>0 then msgbox "You have " & iCount & "unread email message(s)" set oOutlook=nothing The difficulty with email is always getting a balance of what people receive; if they typically get dozens of messages a day which are not relevant to them then they're just going to ignore all of them. If they rarely get any email (so they don't check it because there's never anything there) then this might help.
  2. srochford

    VBS Script

    I think you're basically there; the only thing I can see wrong is you're testing "myvariable" but you're not giving it a value. You're also testing for 12.0 (etc); it's safer to test for something like that as a string (ie "12.0") - in maths, 12 is the same as 12.0; in this situation it might not be :-) I think this should work: set oShell = createobject("wscript.shell") Set oExcel = CreateObject("Excel.Application")ll iVer= oExcel.Version oExcel.Quit sCmd="regedit /s \\mydomainname\netlogon\outlook\" & iVer & ".reg" oShell.run,,true I've used Excel instead of Word because I can't get a Word object here (could be because I've got Office 2010 installed) - I'm sure you should be able to use Word. I then just take the version number and store it in a variable - this is the key step you missed. I then simplify the rest of your code - there's nothing wrong with what you've done; I'm just saving ink :-) You're trying to use the name of the logon server; your code is wrong (example of what you can do below) but you don't need it - if your domain is called "school" then \\school\netlogon will take you to the netlogon share on a DC. The next bit of my line just saves on an IF statement; you've made a folder called "11.0" or "12.0" so you can just take advantage of that in building the command. Finally, I've marginally shortened the run command - yours is exactly right but you can just put "true" at the point it's needed and the ",," construct implies a zero (you could actually just do oShell.run sCmd; the 0 bit just says "run command in normal window" and the true bit says "wait for this to finish" - the regedit will be so quick you can do without both!) Hope that helps. If you want to specify the name of the domain controller then you've either got to extract it from the environment variable in vbscript or let the command shell expand it. Either of these would work: logondc=oShell.ExpandEnvironmentStrings("%logonserver%") sCmd=sCmd="regedit /s " & logondc & "\netlogon\outlook\" & iVer & ".reg" sCmd="regedit /s %logonserver%\netlogon\outlook\" & iVer & ".reg"
  3. But why is it annoying? It almost certainly is uneconomic (ie it's maybe costing thousands to install the test equipment but he's not paying personally so the cost is not an issue) Loads of companies spend money on getting new stuff to their own employees before the general public gets them. I'd guess BT is trying out some new kit that will get ADSL down poor lines. If they just said to everyone in the village "here you go, new broadband supply" and it then turned out to be rubbish, there'd be much more reason to complain! If everyone was prepared to pay (say) £100 a month for broadband then we could probably have better broadband everywhere - companies would be jumping at the chance to get that sort of money. When everyone wants broadband at < £10 a month (and wants totally unlimited download) then there's little incentive for companies to put in new fibre to every street or to invest in the research to get signals down the existing, poor quality copper.
  4. I've seen traffic lights with countdown timers in various places; the count for green just seems to encourage people to speed up if it's approaching zero and the count for red just means "start moving forwards" as soon as the count gets to about 5 seconds to go!
  5. I think that's the point about comedy (or pretty much any "art") - different people like different things. I think Gavin and Stacey is very funny but I can't stand Ricky Gervais, for example.
  6. Sorry; wasn't suggesting that actual money should change hands for printing but there needs to be some kind of control in place - eg you allocate a notional amount of money per week/month/term etc If a user needs more than that then a budget transfer takes place from whichever department says "my pupils need more printouts" to whoever pays for toner/printers. It is hard to manage; you know that little johnny will have been printing out rubbish, will run out of credit and need to print some piece of coursework. You probably still can't charge money for the printing but you can use appropriate punishment for the earlier waste (and this is where good logging comes in - if you can show that there were 50 printouts of the same web page or whatever then that's a good start!)
  7. the cheapest car park near Olympia used to Kings Mall in Hammersmith (about 10 minutes walk away). It's gone up in price now (web site says "from £1.50 for 2 hours") but I suspect that it's still cheaper than most places that are close. The TfL website has to be one of the best public transport websites ever :-) A quick google finds that there's actually a list of car parks with charges - Tube station car parks | Transport for London you can take your pick of which ever looks best!
  8. In many ways, you'd be better to use Outlook on a wireless laptop. If you set it up to run in cached mode (Outlook 2003 or later) then a copy of all the email is made on the local disc. This means that if you want to re-read a message, browse through messages, search etc that no network traffic is needed. If you're using OWA then every action is going to generate network traffic and will fail if it can't make contact. the only reason I can see not to use Outlook is that the email is cached; if someone steals the laptop and can log onto it then they can read all the mail (not too much of an issue if it's a domain account because it should be hard to get the password but if a local account is being used then it's easy to reset the password and get in)
  9. Do you know you can use netdom to name the computer and join it to the network? That way you're not relying on autoit sending the right key presses to the right dialogues etc (which it's good at but occasionally gets wrong :-))
  10. How much time you spend on finding the cheapest price has to depend on what you're buying. If it's a new hard disc costing about £50 you may as well just go to the supplier it's easiest to buy from. You're unlikely to save more than a fiver by shopping around but the cost of the person's time will easily be more than that £5. If it's a whole classroom full of computers then it's worth spending more time on it (but there are still limits!) If you're buying something like A4 paper where you might use tens of thousands a year then it's worth saving even a few pence on each one and so you could spend quite a bit of time on it. There have actually been several threads on here recently about how money is wasted in schools - I'm thinking of printing costs. Any school which doesn't have a charging mechanism in place is effectively throwing away money. I know it's not directly related to procurement but there needs to be a good overall view of all the money which is spent by a school and where savings can be made. Saving money by not buying paper and toner which just go in the bin at the end of the day (or even before!) has to be a good thing to do and will have little or no detrimental effect on education (and could even have positive benefits if it makes people think more about waste in general!)
  11. DHCP can easily be virtualised; it's a very light weight task. It also creates very little network traffic so in that way it's not a problem to have central DHCP servers with the traffic going over WAN links.
  12. Done a bit more reading - it wasn't just any old procession that was going on the next day; it was the Remembrance Sunday event at the Cenotaph (again, just yards from where the dozy wazzock parked his car) Given that most of the royal family, senior politicians, armed forces and loads of other people were going to be there, I suspect the police were more than normally sensitive - this is not the sort of event that you can easily postpone and it is the sort of event that would be good for a terrorist to try and attack!
  13. What software are you trying to use? DC7800 was our standard machine and we have lots of them running a pretty huge range of software without problems (and we have some pretty demanding users!) Not quite sure what you mean about not supporting 3D? They're not going to do DirectX graphics as fast as a separate PCI Express card but they should be up to most things I would have thought??
  14. Given the age of the original post, there's not much point in offering advice to the original poster - I hope it all went well for them but they don't seem to be here any longer so who knows; maybe it did all go pear shaped and they can't even get on the web any longer :-) Probably is worth emphasising the need to take everything slowly - we had a thread recently about "it wasn't like that in my last place" and people often don't like that sort of comment - even if "my last place" was way better than the current place. I'd guess that if there are lots of complaints about the way the system works (from management and users) then you can move more quickly but if most people are happy then you need to take your time otherwise you'll get the "well, when Mr X was here, everything used to work just find and now you've broken it" - which probably won't be true but is worth trying to avoid :-)
  15. I agree that the police jumped the gun and should have done at least some checking, but Horse Guards Avenue is a pretty sensitive area and looks it (it runs off Whitehall which has huge concrete barriers at the side of the road etc). The Ministry of Defence is on one side of the road and several other government buildings are close by; it's not an area where anyone with half a brain would leave an illegally parked vehicle - at minimum, you'd expect to get it towed pretty quickly.
  16. Short answer is that it's not easy :-) The slightly longer answer is the script below. This will query your AD and list every user together with their groups in a spreadsheet. Depending on what you're trying to do this might be OK (eg if an auditor says "do you have a list of the security groups for each person" then you can say yes and the auditor will be happy!) If you're trying to find out who's in "group_entitled_to_read_really_confidential_files" then this may not work for you - you need to do it the other way round (enumerate groups and then get members of the groups). It also doesn't help if you have nested groups (eg let's say you have a group called "pupils" made up of "pupils_year7", "pupils_year8" etc and the pupils are actually in the individual year groups. This will only give you the actual group they're a member of, not the parent groups Finally, it might be more useful to put this in a database (although that's kind of what AD is ...). If you did, I would have a table having 2 columns - user and group and "user" could repeat - eg: aa234 ese-phd09-dl aa234 ic-pgr-survey-dl aa234 CCML Users You can then query this to get a list of members of any group or do a cross tab to get user down the side and group across the top - a much quicker way to check who's in which group. 'get an Excel workbook ready Set oExcel= CreateObject("Excel.Application") oExcel.Application.Visible = True oExcel.Application.Workbooks.Add 'add some headings - up to "group10" oExcel.Application.activesheet.cells(1,1)="User" for i=1 to 10 oExcel.Application.activesheet.cells(1,i+1)="Group" & i next 'connect to active directory; first find the domain name Set oRootDSE = GetObject("LDAP://RootDSE") sDNSDomain = oRootDSE.Get("defaultNamingContext") 'now set up ADO Set ocommand = CreateObject("ADODB.Command") Set oConn = CreateObject("ADODB.Connection") oConn.Provider = "ADsDSOObject" oConn.Open ocommand.ActiveConnection = oConn 'want to look for all "person" objects in the domain sCMD = ";(&(objectCategory=person)(objectClass=user));distinguishedName,samaccountname;subTree" ocommand.CommandText=sCMD 'return results in blocks of 100 ocommand.Properties("Page Size") = 100 'how long to wait for results; if not returned in this time then script will give up ocommand.Properties("Timeout") = 60 'don't store data locally; if query run again then will re-visit server ocommand.Properties("Cache Results") = False oCommand.properties("sort on")="samaccountname" 'execute the query against AD and get a recordset Set oRS = ocommand.Execute 'check - did we get any results 'set row and column for Excel sheet iRow=2 if not oRS.eof then do while not ors.eof iCol=1 'get the username and show it sUser=ors("samaccountname") wscript.echo sUser oExcel.Application.activesheet.cells(iRow,iCol)=sUser iCol=iCol+1 'bind to the user set oUser=getobject("LDAP://" & ors("distinguishedname")) 'kludge - could have no members if user only in primary group (domain users) on error resume next arrMemberof=oUser.getex("memberof") if err.number=0 then 'we've got a result - are there any members if isempty(arrMemberof) then wscript.echo "None" oExcel.Application.activesheet.cells(iRow,iCol)="None" 'got something; if the result is a string there's just one member so show it elseif typename(arrMemberOf)="String" then sGroup=Clean(arrMemberof) wscript.echo sGroup oExcel.Application.activesheet.cells(iRow,iCol)=sGroup else 'get here because result is an array - show each member in turn for each sGroup in arrMemberof sGroup=Clean(sGroup) wscript.echo sGroup oExcel.Application.activesheet.cells(iRow,iCol)=sGroup iCol=iCol+1 next end if else 'error handling; this user is not specifically in any group (just primary group) wscript.echo "None" oExcel.Application.activesheet.cells(iRow,iCol)="None" err.clear end if 'move to next user iRow=iRow+1 ors.movenext loop end if function Clean(sText) 'groups are returned in form cn=XXX,cn=YYY etc - just want the first chunk arrParts=split(sText,",") 'arrParts(0) will be cn=XXX; now lose the first 3 chars sText=mid(arrparts(0),4) Clean=sText end function
  17. Sorry, I can't help with this but I'm intrigued as to why you want to do it! I can understand that you might want your email to be available if you're off line from the server but that's what cached mode is for. I can also understand that you might want more email than you can keep on the server (but I would archive selected email to a PST to get round that, not the whole lot!) Just a personal opinion, but PST files are pretty much the spawn of Satan and if you can avoid them then you should :-)
  18. I don't think it should have been blown up as a "terrorist threat" (I think you're right that this is regularly overstated) but I reckon anyone who parks on double yellow lines in a city centre ought to (at minimum) have their car crushed on the spot :-) (similar to "operation cubit" for untaxed cars)
  19. Well, yes and no :-) The CPU must be 64 bit capable (eg Core 2 Duo) and you need the BIOS support enabling but you can run a 64 bit guest OS on a 32 bit host OS (eg Windows XP 32 bit)
  20. http://www.microsoft.com/windowsserver2008/en/us/trial-software.aspx You'll need to register for the download - you can either get the VHD or the ISO
  21. You don't need them but it doesn't matter. If you wanted to do (say) domain users then you would need the quotes - I'd guess if you get into the habit of always using them then you won't miss them off when they are needed :-)
  22. If you're expecting the user running the script to be owner then it will do no harm to forcibly set the owner - if they're already owner, it makes no change. If they're not owner then you make them owner and allow the permissions change.
  23. That bit I think I can help with! type "tzutil /l" to get a list of time zones and the codes. You'll see the full list and the info for the UK is (UTC) Dublin, Edinburgh, Lisbon, London GMT Standard Time so the text you need is just "GMT Standard Time"
  24. forgot earlier - it must work with ISA server (and probably Squid?) - too many of the suppliers seem to have any idea that lots of schools don't have direct internet access but go via some kind of filter or proxy or both!
  25. Not quite mapping as a network drive but adding a network place if that's any use - details here: Creating a Network Place shortcut
×
×
  • Create New...