/build/static/layout/Breadcrumb_cap_w.png

Blog Posts tagged with Application packaging training

Ask a question

Looking for Application Packaging Trainer

Searching for Application Packaging Trainer, Who has expertise in InstallShield, AdminStudio, MSI packaging and repackaging.

Email: more.balajib@gmail.com
Mob. No. 9021406392
Location: Pune, Maharashtra, India
Attendees: Attendees has expertise in Software Development (C#.NET, SQL Server, VBScripting) and some basic knowledge of InstallShield and MSI.

View comments (2)

Application Packaging and Virtualization Study Program for Beginners

Application Packaging and Virtualization Study Program with 17 lessons for beginners is available for download

http://www.infopulse.com.ua/Global/PACE/Application%20Packaging%20with%20PACE.pdf

View comments (1)

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

)

 

:OLDCHECK

::OLD VERSION CHECK

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

if %errorlevel%==0 goto :UNINSTALL

) ELSE (

if %errorlevel%==1 goto :INSTALL

)

 

 

:UNINSTALL

::OLD VERSION UNINSTALL

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

 

 

:INSTALL

<Install Line for new Software>

 

:END

 

  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

Silent deploy Mozilla Firefox 22.0 on W7 32bit/64bit (Hybrid)

1. Download the newest offline installer: http://www.mozilla.org/en-US/firefox/all.html

2. Create a new text file called 'override.ini' and copy in the following information:

[XRE]

EnableProfileMigrator=false

 

 

 3. Create a new text file called 'local-settings.js' and copy in the folling information:

pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg");

 

 

 

 

 4. Create a new text file called 'mozilla.cfg' and copy in the following information:

//Firefox Default Settings

// set Firefox Default homepage

