+ Post New Thread
Results 1 to 2 of 2
Windows Thread, Logon script - Running 1 of 3 PowerPoint presentations based on location in Technical; In our logon script we have the following which is used occasionally for broadcasting a PowerPoint slide show to a ...
  1. #1

    Join Date
    Jan 2007
    Posts
    981
    Thank Post
    12
    Thanked 48 Times in 28 Posts
    Rep Power
    25

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

    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)

    Code:
    		 '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

    Code:
    '***************************************************************
    '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?

  2. #2

    Join Date
    Jan 2007
    Posts
    981
    Thank Post
    12
    Thanked 48 Times in 28 Posts
    Rep Power
    25
    Code:
    '***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

SHARE:
+ Post New Thread

Similar Threads

  1. Script to run based on computer name
    By FN-GM in forum Scripts
    Replies: 12
    Last Post: 10th July 2013, 11:39 AM
  2. Printing Based on Location in AD
    By DSapseid in forum Scripts
    Replies: 1
    Last Post: 29th August 2012, 11:44 AM
  3. Replies: 0
    Last Post: 5th July 2011, 11:24 PM
  4. Replies: 9
    Last Post: 6th October 2010, 03:54 PM
  5. Mapping Printers based on Location
    By NeoNemesis in forum Windows
    Replies: 11
    Last Post: 6th August 2007, 08:03 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •