Tag Archives: Windows

Windows – Launch program each time you login

To start a program each time you log into a windows computer …

  1. Create a shortcut to the program on the desktop (find the program in the program files folders and “right-click” on it …)
  2. Click on the Windows Start icon then “right-click ” on Programs and select Open
  3. Double click on the “Programs” folder and then on the “Startup” folder
  4. Copy or move the shortcut you created in the first step to this “Startup” folder

Windows – AD Management with PowerShell

Apparently, it is now possible to manage the AD with PowerShell. Since the GUI for active domain users and computers can typically only make changes one account at a time, this powershell access could be handy when you have to manipulate multiple accounts at once:

http://www.scriptlogic.com/smbit/article/track-user-password-expiration-using-active-directory?elq_mid=2220&elq_cid=786672&elq=938d349e11c845d681800dccd9b9246a

Software – Matlab 2011

Building a deployable and completely silent software installer for Matlab on windows is a bit of an adventure .  Clearly, each installation is different so I don’t think I can give a detailed step-by-step recipe here for every circumstance.  I can give you a few steps which took me a while to piece together from various sources and a considerable amount of trial and error …

  • Extract the installer from the vendor to a new, empty folder
  • Be sure to replace the generic “archives” folder which may initially contain only the license manager with the archives folder you have specific for the Matlab products you need to install
  • Create an installer input file with all the questions answered (a copy of ours is attached , remember to change the auth-code to your real auth code, ours is scrubbed out in this example)
    • For a completely silent install also change the “mode=automated” to “mode=silent” in this installer input file
  • If you run this in a non-FlexLM environment you also have to deal with the activation process (we run FlexLM here to simplify the process, so I can’t help you with that process …)
  • Make sure you have a copy of your network license file to copy into a known place for the installer to point at
  • Run the installer from a batch script with commands like:

    echo Copying network license file …
    xcopy /Q /Y “%install_dir%payload\matlab_network.dat” c:\windows\temp\

    echo Installing software and required conponents …
    “%install_dir%payload\bin\win64\setup.exe” -inputFile “%install_dir%payload\wc_installer_input.txt”

    Where %installdir% is set to the directory where you are running the installation. Also mind the line breaks shown here are not intended for the actual commands ….

Software – Mathematica 8

Basic instructions for building a silent installer for Mathematica 8 can be found at:
http://reference.wolfram.com/mathematica/tutorial/InstallingMathematica.html

We use a network wide license server to license this application. To create the license file “mathpass” on windows – install the application and then copy the license file from c:\programdata\mathematic\licensing\mathpass
This file seems to also be valid in c:\progam files (x86)\\Wolfram Research\Mathematica\8.0\Configuration\Licensing

So I have created a script that installs mathematica silently and then copies this “mathpass” file into place …

@echo off

break=off

set install_dir=%~dp0

rem Tell the user what you are doing
echo ———–
echo This program installs a copy of the Williams College licensed
echo Mathematica 8.
echo ———–
echo Currently installing from %install_dir% …
echo ———–

REM Detect correct Program Files folder. Note this batch file may run in 32-bit env (SysWOW64/cmd.exe)
REM So %ProgramFiles% might be Program Files (x86), but we always want to check the regular Program Files.
set K64=no
if “%ProgramFiles(x86)%” == “” goto on32Bit
set K64=yes
echo Detected 64-bit OS …
echo ———–

:on32Bit
REM Set inprogramfiles to either 32-bit or 64-bit stucture

SET inProgramFiles=%ProgramFiles(x86)%
IF NOT EXIST “%inProgramFiles%” SET inProgramFiles=%ProgramFiles%
echo Program files directory set to: %inProgramFiles%
echo ———–

rem run the silent installer
echo Installing application …
echo ———–
“%install_dir%payload\Mathematica_8.0.1_WIN.EXE” /silent /norestart

rem copy in the license file
echo ———–
xcopy /Y /Q /R “%install_dir%payload\mathpass” “%inProgramFiles%\Wolfram Research\Mathematica\8.0\Configuration\Licensing”
If %errorlevel%==0 goto no_error

:error
rem do something if there was an error
echo ———–
echo The Williams College licensed version of this software did not install correctly.
echo Please be sure you ran this installer as an administrator. On Vista and Windows 7
echo you need to right-click on the installer and select “Run as Administrator”.
echo Please contact OIT for additonal help with this install.
echo ———–
pause
exit

rem there was no error in the install AND the filter copy and there was no break
:no_error
echo ———–
echo The installation is complete.
echo ———–

:end
pause
rd /S /Q “%install_dir%payload”
del /Q “%install_dir%instal*”
exit

Bootcamp – Stop Bootcamp Help window popup

On a windows install using bootcamp on the Mac, users will see an annoying bootcamp help dialog box which isn’t really helpful at all to them. Lab users have no permissions to do anything with bootcamp so showing them this window is pointless.

From an admin login use:
msconfig (enter in the start search box)
to edit the start items and uncheck bootcamp …

Bootcamp – Hiding Mac volume from Windows

Reports are that since Bootcamp version 3 or so you can now read and write to the macintosh partition from your windows environment. This is less than ideal in a shared computer lab.

Renaming the file:
c:\windows\system32\drivers\applemnt.sys
and then restarting should disable the mount of the macintosh partition in windows …

For more discussion and details see:
https://discussions.apple.com/message/11226479?messageID=11226479#11226479?messageID=11226479

Windos 7 – GPO – Printing

Previously, printer mappings for multiple users on a single windows computer was a bit difficult. In order to make the print queues available to multiple users you would have to use some arcane “RUNDLL’ command lines.

Now a set of group policy settings can be employed to map printers based on a variety of factors. A great store of information about this can be found at:
http://www.grouppolicy.biz/tag/printer/

How I have set this up in our GPO looks like the following:
Policies ….

Preferences …
(There are quite a few more of these then what is shown here. You need at least one for each of print queues needed in the labs.)

One last setting is crucial – “Loopback processing” must be enabled in:
Computer Configuration — Administrative Templates — System/Group Policy