pref("browser.startup.homepage",https://yourcompany.com);

// disable default browser check

pref("browser.shell.checkDefaultBrowser", false);

pref("browser.startup.homepage_override.mstone", "ignore");

// disable application updates

pref("app.update.enabled", false)

// disables the 'know your rights' button from displaying on first run

pref("browser.rights.3.shown", true);

// disables the request to send performance data from displaying

pref("toolkit.telemetry.prompted", 2); pref("toolkit.telemetry.rejected", true);

// browser settings

pref("browser.migration.version", 1);

pref("browser.places.importBookmarksHTML", false);

pref("browser.places.smartBookmarksVersion", 1);

pref("browser.preferences.advanced.selectedTabIndex", 1);

pref("browser.rights.3.shown", true); pref("browser.shell.checkDefaultBrowser", false);

pref("browser.startup.homepage", "https://yourcompany.com");

pref("browser.startup.homepage_override.mstone", "rv:1.9.2");

pref("intl.charsetmenu.browser.cache", "UTF-8");

// network settings

pref("network.automatic-ntlm-auth.trusted-uris", "fifa.org");

pref("network.cookie.prefsMigrated", true);

pref("network.proxy.autoconfig_url", "http://proxy.pac");

pref("network.proxy.type", 2);

pref("privacy.sanitize.migrateFx3Prefs", true);

// autoupdate disable

pref("app.update.auto", false);

pref("app.update.enabled", false);

pref("browser.search.update", false);

pref("extensions.update.enabled", false);

You can find all settings if you open Firefox and type about:config in the browse bar

5. Create a new text file called 'install.cmd' and copy in the following information:

@echo off

set AppName=Mozilla Firefox 22.0.0 32bit (EN) - 001

 

:: Path for logfiles.

set Logs=%SystemDrive%\Logs

if not exist %Logs% MD %Logs%

set LogFile=%Logs%\%AppName%.log

set LogFinal=%Logs%\finalcheck%AppName%.log

 

:: Installation

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto AMD64

if /i "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto AMD64

if /i "%PROCESSOR_ARCHITECTURE%"=="x86" goto x86

echo %date% %time% ERROR: Processor Architecture "%PROCESSOR_ARCHITECTURE%" unknown >>"%LogFile%"

goto Error

 

:x86

echo %date% %time% Installation (32 bit) of %AppName% >>"%LogFile%"

cd /D %~dp0

"%~dp0Firefox Setup 22.0.exe" -ms

if exist "%programfiles%\Mozilla Firefox\" copy /Y "%~dp0override.ini" "%programfiles%\Mozilla Firefox\"

if exist "%programfiles%\Mozilla Firefox\" copy /Y "%~dp0mozilla.cfg" "%programfiles%\Mozilla Firefox\"

if exist "%programfiles%\Mozilla Firefox\" copy /Y "%~dp0local-settings.js" "%programfiles%\Mozilla Firefox\defaults\pref"

IF %ERRORLEVEL% EQU 3010 set ERRORLEVEL=0

IF %ERRORLEVEL% NEQ 0 goto Error

goto cleanup

 

:AMD64

echo %date% %time% Installation (64 bit) of %AppName% >>"%LogFile%"

cd /D %~dp0

"%~dp0Firefox Setup 22.0.exe" -ms

if exist "%ProgramFiles(x86)%\Mozilla Firefox\" copy /Y "%~dp0override.ini" "%ProgramFiles(x86)%\Mozilla Firefox\"

if exist "%ProgramFiles(x86)%\Mozilla Firefox\" copy /Y "%~dp0mozilla.cfg" "%ProgramFiles(x86)%\Mozilla Firefox\"

if exist "%ProgramFiles(x86)%\Mozilla Firefox\" copy /Y "%~dp0local-settings.js" "%ProgramFiles(x86)%\Mozilla Firefox\defaults\pref"

IF %ERRORLEVEL% EQU 3010 set ERRORLEVEL=0.

IF %ERRORLEVEL% NEQ 0 goto Error

goto cleanup

 

:: Cleanup

:Cleanup

if exist "%ALLUSERSPROFILE%\Start Menu\Programs\Mozilla Firefox.lnk" del /f /q "%ALLUSERSPROFILE%\Start Menu\Programs\Mozilla Firefox.lnk"

if exist "%public%\Desktop\Mozilla Firefox.lnk" del "%public%\Desktop\Mozilla Firefox.lnk"

goto End

:: Errorhandler

:Error

echo %date% %time% %AppName% >>"%LogFinal%"

if %errorlevel% EQU 1 echo ERROR 1 - [NOT-SUCCESS] - Fatal Error >>"%LogFinal%"

if %errorlevel% EQU 13 echo ERROR 13 - [INVALID_DATA] - The data is invalid >>"%LogFinal%"

if %errorlevel% EQU 87 echo ERROR 87 - [INVALID_PARAMETER] - One of the parameters was invalid. >>"%LogFinal%"

if %errorlevel% EQU 1601 echo ERROR 1601 - [FAILURE] - The Windows Installer service could not be accessed >>"%LogFinal%"

if %errorlevel% EQU 1602 echo ERROR 1602 - [INSTALL_USEREXIT] - User cancel installation >>"%LogFinal%"

if %errorlevel% EQU 1603 echo ERROR 1603 - [INSTALL_FAILURE] - Fatal error during installation >>"%LogFinal%"

if %errorlevel% EQU 1604 echo ERROR 1604 - [INSTALL_SUSPEND] - Installation suspended, incomplete >>"%LogFinal%"

if %errorlevel% EQU 1608 echo ERROR 1608 - [UNKNOWN_PROPERTY] - Unknown property >>"%LogFinal%"

if %errorlevel% EQU 1610 echo ERROR 1610 - [BAD_CONFIGURATION] - The configuration data for this product is corrupt >>"%LogFinal%"

if %errorlevel% EQU 1612 echo ERROR 1612 - [INSTALL_SOURCE_ABSENT] - The installation source for this product is not available >>"%LogFinal%"

if %errorlevel% EQU 1613 echo ERROR 1613 - [INSTALL_PACKAGE_VERSION] - Servicepack required >>"%LogFinal%"

if %errorlevel% EQU 1618 echo ERROR 1618 - [INSTALL_ALREADY_RUNNING] - Another installation is already in progress >>"%LogFinal%"

if %errorlevel% EQU 1619 echo ERROR 1619 - [_INSTALL_PACKAGE_OPEN] - This installation package could not be opened >>"%LogFinal%"

if %errorlevel% EQU 1621 echo ERROR 1621 - [INSTALL_UI_ERROR] -There was an error starting the Windows Installer >>"%LogFinal%"

if %errorlevel% EQU 1624 echo ERROR 1624 - [INSTALL_TRANSFORM_FAILURE] - Error applying transforms >>"%LogFinal%"

if %errorlevel% EQU 1639 echo ERROR 1639 - [INVALID_COMMAND_LINE] - Invalid command line argument >>"%LogFinal%"

if %errorlevel% EQU 3010 echo ERROR 3010 - [SUCCESS_REBOOT_REQUIRED] - A restart is required to complete >>"%LogFinal%"

echo %date% %time% ERROR: %ERRORLEVEL% >>"%LogFile%"

echo Error: %ERRORLEVEL%

echo.

 

:: End of Script

:End

echo %date% %time% End installation of %AppName% >>"%LogFile%"

echo End

 

 

 6. Create a new uninstall.cmd file and copy in the folling information:

@echo off

set AppName=Mozilla Firefox 22.0.0 32bit (EN) - 001

:: Path for logfiles.

set Logs=%SystemDrive%\Logs

if not exist %Logs% MD %Logs%

set LogFile=%Logs%\%AppName%.log

 

:: Uninstallation

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto AMD64

if /i "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto AMD64

if /i "%PROCESSOR_ARCHITECTURE%"=="x86" goto x86

echo %date% %time% ERROR: Processor Architecture "%PROCESSOR_ARCHITECTURE%" unknown >>"%LogFile%"

goto Error

 

:x86

echo %date% %time% Start uninstallation of %AppName% >>"%LogFile%"

"%ProgramFiles(X86)%\Mozilla Maintenance Service\Uninstall.exe" /S

regedit /s "%~dp0delAddRemoveEintrag.reg"

IF %ERRORLEVEL% NEQ 0 goto Error

goto Cleanup

 

:AMD64

echo %date% %time% Start uninstallation of %AppName% >>"%LogFile%"

"%ProgramFiles(x86)%\Mozilla Maintenance Service\Uninstall.exe" /S

regedit /s "%~dp0delAddRemoveEintrag.reg"

IF %ERRORLEVEL% NEQ 0 goto Error

goto Cleanup

 

:: Cleanup

:Cleanup

if exist "%ALLUSERSPROFILE%\Start Menu\Programs\Communications\Mozilla Firefox.lnk" del /f /q "%ALLUSERSPROFILE%\Start Menu\Programs\Communications\Mozilla Firefox.lnk"

if exist "%PROGRAMFILES(x86)%\Mozilla Firefox\" rmdir /s /q "%PROGRAMFILES(x86)%\Mozilla Firefox\"

:: Errorhandler

goto End

:Error

echo %date% %time% ERROR: %ERRORLEVEL% >>"%LogFile%"

echo Error: %ERRORLEVEL%

echo.

 

:: End of Script

:End

echo %date% %time% End uninstallation of %AppName% >>"%LogFile%"

echo End

 

That's it, now you can deploy the new Firefox with every deployment software.

If you have any questions, feel free to ask.

View comments (1)

How to remove the files using remove file table in install shield 2012.

How to remove the files using remove file table. Also I want to delete my INSTALLDIR all files & folders how to do it remove file table. I did it in installscript some time it's deleting some time it's not deleting (due to admin rights ,UAC Enabling). That's why I'm asking about remove file table

Note : I'm using basic MSI project in install shield 2012. 

View comments (9)
Showing 1 - 5 of 14 results

Top Contributors

Talk About Silent Install Commands