Tag Archives: Scripting

Forcing a printer online using a script:

printer_iconRecently while installing Zetafax 11, we noticed that some of our maintenance scripts on our XenApp servers were causing the zetafax printer to fall offline on reboot. Below is a simple to use (built in to server 2003) script that can be used to force a printer online.

The Following will force “Printer Name” to work online:

cscript C:WINDOWSsystem32prncnfg.vbs -t -p “Printer Name” -workoffline

As an extra function, the below will rename a local printer:

Cscript %windir%system32Prncnfg.vbs -x -p “old printer name” -z newprintername

Igel Database command mistake.

Despite Igels better judgement, the command they have published in their documentation to create an SQL database does not work. The command itself can be found here.

The actual working command is listed below, thanks to J Booker in Igel for the help.

CREATE DATABASE rmlogin
GO
USE rmlogin
GO
CREATE LOGIN rmlogin with PASSWORD = ‘Passw0rd’
GO
CREATE USER rmlogin with DEFAULT_SCHEMA = rmlogin
GO
CREATE SCHEMA rmlogin AUTHORIZATION rmlogin
GRANT CONTROL to rmlogin
GO

Unattended install of AppV Lightweight streaming server

I set about rolling out appv light weight streaming server recently, its the new version of app that requires no database, management server, console… nothing! Great application but the unattended install lacked documentation etc.

Below is the script i used to install the lightweight server via the command line, the %appv-dir% variable should be a network share or local drive that the server will access for the applications:

set appv-dir=servernameappv-production$
msiexec /i setup.msi INSTALLDIR=”C:Program FilesMicrosoft System Center App Virt Streaming Server” ADDLOCAL=Release_SoftGrid_Lightweight_Server SWICONTENTDIR=%appv-dir% /Lv “c:appv-install.log” /qn /norestart

Hope it speeds up somebody elses install somewhat :)

Enteo: What the hell is a mscreate.dir folder?

We are using Enteo as a deployment method for our new citrix farms at present, we are having one or two bugs but over all I’m greatly impressed with this software, its like RIS but it very functional!

Our latest issue with powerfuse is that we cant redirect the users desktop, we have the home drive mapped, the user shell registry entries but poof, no desktop redirection.

During troubleshooting we noticed these mscreate.dir folders in every single folder in our mandatory profile folder and havent a clue where they came from?!? After a bit of digging around Enteo creates these files as logs for the uninstallation of software deployed through Enteo. We were using an Enteo script to copy the mandatory profile to the %systemdrive% of every citrix server allowing the manadatory profile to be loaded quickly from local disk.

Now that we know what the folders are we dont mind them too much, but if you do choose to remove them, simply open the folder you have copied down with enteo and execute this batch command to remove them:

del /s /f mscreate.dir

Nothing else to report at the moment, well lots to report but not enough time :)

Toodles.