-
Posts
640 -
Joined
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by altecsole
-
My choice would be to go for 2GB RAM, several apps open at the same time will soon use up 1GB.
-
Fair enough. Sounds a complete nightmare to me. I'm just glad I never served on a Squadron that lost anyone during the time I was there. That's the time when everyone starts to cover their own arse! Anglesey by any chance?
-
Mmm. I was an Airframe Technician in the RAF for 12 years and this sounds very unlikely to me. Part of the pre-flights checks is a test of all flight controls for correct operation and full range of movement. If the control was left disconnected how did this work?
-
I wouldn't bother with VB.Net, just go straight for C#. The learning curve will be about the same and C# is probably more widely used now than VB. The languages are pretty similar so if you know C# you can probably figure out what's going on in some VB code too - they both use the Common Language Runtime. I haven't done any C# for about a year so a bit rusty. I'll help if I can though.
-
MsgBox can use parenthesis. In that case you're calling a function which returns a value to indicate which button was clicked (you may have OK and Cancel for instance). So: buttonClicked = MsgBox("School Reports",65,"Reports sent to the printer...") would work and the value of buttonClicked value would tell you whether OK or Cancel was clicked (1 would be OK, 2 would be Cancel) Using MsgBox without parenthesis calls a Sub, which doesn't return a value.
-
Setting up remote access to staff user accounts
altecsole replied to firefox_2006's topic in How do you do....it?
We just give users instruction on how to create a network place that points to their WebDav enabled homefolders. They then just open the network place when needed. -
Create the profile under an account that has no group policies applied to it - block inheritance if you have to. When you're happy with the profile copy it to your network location and change permissions (read only) so everyone can use it. Test using a test user before deploying to your netlogon share.
-
You people have far too much time on your hands! :-)
-
Why aren't you happy with CLEO? We've had no problems with CLEO at all. Problems tend to get sorted quickly and the speed and reliability is great. You're very secure within the CLEO network; are you sure you're ready to take on the 'outside' world?
-
Try adding the following to the top of your script to force the script to use English UK settings: SetLocale(2057) I think I read somewhere that SP3 messes up the locale when using vbscript or jscript so you get the American time (10:05:24 PM). In any case, it's good practise to add it to any script that uses date or time so that you know what format will be used.
-
You could put a batch file in the all user startup script that checks the logged on users username and logs them off if they're not in the list: @echo off if %username%==john exit if %username%==jim exit if %username%==peter exit if %username%==ken exit shutdown -l
-
The first time you run PSShutdown you have to accept the license and then a value is stored in the user part of the registry. If the user you are running this task as doesn't have this setting in their profile the program will just hang waiting for the license to be accepted. Just logon with the account you want to run the scheduled task as and run PSShutdown, accept the license, and then logoff. You shouldn't then have any problems.
-
No problem, glad I could help.
-
Looking at your AD structure I can't see any reason why it wouldn't work. Did you set the Const correctly? You need to make sure you have the 'ou=' bit in as well. So, for 2005, you should have: Const LEVEL3_OU = "ou=2005"
-
Okay, you need to add another sub OU to your constants; like this: Const DOMAIN = "dc=cordeauxcc,dc=internal" Const TOPLEVEL_OU = "ou=Establishments" Const LEVEL1_OU = "ou=CHS" Const LEVEL2_OU = "ou=Students" Const LEVEL3_OU = "ou=Sixth Form" Then change the code further down so that you can run the program for the Student OU or the sub OUs. If you have an entry for LEVEL3_OU to match the name of your sub OUs within Students it will work on that sub OU, or leave as "" to run it against the Students OU only (hope that makes sense!). Change code to: If LEVEL3_OU = "" Then strOUPath = LEVEL2_OU & "," & LEVEL1_OU & "," & TOPLEVEL_OU & "," & DOMAIN Else strOUPath = LEVEL3_OU & "," & LEVEL2_OU & "," & LEVEL1_OU & "," & TOPLEVEL_OU & "," & DOMAIN End If Here is the complete code, in case that's confusing: '========================================================================== ' NAME: ExportDetails.vbs ' ' AUTHOR: Jim Williams ' DATE : 29/02/2008 ' ' COMMENT: Gets username, email and USNChanged values for users in OU '========================================================================== Option Explicit Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 Dim objShell Set objShell = CreateObject("Wscript.Shell") Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") 'Set log file path to current directory Dim strLogFilePath, openFile strLogFilePath = objShell.CurrentDirectory & "\ExportDetails.csv" 'Check if file exists, if not; create and add headings If (objFSO.FileExists(strLogFilePath)) Then WScript.Echo "The Export File already exists. Rename, or move the file, and run again." WScript.Echo "Exiting..." WScript.Quit 'Exit Else Set openFile = objFSO.OpenTextFile(strLogFilePath, ForWriting, True) openFile.WriteLine "Username, Email, USNChanged" openFile.Close End If Dim strReport strReport = GetUserInfo() 'write report to file Set openFile = objFSO.OpenTextFile(strLogFilePath, ForAppending, True) openFile.Write strReport openFile.Close WScript.Echo "Complete. Export file written to " & strLogFilePath 'tidy up Set objShell = Nothing Set objFSO = Nothing Function GetUserInfo() Const DOMAIN = "dc=cordeauxcc,dc=internal" Const TOPLEVEL_OU = "ou=Establishments" Const LEVEL1_OU = "ou=CHS" Const LEVEL2_OU = "ou=Students" Const LEVEL3_OU = "ou=Sixth Form" Dim objOU, strOUPath, user Dim objUSNChanged, dblUSNChanged Dim strMyReport On Error Resume Next If LEVEL3_OU = "" Then strOUPath = LEVEL2_OU & "," & LEVEL1_OU & "," & TOPLEVEL_OU & "," & DOMAIN Else strOUPath = LEVEL3_OU & "," & LEVEL2_OU & "," & LEVEL1_OU & "," & TOPLEVEL_OU & "," & DOMAIN End If Set objOU = GetObject _ ("LDAP://" & strOUPath) For Each user In objOU Set objUSNChanged = user.Get("uSNChanged") dblUSNChanged = Abs(objUSNChanged.HighPart * (2^32) + objUSNChanged.LowPart) strMyReport = strMyReport & user.sAMAccountName & ", " & user.mail & ", " & dblUSNChanged & VbCrLf Next 'tidy and return Set objOU = Nothing Set objUSNChanged = Nothing GetUserInfo = strMyReport End Function
-
Setting up remote access to staff user accounts
altecsole replied to firefox_2006's topic in How do you do....it?
We use WebDav for this. Teachers and student have access to their home folders and also to shared resources. Fairly easy to setup, but make sure you use https. -
Okay, give this a try. Copy the code into Notepad and save it as a .vbs file. Open a cmd prompt and run the script. It'll write the result to a csv file in the same directory as the one the script is run from. I'm not sure that USNChanged is the value you want as this will change when user attributes change. You could generate auto numbers in Excel? Let me know if you have any problems. '========================================================================== ' NAME: ExportDetails.vbs ' ' AUTHOR: Jim Williams ' DATE : 29/02/2008 ' ' COMMENT: Gets username, email and USNChanged values for users in OU '========================================================================== Option Explicit Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 Dim objShell Set objShell = CreateObject("Wscript.Shell") Dim objFSO Set objFSO = CreateObject("Scripting.FileSystemObject") 'Set log file path to current directory Dim strLogFilePath, openFile strLogFilePath = objShell.CurrentDirectory & "\ExportDetails.csv" 'Check if file exists, if not; create and add headings If (objFSO.FileExists(strLogFilePath)) Then WScript.Echo "The Export File already exists. Rename, or move the file, and run again." WScript.Echo "Exiting..." WScript.Quit 'Exit Else Set openFile = objFSO.OpenTextFile(strLogFilePath, ForWriting, True) openFile.WriteLine "Username, Email, USNChanged" openFile.Close End If Dim strReport strReport = GetUserInfo() 'write report to file Set openFile = objFSO.OpenTextFile(strLogFilePath, ForAppending, True) openFile.Write strReport openFile.Close WScript.Echo "Complete. Export file written to " & strLogFilePath 'tidy up Set objShell = Nothing Set objFSO = Nothing Function GetUserInfo() Const DOMAIN = "dc=cordeauxcc,dc=internal" Const TOPLEVEL_OU = "ou=Establishments" Const LEVEL1_OU = "ou=CHS" Const LEVEL2_OU = "ou=Students" Dim objOU, strOUPath, user Dim objUSNChanged, dblUSNChanged Dim strMyReport On Error Resume Next strOUPath = LEVEL2_OU & "," & LEVEL1_OU & "," & TOPLEVEL_OU & "," & DOMAIN Set objOU = GetObject _ ("LDAP://" & strOUPath) For Each user In objOU Set objUSNChanged = user.Get("uSNChanged") dblUSNChanged = Abs(objUSNChanged.HighPart * (2^32) + objUSNChanged.LowPart) strMyReport = strMyReport & user.sAMAccountName & ", " & user.mail & ", " & dblUSNChanged & VbCrLf Next 'tidy and return Set objOU = Nothing Set objUSNChanged = Nothing GetUserInfo = strMyReport End Function
-
PM me with your domain name and the OU containing the users that you want to get the info for. If it's a sub OU I'll need the name of the OUs above it. I'll edit the script so you can see what I mean.
-
You could run the following vbscript. Just change the domain name and OU info to suit your domain. Doing it this way allows you to run it for each OU. Hope this helps. Const DOMAIN = "dc=your_domain,dc=your_area,dc=sch,dc=uk" Const TOPLEVEL_OU = "ou=School Users" Const LEVEL1_OU = "ou=Staff Accounts" Const LEVEL2_OU = "ou=staff2" Dim objOU Dim strOUPath Dim user Dim strDictUser Dim objUSNChanged, dblUSNChanged On Error Resume Next strOUPath = LEVEL2_OU & "," & LEVEL1_OU & "," & TOPLEVEL_OU & "," & DOMAIN Set objOU = GetObject _ ("LDAP://" & strOUPath) For Each user In objOU WScript.Echo "Username: " & user.sAMAccountName WScript.Echo "Mail nickname: " & user.mailNickname WScript.Echo "Email: " & user.mail Set objUSNChanged = user.Get("uSNChanged") dblUSNChanged = Abs(objUSNChanged.HighPart * (2^32) + objUSNChanged.LowPart) WScript.Echo "USNChanged: " & dblUSNChanged & VbCrLf Next Set objOU = nothing Set dblUSNChanged = nothing
-
We use a software restriction policy to ban all exe, cmd, vbs, lnk etc files on any drive but C:. This stops students running file from pen drives, or using shortcuts to launch file on the PCs. Not had nay problems so far, touch wood!
-
They will need delete permissions to save work. Things like Word create a temporary hidden file that gets deleted when a file is saved. If you disable delete this process won't work. Why don't you want them to delete things? If it's a shared area for lots of users set the creator owner to have full control so that they can only delete their own files.
-
If you're talking about using DBAttach.exe then no. It creates a zip file with the date as part of the file name - dead easy then then backup using whatever method you like.
-
We use DBAttach.exe to create a zipped backup of the SIMS database and then use NTBackup to backup to a network location (Buffalo Terastation). We also do a local backup on a Friday to a local USB drive for offsite storage.
-
WMI can cause this problem as there is no 'time out' as such; it just sits there for ages until it gives up. You could try restarting WMI services (and Windows Firewall/ICS) before setting objWMIService?
-
What is maximum size of a document can be printed?
altecsole replied to onder's topic in How do you do....it?
Convert the big document as a pdf to reduce the size and then send the pdf to the printer?
