Introduction to Corporate Computing

by Dmitry Kirsanov 3. November 2011 17:31

Imagine, that you have a company with 5 000 employees having 6 000 computers. These could be desktop computers, notebooks, various mobile devices – anything running Windows. And you have 10 people to manage all this hardware and software.

When working in such strict conditions you can’t avoid standardizing everything you can. And having such tiny staff with ratio of 600 machines per IT staff member, you want to automate everything and make the environment to be more reliable and independent from system administrators.

Imagine the situation, when you need to install software to all machines, or perhaps to ½ of machines, which is 3 000 computers anyway. With help of Active Directory you can do it automatically, if the source application contains MSI (Microsoft Installer) file. If it doesn’t, you can execute legacy EXE installation and install it using Microsoft System Center Configuration Manager (SCCM) which is version 2007 at the time this post is written, but we already have version 2012 in RC (release candidate) phase.

However, in both cases you might need to change configuration of installation significantly. Remove automatic updates, icons from desktop, shortcuts in Startup and various screens to welcome new users. You may also want to make it impossible to change the installation but keep the Recovery and Uninstall options. Or perform initial configuration, such as configure your program to use DivX drivers or whatever else you can do once the program is installed.

But how?

That’s what repackaging stands for. You can take anything you want and package it into MSI installation file. That’s packaging. When you take existing MSI package or legacy EXE/BAT/whatever package, and transform it to MSI package, that’s called repackaging.

And it’s quite profitable business.

The reason for it to be a profitable business is mainly because you need to be an expert in systems administration and preferably also in hardware and software development in order to successfully repackage the whole software portfolio your 6K-computers company needs.

And most likely you don’t have such specialist or have better tasks for him, right? So you outsource that business to repackaging company and agree to pay per conversion or per day of work, depending from the volume of work required.

Repackaging these days include not only the conversion, but also testing and analysis of your software. For example, you may submit software you were using for years to repackager, and he will test whether his package and the software itself will work in required target operating system, like Windows 7 x64.

If not – then he will recommend the course of actions to make it work, and there is a correlation between his level and “that’s impossible” answer ratio, as more experienced and skilled repackagers tend to solve problem instead of giving up early.

So, let’s return to our company. Once you’ve got your legacy software repackaged into stable and shiny MSI package, you install it wherever you need using SCCM server. SCCM will make sure that older packages are updated with this one, but it won’t track your licenses for it, if any. So as you can see, there is a whole lot of new concepts for a standard systems administrator to uncover.

If you are installing things like Microsoft Office or Adobe Acrobat Pro in your company, the chances are – you need to make sure you don’t install more copies than you paid for. And you want to track how many of them you have left, who needs them and perhaps allow those who needs to install necessary software without you doing much about it. Remember, with ratio of 600 machines per IT administrator, you only have 48 seconds per day for each workstation.

So there are tools that track licenses, allow people to acquire licenses from the pool and automatically install required software once approved by supervisor, or vice versa – remove software from one machine and distribute it to others.

There are even scenarios, when user visits a homepage in local network, requests new computer pre-loaded with required software, and once the request is authorized by his supervisor, receives new computer. But what is important – the computer comes to your company with blank hard drive, and all you need to know as the system administrator – the MAC address of that new computer and the recipient.

You enter the address into your system, power on the machine and forget about it for next half of hour. In 30 minutes it is ready to work, totally loaded with all required software. Then you switch off the old workstation, switch on the new one, user logs in and can continue working right over.

I deliberately don’t name the software packages that make this happen, so it would be easier to understand, that all of them are working on top of the main layer – the Microsoft System Center Configuration Manager, which I am going to talk about soon.

Anyway, as you can see, a single need to operate as much computers as you can with as smaller IT staff as possible, led to whole new sector in IT market and highly sophisticated products, which you should learn if you are about to pursue a career in large organization as Windows Server systems administrator.

ExecuteAs utility

by Dmitry Kirsanov 27. October 2011 17:50

Well, yet another useful command line utility. This one is for system administrators in need to run some command on behalf of another user.

