07 December, 2010

Repackage an Application - Silent Install - Batch to EXE Converter

Repackage an Application – PDF-XChange Viewer PRO Deployment Methods

-This example will use the program PDF-XChange Viewer PRO for demonstration purposes but you can use any other software that is compatible with this method of repackaging!

Write a batch file with the following (desired) commands;

@echo off


regedit.exe /s "settings.reg"


The file "settings.reg" is the registry entries which contains some of the preferences and settings for this particular program. All software that we install on our computers has this kind of entries in the "Registry Editor". You can export this registry key for your particular program and add in your batch file in order to customize some of the settings silently right after the installation!

Once your batch file is ready, let's save it as "setup.bat" for this exercise! Download the latest version of the PDF-XChange Viewer PRO program and rename it to "setup.exe" for this exercise. You will also need the program Bat to Exe Converter from (www.f2ko.de). Now, let's start repackaging the application.

Look at the following screenshots to set the same settings with your installation files like your setup.bat, setup.exe and if you want to use any custom icon for your project! Finally, you should click on "compile" button to have your application repackaged in an "exe" setup file.

Finally you can use the created "setup" to install you preferred application silently on your organizations computers. As we used some switches in our batch file with the fabricants setup file, our installation was silent! That means no user interaction! This is very important in an organization because you don't want anybody to install any program with any settings that they want! Sometimes they don't even know the reason or purpose of the installation. I personally have experienced this method with Microsoft System Center Essentials 2007 to deploy the same application with the same method to about 100 computers and I never had any problems. I was even able to update the existing installation on workstations with the fabricants newest versions easily!

Kubilay Elmas

01 December, 2010

Using PowerShell to Export a List of all the Users in a Security Group in Active Directory


PowerShell is known with its power of Active Directory management. If you really into simplifying your daily complicated time consuming tasks, this might be very interesting for you. Lately, for a small project I needed to make a list of all the users in a “Security Group” in Active Directory. The security group is called “Color Printing” and we had about 20 users in that “Security Group”. I did not want to write down all the names one by one in a excel sheet so I’ve started to make a research about how to export the list of users in security group. I know that when your users are only in an “Organization Unit”, it’s very easy to do this task, but when it’s a security group, you don’t have the “Export” option.
Here what I found to complete a task of this kind! You can download free cmdlets from http://www.quest.com/powershell/activeroles-server.aspx for “Active Directory” management tasks. Once the right setup is downloaded and installed in your computer (in my case X64 version because I use an X64 computer). You can open “PowerShell” and add the snapin into PowerShell.
1- Open PowerShell and type in “Add-PSSnapin Quest.ActiveRoles.ADManagement” without quotes.
2- Now you can try to run a cmdlet to try if your snapin is installed correctly. To try, type in the command “get-help get-qaduser
If you get the help description, which means that the snapin is installed with no problem. If you close your PowerShell and re-open it, you will notice that the snapin that you added before is no longer available. If you want that snapin to be available all the time when you start your PowerShell, you have to do the following instructions…
1- Open PowerShell and type in “new-item -itemtype file -path $profile -force" without quotes.
2- This should create a folder called "WindowsPowerShell" under "C:\Users\%username%\My Documents\" with a file called "Microsoft.PowerShell_profile.ps1"
3- Right click on the file “Microsoft.PowerShell_profile.ps1” and open it with Notepad or any text editor and add your commands that you want them start with your PowerShell! In our case, we will only enter the following command and save the file as it is.
Add-PSSnapin Quest.ActiveRoles.ADManagement
4- Restart your PowerShell and try the “get-help get-qaduser” command to see if your snapin is loaded when you start your PowerShell.
Now that we have everything that we need in order to complete our task, let’s begin…
To export a list of all users in a Security Group in your Active Directory environment, follow the instructions here…
1- Open your PowerShell, and use the following command to export the list. You should modify the command with your organization’s values.
Get-QADGroupMember “Color Printing” | Export-CSV -path “C:\colorprinting.csv” -notypeinformation
This command will generate a list of all the members of the “Color Printing” security group in your Active Directory in “C:\colorprinting.csv” file.