Monday, October 30, 2017

How to update a Horizon ILS Training Database

If you're a SirsiDynix Horizon library using SQL server this tutorial is for you.  I will cover how to restore a training database with a backup from the production database and then make changes in the Horizon Client to make those differences visible.

This tutorial assumes you have the proper permissions for both your ILS database and the Horizon client.  With this you can easily update your training database with the latest up to date information and depending on your hardware it can take as little as 5 - 10 minutes.

  1. Log into the Microsoft SQL Management Studio on a workstation that has access to the backup or on the server itself.

  2. Select your training database if not already made. Then select Tasks -> Restore -> Database

  3. Make sure you have the database you want to restore the data to selected.   Then change the source to "From Device" and select your backup database file.  In this case Z:\DBBackup\$DATEOFMYBACKUP.bak


  4. Make sure you check and make sure that Restore is checked.  Then go to options and check Overwrite the existing database. 

    ***IMPORTANT***
    - Make sure the "Restore As" Data and Log files are for the database you have selected otherwise you could overwrite production data. 

    Since we are using the Training_DATA and Training_Logs we know that we are not using the production data because lets assume that the production db is called production.  With our production database called production lets assume our Rows Data is called production_data.mdf and the logs production_log.ldf.



  5. The restore process will take about 5 minutes.  Then you can exit out of SQL Management Studio then open the Horizon Client with an account that has administrator access.

  6. You will get a Middle Tier Error on login. Just note the error and click ok.  We will be fixing this

  7. Once you are logged in go to Administration -> Table Editor -> Matham

  8. Double click on the line in the box.

  9. You want to find and edit two items shown below highlighted in Yellow

    Horizon App Server Version -> Select NO Horizon Application Server.  You don't need to put anything in the Horizon Application Server URL because we just disabled the URL.  I find it is a good idea to put TRAINING or something like that

  10. Now we want to close that window and repeat steps 7 and 8 but now we want to select location

  11. Double click the location line (this will be the name of the production database because we restored the training database from a backup.)

  12. The next thing you want to edit is the Location NAME.  When you change this it will update the Horizon Client Window with a new header.  So I put ***TRAINING*** - $PUTWHATYOUWANTHERE.  You can see it is in the top left corner of the Horizon Client Window





Sunday, October 29, 2017

Managing vPro Systems

When you are a sysadm in a small shop for about 100 machines for 2 locations your find efficiencies to make your job easier.  I had an idea for using VPRO as a remote IT support solution.  I know vpro has it's issues such as being proprietary and there are solutions such as remote assistance, remote desktop, and teamviewer to name a few why would I use vpro?  

Well when you use remote desktop it blocks out the screen of the user your trying to help; remote assistance isn't the easiest process to use, and teamviewer users get confused with the ID and the username and password part of the teamviewer UI.  With VPro this is secured to an internal intranet network this allows me to turn machines on when I need to do work on those systems remotely, do remote support, see any issues they are having with any software where logs don't provide enough detail' and I can see the bios boot and logs if required.  I know vpro has it flaws and a number of major security issues lately but it does make my life easier with being able to remotely configure the system, check logs and even make changes to the bios without physically being there (unless someone unplugs the network cable).

Meshcommander

First you need to make sure that the vpro system is provisioned and you have set a username and password to access the vpro system.

To that end that's why I use meshcommander it is open source, works with vpro and I have 2 different ways of using the software.  The current version of meshcommander uses everything in a built in UI.  It is nice and easy to use but disconnects more then I like, probably because it is all browser based.


Meshcommander UI and System List




Mesh Commander offers a simple single UI where you can remotely manage all your VPRO based systems.  It's all integrated and easy to use.  Pro or Con you can only use one system at a time.

The other part which is depreciated by the same project is the Manageability Commander Tool.  This is kind of the piece meal solution before Mesh Commander.  The Manageability Commander Tool allows you to specify a VNC client for the connection.  I use Ultra VNC Viewer.




Mesh Commander Tools gives you a tab based interface.  Useful if you want to work in multiple windows.  For here you can launch the vpro management and access it from the browser.
The Mesh Commander Tool tab Remote Control allows you to specify how you want to connect.  You configure the remote desktop viewer to the VNC Viewer you want to use by browsing to the executable on your system.
You can specify which VNC client you would like to use.  UVNC viewer I have found works really well and you don't have to pay for any licencing which you have to for VNC Viewer.
Mesh Commander Tools Launches the VNC Program in a separate window and you can have multiple windows open at once which you can't with Mesh Commander

Friday, October 13, 2017

Making an embedded Audio PA System with a web based UI

In my post how to make digital signage and PA system using a google chrome box it worked well for a while but then we had issues with the audio announcements double playing, skipping or not playing at all.  It was very odd, so to rectify this issue I built a new PA system using an old Foxconn AMD E-350 AT-3350 with 4GB of RAM and loaded with Windows 7 Embedded.

The PA System run WAV files at a specified time using task scheduler.  This just opens the default player (windows media player in this case) and runs the file.  This means that the user must be logged into the system to run so if you setup RDP you will have to just disconnect (do not logout).  I also created a Web Based UI using XAMPP for Windows as the base Apache 2 install with minimal settings.  I've also used a 3rd party plugin called nircmd.  This allowed me to make a php file to run a mute/unmute command.  This machine has no access to the internet and is only accessible from the intranet due to security concerns.


Task Scheduler with the wave file schedule
I changed the root directory to a folder we will call PA.  In there I have a file called sound status which tracks if the sound is enabled or disabled.  This is loaded into the index.php file on load which uses a if else statement for displaying the status and the button.


Web Directory
The code for the php files that are executed using nircmd are setup like so


nircmd.exe mutesysvolume 0 - Sound is Enabled


nircmd.exe mutesysvolume 1 - Sound is Muted

The PHP files for enabling and disabling the sound are seperated out from the index.php file because it would run the mute/unmute commands when loading the page.  Lets go over the index file first.  We have the index file loading a txt file with a true or false value.  The sound is either on or off.  The we use a simple if statement to display if we are displaying the sound is on or off.
Code for the index.php file
The buttons for enabling and disabling the sound are php files which run the bat script for muting and unmuting the sound writes the new value to the soundstatus.txt file and then sends you back to the index.php page.


PHP Files for enabling and disabling sound
The PHP code is fairly simple.

system('cmd /c $YOURPATHTONIRCMD.EXE mutesysvolume 1');

as I described above this is the command for muting the sound, using the NIRCMD utility.

Then I built used a responsive web based UI for enabling and disabling the sound.


PA System Desktop Showing Sound Enabled


PA System Desktop Showing Sound Disabled


PA System on Mobile
UPDATE!

To reset the PA System Audio to enabled I setup a task scheduler event to run a bat file that runs nircmd.exe mutesysvolume 0 at 6:00 am.  With this in mind you also need to update the soundstatus.txt file so when the GUI load it registers that the sound has been re-enabled.  To do that I decided to use powershell, specifically the Out-File utility.
"on" | Out-File $PATHTO\TEXTFILE.txt

Now by doing this if I want to run it as a .ps1 file I need to allow powershell scripts to run the powershell scripts you run powershell as an administrator and 

Set-ExecutionPolicy Unrestricted

Now this IS a security risk and I will be looking to make something that is more secure in the future, in the mean time it is a stopgap measure that his acceptable since the access to the device is intranet on port 80 and RDP only.  The script above leaves some forward character garbage so I also changed the lookup logic of the PHP file to look and see if the sound is off.  This way be default it assumes the sound is on, and only checks to see if the sound has been disabled.

Tuesday, October 10, 2017

Microsoft MVP Award

On October 1st I was awarded with a Microsoft MVP award for Cloud and Datacenter Management.  I am very honored and humbled to receive the award and will continue to work to maintain this accreditation and adhere myself to the high standards of the MVP Community.

What/Who is a Microsoft MVP?

The Microsoft MVP (Most Valuable Professional) Program are community members who are active and contribute back to the communities they are apart of.  Today there are more than 4,000 MVPs globally, and there are around 200 here in Canada. The Microsoft MVP Award gives Microsoft the unique opportunity to celebrate, honor and say thank you to top-notch technology experts who make outstanding contributions to their communities.

What does it take and why would you want to
 become a Microsoft MVP?
The Microsoft MVP Award gives the unique opportunity to celebrate, honor and say thank community members and technology experts who make outstanding contributions to their communities. These technology experts have an unstoppable urge to get their hands on new, exciting technologies and love to share their knowledge. While there is no single way to become an MVP;  you might want to think about why you want to become an MVP—is it because you’re already doing amazing work in the community and you’d like recognition? Then think about what your impact is in the community and start spreading the word about who you are and what you love to do.

https://mvp.microsoft.com/


How to fix CURL call imporitng an RSS feed on a site blocking CURL calls

There is a 3rd party service provider that my organization uses called bibliocommons.  They have these nice book carousels.  However the car...