Blog Posts tagged with Software

Ask a question

Packaging Guide: Getting Started

Hey folks, since I've moved into a role where I do the software packaging for my company I've been putting together guides for the various programs I've done. I do this for two reasons, in case I ever need to rebuild them, and if I ever want to move up into a new role I'll need some way to train the person taking over for me. Below is some information I've compiled as general knowledge of packaging. Information as well as links that I've found useful are all layed out below. With every new package I do I add a little more to the list. As I continue to package programs and learn more I'll be updating this entry. If you have any questions please let me know! I'd be happy to try and help the best I can. As well if you have any tips and tricks of your own feel free to add them in the comments!

  1. To add programs to the Dell K1000: 
    1. Take the requested software and create a batch file to run it. If you can get it in .msi format that will be the easiest way.
      1. If you can’t get it in .msi format, you can try to package the .exe, however if that fails you’ll want to move on to AutoIT, and if that fails the last line of defense is AppDeploy Repackager.
    2. Compile the files you need and the install.bat into a zip file.
    3. In the K1000, go to Inventory -> Software and look for the program. Chances are it’s already been created since it’s been installed before. If that’s the case use that. Otherwise you may need to create a Custom Inventory rule like:
      1. FileExists(location in Program files) OR FileExists(location in Program files (x86))
  2. MSI commands
    1. MSIEXEC /I – Install command. This is done first, before the .msi file
    2. MSIFASTISTALL=1 – Uses a faster install by not checking disk space, or creating a restore point. This however may not sit well with certain 64bit Win 7 installs. If you have trouble deploying to 64bit, remove this line and see if that fixes it.
    3. /qn – “Quiet No interface” command this is a switch you’ll want to use as much as possible.
    4. /norestart – Disables restarting after an install. Important to prevent the user from losing work.
    5. RUNATONCE=”YES” – Enables the program on startup.
  3. InstallShield Commands (certain .exe’s)
    1. An easy way to check is a setup is install shield will be to run the setup.exe /? This should pop up a prompt to tell you some basic commands.
    2. /r – “Records” an install and places a file called setup.iss in C:\windows
    3. /s /f1”path to ISS file” – “Silent” uses a silent install and points to the setup.iss, without the ISS file it’s unlikely to finish. There should be no space between the /f1 and the path to the iss file. I.e. /f1C:\windows
  4. Inno Commands (certain .exe’s)
    1. /silent – Automatic install with a basic interface
    2. /verysilent – Automatic install with no interface
    3. /norestart – Disables restarting after an install. Important to prevent the user from losing work.
    4. /noicons – Disables creation of desktop icon or start menu folder.
  5. Batch Commands (.bat files)
    1. You can run any command that you normally do in Command line, meaning executables, directory listings, and others.
    2. If
      1. Exist – will search for a file, folder, location, drive, just about anything you need. Normally combined with another command. i.e. If exist <statement> <Command>
      2. Else – Allows you to add conditions to your If statement, so that if a condition is not met a different task than normal will be performed. i.e. If <statement> ( ) ELSE ( <command> )
      3. Not – Allows you to perform the opposite of a command. i.e. If NOT exist
    1. Goto – Sets the batch file to go to a label you’ve created. i.e. If exist C:  goto end (then at the bottom of the batch you’ll type :end
    2. Pause – Stops the batch file, useful for troubleshooting batch files that fail, but blink away too fast to see where. You’ll need to push a button to continue from a paused screen.
    3. Echo – Allows you to put a message on the screen for the user. However it needs to be preceded by @echo off to make it so the echo command isn’t displayed in the message, as well it should be followed by pause so that the user has time to read the message.
    4. REG query will allow you to query the registry for keys. See Links 12-8 and 12-9 for more information.
  1. Be Aware of These Problems:
    1. When deploying to 64bit, the net use command to map a drive will work during testing, but when deployed through KACE Managed installations it will result in a disconnected network drive, though you’ll have access to it. To get around this you’ll need to follow these steps
      1. Convert the code into a bat file
      2. Convert the bat file into an exe (iexpress.exe[use cmd /c <batfile>.bat at the installation command])
      3. Call the new batfile.exe with RunAsCurrentUser.exe --w <Location of batfile.exe>
    1. Not all pieces of software will behave normally in a VM, so it’s good to have physical test machine as well.
    2. Sometimes MSIFASTINSTALL batch command will cause it to not properly install on 64bit machines.
    3. Use Notepad++ to get a better look at your code than just plain notepad or word.
    4. Sometimes switches are case sensitive, meaning /s might not work for silent mode whereas /S will.
  1. Software Check Workflow for Install.bat
  2. Install.bat template:

::New Software Check

REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{<Product Key for New Software>}

IF %errorlevel%==0 goto :END

) ELSE (

if %errorlevel%==1 goto :OLDCHECK





REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{<REGKEY>}

if %errorlevel%==0 goto :UNINSTALL

) ELSE (

if %errorlevel%==1 goto :INSTALL






MsiExec /qn /X{<REGKEY>} (Or whatever the uninstall code is)




<Install Line for new Software>




  1. A quick way to check for what OS version the machine running the script is using, nice if you need to do something different between 32bit and 64bit installs and you don't want to make two scripts.

set ProgFiles86Root=%ProgramFiles(x86)%

IF NOT "%ProgFiles86Root%"=="" (

     <Place whatever you want to do in 64bit here, xcopy, install, whatever>

) ELSE (

     <Place whatever you want to do in 32bit here, xcopy, install, whatever>


  1. Helpful links
    1. ITNinja
    2. Packaging InfoGraphic
    3. Windows Variables
    4. AppDeploy Repackager
    5. AutoIT
    6. Notepad++
    7. Xcopy Commands
    8. Registry Batch Commands
    9. Batch Error Levels/Registry Commands
Be the first to comment

K1000 :: Inventory :: Software :: Custom ticket rule for RegistryValueReturn REG_DWORD value for 5.3

If you are unable to get a RegistryValueReturn to work with a REG_DWORD key, try the following steps as a workaround:


ShellCommandTextReturn(reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-7AD7-1033-7B44-AA1000000001} /v language) 

I did this rule in my test environment and it worked like a champ. 

1. Open up regedit.exe 
2. Find the key that you want 
3. Right-click it and say "copy key name" 
4. In your customer invnetory rule, type: 

ShellCommandTextReturn(reg query <insert_clipboard_contents_here_minus_brackets> /v <insert_value_name_here_minus_brakcets>) 

5. Make sure to select the OS's that he wants the rule to apply to. 
6.Force an inventory on a machine to test. 

When mine worked, I got this under Custom Inventory Rules in my computer inventory: 

1) CUSTOM - Registry Value Return:
language REG_DWORD 0x409 


Be the first to comment

Profiling Firefox in Citrix XenApp 6.5


In the next few steps I will share with you, as to how you should profile Firefox(ver. 13) in citrix xenapp 6.5


Firefox, as you all know is a web browser by Mozilla. Most of us have often struggled with the first few screens that come when you launch firefox for the first time after installation. Its really painful to repeat all those steps if you are planning to deploy this application over a network.


Firefox creates a profile under %Appdata% (roaming in case of windows 7). Now if you open this folder you will find a folder named mozilla. under this folder you will find the folder Firefox, under this folder you will find a folder named crash reports, profiles and a profiles.ini file. If you open this profiles.ini, you will find the following content in it



Now the most important thing in this ini file is the last line highlighted in bold in the above line. open the profile folder in the firectory where the profiles.ini file is present, you will find a folder by exactly similar name as in the above ini file. If you delete this folder firefox will again ask you to configure it, in the same manner it asked you , when you launched the application for the first. So to avoid this make sure you never delete this folder. Now  coming to the suppression of updates in the firefox. All the options related to pop up that surface after configuring firefox, updates, sending crash reports, etc.. are stored in prefs.js file. And this is the file that we are looking for.  This file is located in following location %AppData%\Mozilla\Firefox\Profiles\n9i7r825.default\prefs.js. Always keep a backup of this file , incase some of you dont wish to configure firefox over and again after installation. Just copy this file in the above mentioned location as soon as the installation is over, and the Firefox would bother you ever for the configuration

How to Profile:

Now what I am about to cover here is pertaining to XenApp 6.5.

1. Open the profiler in the profiling machine

2. Select New profile in the above step

3. Click next

4. name the profile as per your requirement.

5. Click next

6.Click next

7. Select the platform for which you wish to deploy the application and its language

8. now if your installation has just a single installer select the default option else select advanced option and  continue with the default option already present on the next screen and click next

9. Pass the exe and command line arguments if any on this screen and click next

10. Click launch installer. At this stage the installation of firefox would start. Proceed as if you were installing the firefox on your machine. Once done with installation, the next button will get highlighted by itself, click next it will take you to the next screen

Click next if you dont wish to install other applications alongside firefox and wish to profile those alongwith firefox, in which case you should select the second option. Rest i presume should be easy for all those reading this.

on the next screen the profiler will detect the installed applications by default. if it doesnt it means something went wrong and you need to start profiling again.

click next once you have run the application.

click next on this screen

follow the default settings on the next screen until you reach the final screen where the profiler asks you to build the profile as shown below

click finish and the profiler will build your profile. Exclusions related to files and folders can be done by opening the .profile file for upgrade. I will cover that later on, right now , dont wish to confuse the audience.

