sjboyington
Members-
Posts
14 -
Joined
-
Last visited
Reputation
5 NeutralAbout sjboyington

Personal Information
-
Biography
NA
-
Occupation
IT Technician
-
Interests
Socialising
-
Location
scunthorpe
-
Hi The file structure is the same in both sites but the servers drives are completely separate. Thanks Steve
-
But the 2 installations isnt an issue as the hta copies the right sims.ini and connect.ini as required. My issue is that the exams module seems to be ignoring the connect.ini or sims.ini and pointing to the site a share (S:) rather than site b share (t:) when the site b (t:) sims.ini and connect.ini are implemented. Thanks
-
SIMSDIRECTORY=T:\SIMS
-
Hi Everyone Basically, we (serveral schools) are part of a massive joint domain and I work across 2 of the sites. Site A and Site B. Site A is happy, SIMS works locally, Woohoo Site B is happy, SIMS Works locally, Woohoo. Data Officer at Site B runs a HTA I made to switch between Site A SIMS (S:) and Site B SIMS (T:) The HTA just copies and overwrites the connect.ini and sims.ini to the appropriate folder (x86 / x64) Depending whether she wants to connect to Site A (S:) or Site B (T:) Now the issue. Everything works until we looked at the exams module. When the connect.ini and SIMS.ini are aimed at Site B (T:), the exams module is still looking at Site A (S:), even though everything else you find in SIMS is infact for Site B (T:) as it should be. That's 2 separate Sites / Servers / Databases. My question is how is this possible? Is there some cache or other .ini file that we need to replace as the exams module is an extra I believe? Thanks Steve
-
FYI i still got the same error? Im on a 64 bit OS but that shouldn't make any odds for the shut-down command? Thanks Steve
-
Changed to 'Shutdown Process' WshShell.Popup _ "You are already logged onto: " & CurrentWorkstation & " or havent logged off properly." & vbcrlf & _ "This event has be logged to track possible account misuse." & vbcrlf & vbcrlf & _ "You will now be logged off",20,"Multiple User Login Detected: " & UserID,16 WshShell.Run "C:\windows\system32\shutdown.exe /l" SET WshShell = Nothing Line 66 Char 2 - Shutdown line removed as recommended so looking at the same line. Thanks
-
Hi Ive got the following script to stop multiple logons by studnets - it creates a file based on pc name and username. If they log off properly, it deletes it, if they dont, it wont and either i have to delete it, they have to log back onto their previous machine and log off again or someone else has to log onto that machine. I didnt make the script but it does everything i want. The issue is the shutdown part (BELOW) gives me a bad file name error and i dont know why - it looks ok. This is the segment 'Shutdown Process' shutdown = "shutdown /l" WshShell.Popup _ "You are already logged onto: " & CurrentWorkstation & " or havent logged off properly." & vbcrlf & _ "This event has be logged to track possible account misuse." & vbcrlf & vbcrlf & _ "You will now be logged off",20,"Multiple User Login Detected: " & UserID,16 WshShell.Run "C:\windows\system32\shutdown.exe" SET WshShell = Nothing and this is the full script. '== Limit User Logins '== This script consists of two parts, UserLogon.vbs & UserLogoff.vbs '== The script is designed to prevent multiple logons on a network from different workstations '== This will not work for Terminal Servers where each user will login on the same server. '== Users NEED to logoff through the proper process otherwise the script will still assume they are logged in. '== If this happens, then the next user to log into their workstation will clear their session 'Set Objects Set oShell = CreateObject( "WScript.Shell" ) Set objFSO = CreateObject("Scripting.FileSystemObject") SET WshShell = createObject("WScript.shell") Const intForReading = 1 Const intForWriting = 2 Const intForAppending = 8 ServerShare = "\\sfoxfilepr1\logonfiles$" 'Requires Users Full Read/Write Access OldSession = "" CurrentWorkstation = "" 'Get Username & Workstation UserID=oShell.ExpandEnvironmentStrings("%UserName%") WorkstationID=oShell.ExpandEnvironmentStrings("%ComputerName%") 'Check Whether Workstation Has Old Login Session and clear If objFSO.FileExists( ServerShare & WorkstationID & ".txt") Then Set objFile = objFSO.OpenTextFile(ServerShare & WorkstationID & ".txt", intForReading, False) Oldsession = objFile.ReadLine objFile.Close If objFSO.FileExists( Servershare & Oldsession & ".txt" ) Then objFSO.DeleteFile(ServerShare & Oldsession & ".txt") End if End if 'Check If Users Logged In If objFSO.FileExists ( ServerShare & UserID & ".txt") then Set objFile = objFSO.OpenTextFile(ServerShare & UserID & ".txt", intForReading, False) CurrentWorkstation = objFile.ReadLine objFile.Close 'Report Failed Login To LoginsDenied.log If objFSO.FileExists (ServerShare & "LoginsDenied.log") then SET ObjFile = objFSO.OpenTextFile(ServerShare & "LoginsDenied.log", intForAppending, True) ObjFile.Writeline ("Date: " & Date & ", Time: " & Time & ", Workstation: " & WorkstationID & ", Username: " & UserID) else Set objFile = objFSO.CreateTextFile(ServerShare & "LoginsDenied.log") ObjFile.Writeline ("Date: " & Date & ", Time: " & Time & ", Workstation: " & WorkstationID & ", Username: " & UserID) End If ObjFile.Close 'Shutdown Process' shutdown = "shutdown /l" WshShell.Popup _ "You are already logged onto: " & CurrentWorkstation & " or havent logged off properly." & vbcrlf & _ "This event has be logged to track possible account misuse." & vbcrlf & vbcrlf & _ "You will now be logged off",20,"Multiple User Login Detected: " & UserID,16 WshShell.Run "C:\windows\system32\shutdown.exe" SET WshShell = Nothing Else 'Create Text Files Set objFile = objFSO.CreateTextFile(ServerShare & WorkstationID & ".txt") ObjFile.Write(UserID) ObjFile.Close Set objFile = objFSO.CreateTextFile(ServerShare & UserID & ".txt") ObjFile.Write(WorkstationID) ObjFile.Close 'Report Accepted Login To LoginsAllowed.log If objFSO.FileExists (ServerShare & "LoginsAllowed.log") then SET ObjFile = objFSO.OpenTextFile(ServerShare & "LoginsAllowed.log", 8, True) ObjFile.Writeline ("Date: " & Date & ", Time: " & Time & ", Workstation: " & WorkstationID & ", Username: " & UserID) else Set objFile = objFSO.CreateTextFile(ServerShare & "LoginsAllowed.log") ObjFile.Writeline ("Date: " & Date & ", Time: " & Time & ", Workstation: " & WorkstationID & ", Username: " & UserID) End If ObjFile.Close End If It all looks ok but the error is Line 67 Char 2 Error Bad file name or number Code 800A0034 Thanks Steve
-
My apologies but the get day coding was wrong. Above is the final completed script if anyone ever needs it. Looks at 6 powerpoints. Mon - Fri and a netbios name specific and the runs either the specific or relevant day dependent on date modified. Thanks
- 8 replies
-
- automate
- join fields
-
(and 2 more)
Tagged with:
-
COMPLETE SCRIPT IF ANYONE EVER NEEDS IT
- 8 replies
-
- 1
-
-
- automate
- join fields
-
(and 2 more)
Tagged with:
-
RESOVLED CurrentDay = WeekdayName(Weekday((dtmValue)+2)) wscript.echo CurrentDay TodaysPPT = "CurrentMaster" & CurrentDay wscript.echo TodaysPPT
- 8 replies
-
- automate
- join fields
-
(and 2 more)
Tagged with:
-
That looks good if it was one powerpoint I was using, however I want one per day. I just need to sort the above line out and then mine will do as the suggested app does except it waits for reboot to update and will look at a file relevant to that device only (NetBIOS name) and a power point per day, playing either the powerpoint for that day OR the specific one for that device, dependant on which as modified last. thanks though.
- 8 replies
-
- automate
- join fields
-
(and 2 more)
Tagged with:
-
I m currently expanding on the script I made but having no knowledge on scripts - its a learning curve. part of the script reads the day and then gives me a constant called "TodaysPPT", which I use later in the script. CurrentDay = WeekdayName(Weekday((dtmValue)+2)) wscript.echo CurrentDay TodaysPPT = "CurrentMaster+(CurrentDay)" wscript.echo TodaysPPT Basically, for this test, I want it to echo the day back which it does and then create the constant "TodaysPPT" which should have a value of the words "CurrentMaster" and the day it just returned. For example, On Monday, it would return a value for TodaysPPT of CurrentMasterMonday. Friday would be CurrentMasterFriday. I just am not quite sure of how to add both parts to get the correct value for "TodaysPPT". Thanks Steve I Will post the complete script after this. Fully automated Powerpoints across site with no need or third party software or maintenance by IT. All from a local dive and day dependant.
- 8 replies
-
- automate
- join fields
-
(and 2 more)
Tagged with:
-
FYI On Error Resume Next WScript.sleep 90000 Const ppAdvanceOnTime = 2 ' Run according to timings (not clicks) Const ppShowTypeKiosk = 3 ' Run in "Kiosk" mode (fullscreen) Const ppAdvanceTime = 5 ' Show each slide for 10 seconds ' Open the 4 power point files to work with them. Set objFileSys = CreateObject("Scripting.FileSystemObject") Set CurrentPPT = objFileSys.GetFile("c:\presentations\FOXVDU01.pptx") Set CurrentPPT2 = objFileSys.GetFile("c:\presentations\master.pptx") Set NewPPT = objFileSys.GetFile("y:\presentations\FOXVDU01.pptx") Set NewPPT2 = objFileSys.GetFile("y:\presentations\master.pptx") 'Checks modified date of the powerpoint and replaces it as needed. If NewPPT.DateLastModified > CurrentPPT.DateLastModified Then objFileSys.CopyFile NewPPT, CurrentPPT, True End If 'Checks modified date of the powerpoint and replaces it as needed. If NewPPT2.DateLastModified > CurrentPPT2.DateLastModified Then objFileSys.CopyFile NewPPT2, CurrentPPT2, True End If ' Open the shell object for passing commands. Set objShell = CreateObject("WScript.Shell") Set objPPT = CreateObject("PowerPoint.Application") objPPT.Visible = True 'Checks modified date of each of the powerpoints and sets current path to the newest powerpoint. If CurrentPPT.DateLastModified > CurrentPPT2.DateLastModified Then Set objPresentation = objPPT.Presentations.Open(currentPPT.Path) Else Set objPresentation = objPPT.Presentations.Open(currentPPT2.Path) End If ' Apply powerpoint settings objPresentation.Slides.Range.SlideShowTransition.AdvanceOnTime = TRUE objPresentation.SlideShowSettings.AdvanceMode = ppAdvanceOnTime objPresentation.SlideShowSettings.ShowType = ppShowTypeKiosk objPresentation.Slides.Range.SlideShowTransition.AdvanceTime = ppAdvanceTime objPresentation.SlideShowSettings.LoopUntilStopped = True ' Run the slideshow Set objSlideShow = objPresentation.SlideShowSettings.Run.View Do Until Err <> 0 Loop objPresentation.Saved = False objPresentation.Close objPPT.Quit This script looks at 2 files, one for the TV and a master. It then copies them from the serever share to the OS and replaces any older version of the file. It then opens which ever was modified last and will display on a powerpoint in a loop until the machine is restarted. At that point it will check for a newer version of the file. Yes there isn't a file per day but in theory, it could be tweaked to allow for that. This just gives whole school broadcast on multiple VDUs or individual usage - dependant on which file was modified last. Hope ithelps someone in the future.
- 8 replies
-
- automate
- join fields
-
(and 2 more)
Tagged with:
-
Hi Ive basically got a script that loads a power point from the network, copys it to C: and loops it until it detects the file has been modified with a newer version. At this point, the machine is restarted, it auto logs in, copys the new script to C:, replacing the old one and then plays it on a loop until it is revised again. I now want to expand that if possible so it could have 6 files (one for monday to friday and a master file). The master file would be the one it opens if it is the newest modification date, else it would open the relevant file per day. As it stands we have 18 VDUs in different areas of the academy with the below script running and im editing the PPT per day (the PPT is repeated weekly) to display relevant info for that area, however they want all 18 VDUs to display the same info on occasion. Any Ideas? On Error Resume Next WScript.sleep 120000 Const ppAdvanceOnTime = 2 ' Run according to timings (not clicks) Const ppShowTypeKiosk = 3 ' Run in "Kiosk" mode (fullscreen) Const ppAdvanceTime = 5 ' Show each slide for 10 seconds ' Open the two power point files to work with them. Set objFileSys = CreateObject("Scripting.FileSystemObject") Set CurrentPPT = objFileSys.GetFile("c:\presentations\FOXVDU01.pptx") Set NewPPT = objFileSys.GetFile("y:\presentations\FOXVDU01.pptx") ' Open the shell object for passing commands. Set objShell = CreateObject("WScript.Shell") Set objPPT = CreateObject("PowerPoint.Application") objPPT.Visible = True Set objPresentation = objPPT.Presentations.Open(currentPPT.Path) ' Apply powerpoint settings objPresentation.Slides.Range.SlideShowTransition.AdvanceOnTime = TRUE objPresentation.SlideShowSettings.AdvanceMode = ppAdvanceOnTime objPresentation.SlideShowSettings.ShowType = ppShowTypeKiosk objPresentation.Slides.Range.SlideShowTransition.AdvanceTime = ppAdvanceTime objPresentation.SlideShowSettings.LoopUntilStopped = True ' Run the slideshow Set objSlideShow = objPresentation.SlideShowSettings.Run.View Do Until Err <> 0 If NewPPT.DateLastModified > CurrentPPT.DateLastModified Then objPresentation.Close objFileSys.CopyFile NewPPT, CurrentPPT, True Set CurrentPPT = objFileSys.GetFile("c:\presentations\FOXVDU01.pptx") Set objSlideShow = objPresentation.SlideShowSettings.Run.View End If Loop objPresentation.Saved = False objPresentation.Close objPPT.Quit Thanks Steve
- 8 replies
-
- automate
- join fields
-
(and 2 more)
Tagged with:
