Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Logon script - Running 1 of 3 PowerPoint presentations based on location


Recommended Posts

Posted

In our logon script we have the following which is used occasionally for broadcasting a PowerPoint slide show to a student when they log in (For advertising events etc)

 

	 'Run Minal PowerPoint
	 'Run "I:\MOTD\RedNoseDay.ppsx"

 

This is powered by a subroutine but I don't think that is too important to this particular question

 

'***************************************************************
'Sub routine to run programs - POWERPOINT
'***************************************************************
Sub Run(ByVal sFile)
Dim shell

  Set shell = CreateObject("WScript.Shell")
  shell.Run Chr(34) & sFile & Chr(34), 1, false
  Set shell = Nothing
End Sub

 

Anyway, it has been requested to show one of 3 PowerPoint files based on building location. Our computer names are rather logical, so as long as I could find some sort of script that identified the first letter of the computer name (E, S or M) and then loaded the appropriate presentation file that would be ideal.

 

Any ideas?

Posted

'***POWERPOINT FOR MEDIA SHOWCASE - SELECT PRESENTATION BASED ON COMPUTER LOCATION***
Set objNet = CreateObject("WScript.Network")
strCompName = objNet.ComputerName

IF left(strCompName,1) = "E" THEN
Run "I:\MOTD\Cyberchondriacs.ppsx"
Elseif left(strCompName,1) = "S" THEN
Run "I:\MOTD\Pixelarity.ppsx"
Elseif left(strCompName,1) = "M" THEN
Run "I:\MOTD\RobotLlama.ppsx"
Else
END IF
'***POWERPOINT CODE END***

 

Only problem is, all buildings are getting the Cyberchondriacs.ppsx :(

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...