Lynx Home SupportHotKeys LynxKeyPro USB/COM Popups Firmware Logon Scripts Downloads

 

Assigning logon scripts to user or group accounts using Active Directory.

You can use logon scripts to install LynxMessenger or LynxKey, copy desktop shortcuts, and install Hot Keys programmatically.    Why do this with icons?  It lets you collect the Login Name and CPU name from the desktop shortcut with the [Who] and [CPU] macros.  

The program "download.vbs" that is created by the shortcut generator can be saved on your disk instead of the shortcut.  When executed at login time, it re-creates the shortcut. 

A simple way to save a icon, for example is to just save the file download.vbs in  "C:\Documents and Settings\All Users\Start Menu\Programs\Startup".  But this has to be done on every computer, and that's a pain.  So instead, attach the program to a Login Script that is associated with a user.  When they log in, then the script runs and installs the software for you.   Although a logon script is typically a msi (.msi extension) or batch file (.bat extension), any executable program (.exe or .cmd  extension) can also be used.

Logon scripts are optional. You can use them to configure user working environments by creating network connections and starting programs. Logon scripts are useful when you want to affect the user work environment without managing all aspects of it.

It may be easy for some of you, but setting up a logon script in active directory is not always that simple. Lets walk through setting one up for a program like Lynx Messenger Pop ups.

First, open "Active Directory Users and Computers" on the domain controller



Now right click on the user you want to have the logon script and select the properties menu.

A properties dialog like the one shown below will appear. Select the 'Profile' Tab. That's where you type the name of the script.



Here is the confusing part. Where does windows try to find it from?

We need to find the folder where the server loads logon scripts. It follows this format:

\\(SERVERNAME)\sysvol\(DOMAIN NAME)\scripts

So, if my server was named DCServer1, and my domain was mitsi.com, we would browse to this path:

\\DCServer1\sysvol\mitsi.com\scripts



Now that we know where to put it, creating the install  is easy, just copy and paste the script file into that folder.
  • Icons:

For desktop Icons, copy yhe download.vbs program there.  It helps to rename it to something useful, such as "Panic button.vbs".   

  • Programs:

Save  the Lynxkey or Lynxmessenger MSI in the \\dcserver1\SYSVOL\mitsi.com\scripts folder, then add the name of the file in the Login Script path.  Use the /Quiet switch like so:

For executable programs like Lynx Messenger, you may have to take another step.  First, you want it to install the program, and then  secondly, run it.   To install and run it, you need a batch file.

Create a file called "lm.bat" ( or other suitable name) in the \\dcserver1\SYSVOL\mitsi.com\scripts folder.

The contents of the lm.bat file should be:

msiexec /i \\dcserver1\SYSVOL\mitsi.com\scripts\LynxMessengerMITSI.msi /quiet
cd "c:\Program Files\lynxmessenger"
start lynxmessenger.exe

We use the 'msiexec' command here because batch files will not work on \\drives.  They default to your windows directory, so we need to point the installer to the path to the program to be installed.

Lastly, set the name of the batch program  into the logon script dialog box.


The next time this user logs in, they will load the login script, install Lynx Messenger, and run it!

To remove the Lynx messenger program, change the batch file slightly by adding the /x switch

msiexec /x \\dcserver1\SYSVOL\mitsi.com\scripts\LynxMessengerMITSI.msi /quiet

The next time this user logs in, they will remove Lynx messenger.

Other commands you can run:

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options

</package | /i> <Product.msi>

Installs or configures a product

/a <Product.msi>

Administrative install - Installs a product on the network

/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]

Advertises a product - m to all users, u to current user

</uninstall | /x> <Product.msi | ProductCode>

Uninstalls the product

Display Options

/quiet

Quiet mode, no user interaction

/passive

Unattended mode - progress bar only

/q[n|b|r|f]

Sets user interface level

n - No UI

b - Basic UI

r - Reduced UI

f - Full UI (default)

/help

Help information

Restart Options

/norestart

Do not restart after the installation is complete

/promptrestart

Prompts the user for restart if necessary

/forcerestart

Always restart the computer after installation

Logging Options

/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>

i - Status messages

w - Nonfatal warnings

e - All error messages

a - Start up of actions

r - Action-specific records

u - User requests

c - Initial UI parameters

m - Out-of-memory or fatal exit information

o - Out-of-disk-space messages

p - Terminal properties

v - Verbose output

x - Extra debugging information

+ - Append to existing log file

! - Flush each line to the log

* - Log all information, except for v and x options

/log <LogFile>

Equivalent of /l* <LogFile>

Update Options

/update <Update1.msp>[;Update2.msp]

Applies update(s)

/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>

Remove update(s) for a product

Repair Options

/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>

Repairs a product

p - only if file is missing

o - if file is missing or an older version is installed (default)

e - if file is missing or an equal or older version is installed

d - if file is missing or a different version is installed

c - if file is missing or checksum does not match the calculated value

a - forces all files to be reinstalled

u - all required user-specific registry entries (default)

m - all required computer-specific registry entries (default)

s - all existing shortcuts (default)

v - runs from source and recaches local package

Setting Public Properties

[PROPERTY=PropertyValue]

 

 

______________________________________________________________________________________________________

Copyright 2007 MTSI - Sales  (800) 644-8184  - Technical support  (888) 230-6874 ext 140