Why bother, if there is a command in Windows, called runas? Well, mainly because it doesn’t accept the password as command line parameter, and also because I wanted to add more features to such simple process.

This is the help text you get when running this program without parameters:

Syntax: executeas.exe /u:UserName /p:Password /x:Priority /d:Domain /a:Affinity /quiet /hide /noprofile /wait /t:60 [program name]
Where t is a timeout in seconds to wait for program completion.
The only required parameter is program name. You can place command line arguments after the program name.

As you can understand, UserName is the user name of target user without the domain name,
Password is his password,
Priority is the priority at which you want this program to be executed (1 – idle, 2 – below normal, 3 – normal, 4 – above normal, 5 – high),
Domain is the domain part of the user name, if needed,
Affinity is how many CPU cores you’d like to use,
Quiet won’t produce any output,
Hide will hide the target program, so it will not be displayed to user,
NoProfile means that profile of target user won’t be loaded,
Wait will wait until the target program will be completed – useful when running from batch file.

So, here it is and have fun!

As  always, .net framework is required for this program to run. This time it’s .net 3.5, which is installed by default on Windows 7 and is available as feature on Windows Server 2008.

ExecuteAs.zip (3.99 kb)

File Synchronization Utility

by Dmitry Kirsanov 26. September 2011 10:31

Yet another command line utility written to do some useful stuff in the background. This time it is about file synchronization.

It’s quite often that we need to make 2 directories in our local network in sync. For example, you may want to synchronize folders with photos, backup files or even production files of your web application between IIS web farm nodes.

This program utilizes the Microsoft Synchronization Framework, so basically it does very little apart from what Microsoft already provides. Personally, I am using it to pull backups from TFS server on daily basis and to synchronize shared folders among load balancing cluster of production web server. In  both cases utility is running as Task Scheduler task and everything happens in background.

It doesn’t require installation, just unpack it to your utilities folder and it’s ready to go. It requires .NET framework 4 Client Profile in order to run. Another dependency is Microsoft Sync Framework 2.1 (Two components required - Synchronization and Provider Services).

FileSync.rar (114.45 kb)

 

Installation file, which will also install the prerequisites, such as .NET Framework 4.0 Client Profile:

FileSyncSetup.exe (4.42 mb)

Running Windows 8 on local virtual machine

by Dmitry Kirsanov 21. September 2011 11:06

Just to repeat what I’ve said in my Twitter recently – now you have the ability to run Windows 8 Developer Preview on your VMWare Workstation. One week ago VMWare released Workstation 8.0, which doesn’t crash and indeed works quite well with Windows 8. Microsoft Virtual PC, as well as earlier versions of VMWare, still crashes.

After installation, you may notice that Start menu is changed by what is called Metro. If you prefer the “old” style Windows 7 menu, you can switch to that by switching one setting in Registry Editor.

In case you are using mouse, rightclick the taskbar, choose Task Manager, go to File and choose New Task. Now type regedit and click OK.

In Registry Editor, navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
There will be setting named RPEnabled. Doubleclick it and change it’s value from 1 to 0.

Now enjoy your start menu.

Sneak Peek into Windows 8 GUI

by Dmitry Kirsanov 14. September 2011 17:29

Just wanted to show the most interesting part for system administrators about changes in most frequently used functionality. Task Manager and file copy / delete operations. As you may see, Task Manager became much more functional and file operations more ordered.

Although the ribbon in Explorer is not shown, it is here and definitely adds to user experience, but can be removed… When it doesn’t :)

Windows 8 GUI sneak peek, switch to Full Screen for better view.

Windows 8 Developer Preview revealed

by Dmitry Kirsanov 14. September 2011 15:00

This night MIcrosoft opened the prototype of their brand new OS and this build was named “Developer Preview”. Aimed mainly at software developers, it has a copy of not yet released Visual Studio 11, using which you can create software for that same Windows 8.

The only downside of this release is that you couldn’t install it on either VMWare workstation or Windows Virtual PC – it could only be installed on either physical or Hyper-V machine. I installed it on both.

