trashy Posted February 22, 2017 Share Posted February 22, 2017 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? Link to comment Share on other sites More sharing options...
Subz Posted February 22, 2017 Share Posted February 22, 2017 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 RTFC 1 Link to comment Share on other sites More sharing options...
trashy Posted February 23, 2017 Author Share Posted February 23, 2017 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. Link to comment Share on other sites More sharing options...
jguinch Posted February 23, 2017 Share Posted February 23, 2017 (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 February 23, 2017 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Subz Posted February 23, 2017 Share Posted February 23, 2017 @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. Link to comment Share on other sites More sharing options...
MilesAhead Posted February 23, 2017 Share Posted February 23, 2017 (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 February 23, 2017 by MilesAhead quote attribution added My Freeware Page Link to comment Share on other sites More sharing options...
trashy Posted February 24, 2017 Author Share Posted February 24, 2017 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 expandcollapse popup#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". Link to comment Share on other sites More sharing options...
v20100v Posted June 8, 2018 Share Posted June 8, 2018 Hi, I propose a solution to package an AutoIt application and create a Windows Installer with InnoSetup, as describe here : https://v20100v.github.io/autoit-gui-skeleton/documentation/creating-setup-package-autoit-application Some great features have been implemented within : Generate package (archive zip) and Windows setup. Support internationalization (i18n). Check if application is already install. Configure additional messages in the setup like: license agreement, prerequisites and history project. Add icons application into Windows start menu. Launch custom command after the end of the installation. Easy to customize and change graphic elements of the Windows installer (setup). A Windows batch is used to generate the Windows Setup (create output temp directory, compilation Au3, copy assets, and make setup with ISS script) Have Fun, ++ Earthshine 1 Link to comment Share on other sites More sharing options...
Earthshine Posted June 8, 2018 Share Posted June 8, 2018 nice! I want to play with it a while when I can. v20100v 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 8, 2018 Moderators Share Posted June 8, 2018 @v20100v please stop resurrecting old posts just to hock a product. v20100v 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
v20100v Posted June 12, 2018 Share Posted June 12, 2018 Ok i notice this @JLogan3o13, I thought it might interest someone in a future search. ++ Earthshine 1 Link to comment Share on other sites More sharing options...
benched42 Posted June 12, 2018 Share Posted June 12, 2018 I tend to use my own "installer" wizard. I use it for a lot of single-purpose scripts (like clearing out temp files) because users are so familiar with that kind of interface. Here's the template that I start with. Note: It uses the "ExtMsgBox.au3" UDF by Mebla23. One other thing. I tend to use variables for the sizing of the windows so that when I need to make the window a bit larger, I only have to change one variable and the rest are resized automatically. This is especially helpful because I don't have to go back and replace buttons or dividers positions. expandcollapse popup#NoTrayIcon #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=img\icon.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=y #AutoIt3Wrapper_UseX64=N #AutoIt3Wrapper_Res_Description=description #AutoIt3Wrapper_Res_Fileversion=2016.8.25.0 #AutoIt3Wrapper_Res_LegalCopyright=@ Something #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;================================================================================ ; AutoIt Script {filename}.au3 ; ; Script that ;================================================================================ #NoTrayIcon #include <GUIConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <StringSize.au3> #include <ExtMsgBox.au3> ;============================================================================== ; Globals $theVersion = "2015.12.21" $theFont = "Segoe UI" $theFontSize = 11 $theBkColor = "0xF8F8F8" $theButtonBarBkColor = BitXOR($theBkColor,"0x222222") $theSource = @TempDir & __RandomTempFolder() $thePrgName = "name" ; The form elements $theFormWidth = 520 $theFormHeight = 370 $theTextMargin = 10 $theButtonWidth = 90 $theButtonHeight = 25 $theButtonVMargin = 8 $theButtonBarHeight = $theButtonHeight + 2 * $theButtonVMargin $theButtonTop = $theFormHeight - $theButtonHeight - $theButtonVMargin $theBannerWidth = 120 $theBannerHeight = $theFormHeight - $theButtonBarHeight $theLeftMargin = $theBannerWidth + $theTextMargin $theTitleTop = 10 ; Title is 10 from top, height of 30 $theMessageTop = 50 ; Message area is 10 from bottom of Title $theMessageHeight = 100 ; Good first height $theMessageWidth = $theFormWidth - $theLeftMargin - $theTextMargin $theFirstLine = $theMessageTop + $theMessageHeight + 10 $theProgressLine = ($theFormHeight / 2) - 10 $theProgressWidth = $theFormWidth - ($theLeftMargin + (5 * $theTextMargin)) _ExtMsgBoxSet(-1,-1,$theBkColor,-1,$theFontSize,$theFont,$theFormWidth * 0.85,$theFormWidth) __Initialize() $frmMain = GUICreate($thePrgName,$theFormWidth,$theFormHeight) GUISetBkColor($theBkColor,$frmMain) GUISetFont($theFontSize,400,0,$theFont,$frmMain) ; Button bar GUICtrlCreateGraphic(0,$theFormHeight - $theButtonBarHeight,$theFormWidth,$theButtonBarHeight) GUICtrlSetBkColor(-1,$theButtonBarBkColor) GUICtrlSetState(-1,$GUI_DISABLE) GUICtrlCreatePic($theSource &"\reg.jpg",0,0,$theBannerWidth,$theBannerHeight) $lblTitle = GUICtrlCreateLabel("",$theLeftMargin,$theTitleTop,$theMessageWidth,30) GUICtrlSetFont(-1,$theFontSize * 1.6,800,2,$theFont) ; version $u = _StringSize("v"& $theVersion,$theFontSize * 0.9,400,0,$theFont) GUICtrlCreateLabel("v"& $theVersion,5,$theFormHeight - $u[3],$u[2],$u[3]) GUICtrlSetFont(-1,10,400,1,$theFont) GUICtrlSetColor(-1,BitXOR($theButtonBarBkColor,"0x444444")) GUICtrlSetBkColor(-1,$theButtonBarBkColor) $lblMessage = GUICtrlCreateLabel("",$theLeftMargin,$theMessageTop,$theMessageWidth,$theMessageHeight) ;GUICtrlSetBkColor(-1,0x008800) $prgStatus = GUICtrlCreateProgress($theLeftMargin + (2 * $theTextMargin),$theProgressLine,$theProgressWidth,20) GUICtrlSetState(-1,$GUI_HIDE) $btnCancel = GUICtrlCreateButton("Cancel",$theFormWidth - 100,$theButtonTop,$theButtonWidth,$theButtonHeight) $btnNext = GUICtrlCreateButton("Next",$theFormWidth - 200,$theButtonTop,$theButtonWidth,$theButtonHeight) $btnDone = GUICtrlCreateButton("Done",$theFormWidth - 200,$theButtonTop,$theButtonWidth,$theButtonHeight) GUICtrlSetState(-1,$GUI_HIDE) GUICtrlSetData($lblTitle,"Welcome") GUICtrlSetData($lblMessage,"Welcome to the Outlook 365 Dynamics Fix. This will reset the Outlook 365 view to show Microsoft Dynamics. NOTE: You must close Outlook first!"& @CRLF & @CRLF &"Click the Next button to begin.") GUISetState(@SW_SHOW,$frmMain) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE If _ExtMsgBox(32,"Yes|No",$thePrgName &" - Verify","Are you sure you want to exit?",0,$frmMain,0,False) = 1 Then ExitLoop EndIf Case $btnCancel If _ExtMsgBox(32,"Yes|No",$thePrgName &" - Verify","Are you sure you want to exit?",0,$frmMain,0,False) = 1 Then ExitLoop EndIf Case $btnNext Case $btnDone ExitLoop EndSwitch WEnd DirRemove($theSource,1) Exit ;============================================================================== ; Nothing beyond here except functions called above ;============================================================================== ;============================================================================== ; Function Name: __RandomTempFolder() ; ; Creates a random temp folder to use while this is running in order to store ; any files needed and included in the script run ;============================================================================== Func __RandomTempFolder() Local $f,$i,$c $f = "\~" For $i = 1 To 10 $c = Random(97,122,1) $f = $f & Chr($c) Next Return $f EndFunc ; ==> End of __RandomTempFolder ;============================================================================== ; Function Name: __Intialize() ; ; This initializes all graphics for GUI items ;============================================================================== Func __Initialize() Local $i,$j,$num,$type ; First check the temp folder existence If NOT FileExists($theSource) Then DirCreate($theSource) Endif FileInstall("C:\Program Files (x86)\AutoIt3\MyScripts\folder\img\jpg",$theSource &"\jpg",1) EndFunc ; ==> End of __Initialize() Earthshine 1 Who lied and told you life would EVER be fair? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 12, 2018 Moderators Share Posted June 12, 2018 benched42, Quote Mebla23 Having a dyslexic day? M23 benched42 and FrancescoDiMuro 2 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
benched42 Posted June 13, 2018 Share Posted June 13, 2018 Well, since I originally typed Mebla13, I guess so! Who lied and told you life would EVER be fair? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now