trashy

Creating an installer

7 posts in this topic

I want to create an installer for Easy_DISM using AutoIt. The basic installer and a desktop shortcut not a problem. Win 8.1 and 10 to PIN to start is a different matter. I found this little snippet Pin a shortcut to StartMenu

@Subz you seem to be the man with the answers again, My Hero!

Time for work so won't get a chance to try this till tomorrow but will this work in both Windows 8.1 and 10?  I only have 2 or 3 programs to make shortcuts for, use the xml to arrange them and the powershell cmd to apply?

Share this post


Link to post
Share on other sites



Hey Trashy

Personally I would recommend InnoSetup for packaging a setup.exe, recommend using the Quick Start pack http://www.jrsoftware.org/isdl.php#qsp.  It's extremely easy to use and will create uninstall strings, an automatic uninstaller, shortcuts to the Start Menu, Desktop (you can make this optional).  This is the same software installer that AutoIT uses.

With regards to Pin shortcuts to menu, it's no longer supported in Windows 10, Microsoft view the pinned areas to be personal and have made it difficult to pin items.  In a company situation, you can use the PowerShell method for setting up a Windows build for deploying to staff, but would not recommend this for an installer.

Just my 2 cents.

Thanks

Share this post


Link to post
Share on other sites

Thanks Subz

I took a quick look at InnoSetup and thought I may end up going that route eventually, biggest reason because of uninstall. I just wanted to see what I could accomplish with Autoit. Place shortcut in appdata\microsoft\windows\startmenu and it shows up in all apps in windows 8.1. I didn't think it would be so difficult to pin to the start page.

Functions like Export ESD to WIM only available with DISM 10 make it necessary to have DISM 10 files available in Win 7 and 8.1. JFX has agreed to let me include GetWaikTools with Easy_DISM. This means I can fully automate the DISM 10 download and install process, only 10 mb download using GetWaik. I wanted to add the DISM download feature to the installer but no worries. 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

9 hours ago, Subz said:

Personally I would recommend InnoSetup for packaging a setup.exe, [...].  This is the same software installer that AutoIT uses.

No, AutoIt installer is made from NSIS.

 

Edited by jguinch

Share this post


Link to post
Share on other sites

@jguinch Sorry stand corrected

@trashy Its better to configure your installer, shortcuts, ini, exe files via InnoSetup, so that during uninstall it can remove them correctly, if you install them with AutoIT then they will remain after you uninstall.

One thing you need to check is compression, I have found that AutoIT scripts that use compression or are compressed with a third party tool are likely to get false positives from Virus Scanners.  So you may want to submit your exe after compilation along with the setup.exe to anti-virus companies.

InnoSetup.jpg

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Quote

Subz said:

Hey Trashy

Personally I would recommend InnoSetup for packaging a setup.exe,

 

I agree.  I used to add some style elements to the install dialog using the free ISSkin tool for Inno.  Also if you know Pascal you can do quite a bit with the Inno scripting if there is something not covered by other options.  Last time I tried the skin styler it added maybe 1/4 MB to the size of the installer.  It puts a Dll in the install folder to supply the customized resources.  You can easily delete the Dll when the install is done.  Very cool for a free installer.

 

Edited by MilesAhead
quote attribution added

Share this post


Link to post
Share on other sites

Thanks everyone

Just finished updating the installer I made with Autoit ( got a few people testing the new program layout ). Updated program Easy_DISM and created new app EZ Download DISM 10 to download and install Dism 10.

Installer

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Install Easy_DISM", 305, 163, 269, 126)
$Button1 = GUICtrlCreateButton("Install", 48, 72, 80, 25)
$Button2 = GUICtrlCreateButton("Cancel", 176, 72, 80, 25)
$Label1 = GUICtrlCreateLabel("Create Shortcuts", 112, 8, 83, 17)
$Checkbox1 = GUICtrlCreateCheckbox("DeskTop", 56, 32, 65, 17)
GUICtrlSetState(-1, $GUI_CHECKED)
$Checkbox2 = GUICtrlCreateCheckbox("StartMenu", 184, 32, 65, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
$Label2 = GUICtrlCreateLabel("After Install you may be prompted to install DISM 10 ", 32, 112, 249, 17)
$Label3 = GUICtrlCreateLabel("Windows 7 REQUIRED   Windows 8.1 RECOMMEND", 24, 136, 262, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE, $Button2
            Exit
        Case $Button1
            If FileExists(@ProgramFilesDir & "\Easy_DISM") Then
                DirRemove(@ProgramFilesDir & "\Easy_DISM", 1)
            EndIf
            If Not FileExists(@ProgramFilesDir & "\Easy_DISM") Then
                DirCreate(@ProgramFilesDir & "\Easy_DISM")
            EndIf
            If FileExists(@HomeDrive & "\ProgramData\EZDISM\7z.exe") Then
                FileDelete(@HomeDrive & "\ProgramData\EZDISM\7z.exe")
            EndIf
            If FileExists(@HomeDrive & "\ProgramData\EZDISM\7z.dll") Then
                FileDelete(@HomeDrive & "\ProgramData\EZDISM\7z.dll")
            EndIf
            If FileExists(@HomeDrive & "\ProgramData\EZDISM\EZ_config.ini") Then
                FileDelete(@HomeDrive & "\ProgramData\EZDISM\EZ_config.ini")
            EndIf
            If FileExists(@HomeDrive & "\ProgramData\EZDISM\GetWaikTools.exe") Then
                FileDelete(@HomeDrive & "\ProgramData\EZDISM\GetWaikTools.exe")
            EndIf
            If FileExists(@HomeDrive & "\ProgramData\EZDISM\ReadME.txt") Then
                FileDelete(@HomeDrive & "\ProgramData\EZDISM\ReadME.txt")
            EndIf
            FileInstall("C:\Program Files\Easy_DISM 2\Easy_DISM.exe", @ProgramFilesDir & "\Easy_DISM\Easy_DISM.exe", 1)
            FileInstall("C:\Program Files\Easy_DISM 2\Easy_DISM_x64.exe", @ProgramFilesDir & "\Easy_DISM\Easy_DISM_x64.exe", 1)
            FileInstall("C:\Program Files\Easy_DISM 2\EZ Download DISM 10.exe", @ProgramFilesDir & "\Easy_DISM\EZ Download DISM 10.exe", 1)
            FileInstall("C:\Program Files\Easy_DISM 2\GetWaikTools.exe", @ProgramFilesDir & "\Easy_DISM\EGetWaikTools.exe", 1)
            If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
                If @OSArch = "x86" Then
                    FileCreateShortcut(@ProgramFilesDir & "\Easy_DISM\Easy_DISM.exe", @DesktopDir & "\Easy_DISM.exe")
                ElseIf @OSArch = "x64" Then
                    FileCreateShortcut(@ProgramFilesDir & "\Easy_DISM\Easy_DISM_x64.exe", @DesktopDir & "\Easy_DISM.exe")
                EndIf
            EndIf
            Run(@ProgramFilesDir & "Easy_DISM\EZ Download DISM 10.exe")
            Exit
    EndSwitch
WEnd

This will get the ball rolling. Already downloaded InnoSetup should be no prob, if there is "I'll be Back".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now