Finishing the application
Now if you'll remember i discussed something about the prefs.js file in the beginning. Yes, now that file comes into file. Now what i didnt tell you was, the xenapp 6.5 doesnt capture user related files , so how do we handle it? At this stage , we need to write a prelaunch vbscript which will copy this file everytime this application is launched

but first let me share with you the contents of prefs.js file

# Mozilla User Preferences

/* Do not edit this file.
 * If you make changes to this file while the application is running,
 * the changes will be overwritten when the application exits.
 * To make a manual change to preferences, you can visit the URL about:config

user_pref("", false);
user_pref("app.update.enabled", false);
user_pref("app.update.mode", 0);
user_pref("app.update.service.enabled", false);
user_pref("browser.bookmarks.restore_default_bookmarks", false);
user_pref("browser.cache.disk.capacity", 1048576);
user_pref("browser.cache.disk.smart_size.first_run", false);
user_pref("browser.migration.version", 6);
user_pref("browser.places.smartBookmarksVersion", 3);
user_pref("browser.preferences.advanced.selectedTabIndex", 2);
user_pref("browser.rights.3.shown", true);
user_pref("", false);
user_pref("", false);
user_pref("browser.startup.homepage_override.buildID", "20120614114901");
user_pref("browser.startup.homepage_override.mstone", "13.0.1");
user_pref("browser.taskbar.lastgroupid", "E7CF176E110C211B");
user_pref("extensions.blocklist.pingCountVersion", 0);
user_pref("extensions.bootstrappedAddons", "{}");
user_pref("extensions.databaseSchema", 12);
user_pref("extensions.enabledAddons", "{972ce4c6-7e08-4474-a285-3208198ce6fd}:13.0.1");
user_pref("extensions.installCache", "[{\"name\":\"app-global\",\"addons\":{\"{972ce4c6-7e08-4474-a285-3208198ce6fd}\":{\"descriptor\":\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\extensions\\\\{972ce4c6-7e08-4474-a285-3208198ce6fd}\",\"mtime\":1341981846073}}}]");
user_pref("extensions.lastAppVersion", "13.0.1");
user_pref("extensions.lastPlatformVersion", "13.0.1");
user_pref("extensions.pendingOperations", false);
user_pref("extensions.shownSelectionUI", true);
user_pref("intl.charsetmenu.browser.cache", "UTF-8");
user_pref("network.cookie.prefsMigrated", true);
user_pref("places.history.expiration.transient_current_max_pages", 104858);
user_pref("privacy.sanitize.migrateFx3Prefs", true);
user_pref("services.sync.clients.lastSync", "0");
user_pref("services.sync.clients.lastSyncLocal", "0");
user_pref("services.sync.globalScore", 0);
user_pref("services.sync.migrated", true);
user_pref("services.sync.nextSync", 0);
user_pref("services.sync.tabs.lastSync", "0");
user_pref("services.sync.tabs.lastSyncLocal", "0");
user_pref("toolkit.startup.last_success", 1341982165);
user_pref("toolkit.telemetry.prompted", 2);
user_pref("toolkit.telemetry.rejected", true);
user_pref("urlclassifier.keyupdatetime.", 1344569870);
user_pref("xpinstall.whitelist.add", "");
user_pref("xpinstall.whitelist.add.36", "");

the highlighted sections matter the most. If you observe closely, the highlighted lines are self explanatory, if not, let me tell you that those lines , will suppress automatic updates and automatic search engine updates.

now comes the the prelaunch vbscript file, but before that, did i tell you where you should keep this file , so that prelaunch.vbs copies this file everytime it runs in user. For that , open the .profile file generated in the above profiling steps. 

refer the image below

click update/install application , so that we can add file. click next on the screen that appears

on the next screen , select  advanced install, and click next. On the next screen , select "select files and folders radio button" and click next. it will take you to the following screen

the left hand section designates the files on the machine and the right hand section designates the file in the profiled application. Now in the left hand section, navigate to the desktop folder(i presume that should not be difficult ) Once on desktop folder, add that folder to the captured installation directory of firefox(u can keep the file anywhere in the captured directories, but i prefer INSTALLDIR). once the file is added , click next. On the next screen, select finish application and click next. again you will be presented with the screen asking you to run the application. Run the application and follow on screen instruction.When done , follow the default options on the screen untill you get the screen which asks you to build the profile and Voila!! you are done adding the file

Now lets write our vbscript file. Use the following content. I dont own any of the following content. Nor am i a very good scripter, but can write everyday scripts that can get the work done.


Option Explicit

On Error Resume Next

Dim objShell, objFso, struserpath, filepath, strCD, cmd, strAppdata, strSource1, strSource2, strDest, strDest1, strDest2, strDest3, strMicro, strFile

Set objShell=wscript.CreateObject ("wscript.Shell")
Set objFso=CreateObject ("Scripting.FileSystemObject")

strAppdata = objshell.expandenvironmentstrings("%appdata%")
strCD = objshell.expandenvironmentstrings("%ProgramFiles(x86)%")

strSource1 = strCD & "\Mozilla Firefox\profiles.ini"
strSource2 = strCD & "\Mozilla Firefox\prefs.js"
strMicro = strAppdata & "\Mozilla\"
strDest1 = strAppdata & "\Mozilla\Firefox\"
strDest2 = strAppData & "\Mozilla\Firefox\Profiles\"
strDest3 = strAppData & "\Mozilla\Firefox\Profiles\382pmpjp.default\"
strFile = strAppdata & "\Mozilla\Firefox\Profiles\382pmpjp.default\prefs.js"

If Not objFSO.FolderExists( strMicro ) Then
            objFSO.CreateFolder strMicro
End if

If Not objFSO.FolderExists( strDest1 ) Then
            objFSO.CreateFolder strDest1
End if

If Not objFSO.FolderExists( strDest2 ) Then
            objFSO.CreateFolder strDest2
End if

If Not objFSO.FolderExists( strDest3 ) Then
            objFSO.CreateFolder strDest3
End if

If Not objFSO.FileExists( strFile ) Then
         objFso.CopyFile strSource1 , strDest1
                 objFso.CopyFile strSource2 , strDest3, OVERWRITE_EXISTING
End if

Set objShell= nothing
Set objFso= nothing


Save this file by anyname.vbs
Now how to add this script to our profile?

again refer the following options

This time click properties and you will get the following screen

select the highlighted section. Uncheck the use profile settings. this will open up the prelaunch & Post exit scripts section.

Click Add. browse to the directory where you have kept your vbs file. Do not change any other option on the window unless you are sure about it. Once done adding the file, click apply and ok and save the profile on desktop. and you are done. Now when  you publish this application you will no longer get the same configuration windows and also the auto update will be disabled.


Do let me know if in case, someone finds any difficulty in the above mentioned steps



View comments (2)

Custom Inventory Rule and Accessing Registry on 64 Bit OS

Dell Kace agent is a 32 bit application. Hence on a 64 Bit OS, registry path HKLM in Dell Kace agent will point to HKLM\Software\Wow6432.

Hence, In Custom Inventory Rule, to access HKLM\Software of the 64 bit hive, use HKLM64\Software.


On a 64 Bit OS, to check the existence of a registry key from HKLM\Software\Intel construct Custom Inventory Rule as

Be the first to comment

profiling microsoft project 2007 in xenapp 6.5


Today i would be sharing with you the steps to create a profile of Microsoft project 2007. Follow the below mentioned steps.

1. In my earlier post of creating profiled application of Mozilla Firefox, i have shared with you , how to create a profiled application

2. Next click the below link The process of customizing office applications is pretty big. Hence i wont get into explaining the whole procedure and would leave that as an exercise to the packager.

3. Once done with the customization of the project 2007, you need to make sure that you have added the below registry in your msp.

These will suppress the first run screen, that you usually get when launching the project 2007 shortcut for the first time in any user.

4. Next under the help menu of project 2007 there are some options related to online activation and other help option, that are usually not desired and hence can safely be removed. For this, launch project 2007 shortcut, go to Tools->Customize->Toolbars. Choose the commands tab. Click the Rearrange Commands. Refer the following image for the same

on the next window that opens after clicking Rearrange commands,go to menu bar radio button, and from the drop down choose the help option as follows

remove all the unnecessary options leaving only the ones as mentioned in the above image. Now as soon as you do this, a file under %appdata%\Microsoft\MS Project\12\1033\Global.mpt. This is the file that contains all the setting, to all the options that you wish to remove from any of the menu bar options, like the one we just did in the above step.

Now you all might be thinking that the only work that remains, is profiling application and your are done...right!!!!. But just a step more and then definately you are done. hmm, so lets get down to it.

5. Recall, i mentioned something about userprofile issues of XenApp 6.5. For all those who recalled, Cheers!!! you have started getting grip on XenApp. For all those , who are still struggling in recalling, what i mentioned about per user profile, the answer is prelaunch vbs file that would copy the per user related file to its location.

6. Now i would leave that as an exercise to creating prelaunch script and inserting it in the profiled application,as an exercise to the user, since i already mentioned , in my earlier article, where in i copied the prefs.js file to the per user location(Enough of the hint, this should ring some bells in your mind).

7. For the newbies, who need some help regarding the above steps, please refer the following link

Hope the above steps,prove to be of some help to the users.

Please feel free to  suggest any changes and mistakes in the above article. I would really appreciate that!!!

Be the first to comment
Showing 1 - 5 of 388 results

Top Contributors

Talk About KACE 1000