First fascinating things about new OS is drastic change in user experience. I don’t even mean the new Metro and effects, but also much reworked file copying routine and Task Manager. The latter became as useful as it never been.

Although scheduled release date is not yet revealed, and most likely will be somewhere in Autumn of 2012, chances are you can grab a copy of ISOs at MSDN.

File Replacement Utility

by Dmitry Kirsanov 24. August 2011 22:48

Ok, here is another command line tool. This time - for developers who create software made of many components.

Imagine, you have a product which consists of main executable file and multiple dll files. And different people are working on these. And you are deploying it all on multiple machines and never know where it could be hiding. Maybe in some build directories, maybe somewhere else.

So this utility will find all instances of that file and replace with the newest one. Moreover, you can even select the older file, but all files will be replaced by the newest found. Well, there are parameters, of course.

As the searching for files is time consuming, the end result of this utility could be a batch file (.bat) which contains commands to repeat operation. It will take the same source file and put it to the same destinations as during the first run. That way, continuous replacing won't be a problem or take more than a couple of seconds.

So, here it is. Requires .net framework 3.5.

filereplace.rar (5,32 kb)



UPDATE 03/MAY/2016: Updated application to version 1.2.1 - fixed bug when file couldn't be found using the /d switch

7-Zip Converter

by Dmitry Kirsanov 23. August 2011 23:05

7zip

7-Zip is the most effective file archive format, which exceeds by far both ZIP and even RAR in terms of compression level. When I realized that a few years back, and when all tests proved I could store more files without the need of buying new and expensive hard drive, that was kind of relief, as I have a huge repository of files. A few terabytes.

You would ask why do I need so much storage, but the fact is – among other trades I am also a trainer, and I need to store my training materials somewhere. And these are mainly not the media files, which are generally well compressed and couldn’t be squeezed further, but documents and images of hard drives and DVDs (iso files and similar). Anyway – something that could be compressed.

The problem was – all these thousands of files were already compressed by ZIP. The least effective but also the most compatible file format. I own a license for WinRAR, so opening any sort of archive isn’t a problem for me, but I didn’t want to either keep old files in ZIP form when I could compress them up to 10 times better, nor convert ZIP files to 7-ZIP manually. No, I needed to convert ZIP files to 7-ZIP automatically.

WinRAR, is quite useful and user-friendly (even though it has one of the worst customer support in software industry), it's compression ratio is not the best, comparing it to less visually attractive free 7-Zip. However, since my precious archives consuming terabytes of data, and hard drives are still quite expensive, especially when you are planning for some redundancy, space becomes more important than graphical user interface of archiver's shell.

However, one little freeware thing that comes with WinRAR is called “RAR converter”, or “rarcvt”. It comes in form of command line utility and is able, using WinRAR, decompress other archives, be it ZIP, CAB, ARJ or even ISO and RPM into RAR. I wanted that functionality for 7-ZIP, but it was nowhere to be found.

So I had to create it myself. I took Visual Studio and in a few hours made what is called now a 7-ZIP converter. This command line utility was tested on thousands of nested archives and proved to improve the efficiency of data storage from at least 1 and up to 99%. Sometimes there were situations when I couldn’t believe my eyes how it was able to repack the ZIP file into 7-ZIP, and the end file was whopping 100 times smaller than ZIP!

I believe that this utility is essential for file server system administrators, as well as for home servers or even personal notebooks, where storage space is quite limited. It does not require installation, but you should have .NET framework 3.5 installed (you already have it in Windows Vista and Windows 7) and, of course, 7-zip. Config file can be edited in Notepad, it has just 3 parameters - the path to 7-zip, path to temporary directory and extensions of archives that should be converted.

Utility finds files by file mask, may convert nested archives (that is - when you have one archive inside of another), can delete the original file after conversion and may set the time stamp of original file to the resulting 7-zip archive.

Well, here it is!

7-Zip Converter Screenshot

7ZipConverter.7z (6,27 kb)