Jump to content

Has someone already done this?


Bert
 Share

Recommended Posts

You have a baseline image loaded on a PC. Now you need to load extra applications for your user. Using the Autoit scripts you wrote for all your apps, you can quickly install them. Just one thing. You need to run each script, wait for it to finish, then run the next one, and so on. Has anyone made a GUI that can make it so you pick the scripts you want ran, click run, and everything gets installed without you having to babysit the thing?

I know you could use a batch file, but I would like to use a GUI for the following reasons:

1. Its faster

2. You make a typo in the batch file, and it blows up. Now your babysitting again.

3. If you are doing a group of PCs, and each one is a little different, the batch file route becomes a pain. A GUI makes it easy.

Has anyone designed something like this?

Link to comment
Share on other sites

  • Moderators

RunWait("1st.exe")

RunWait("2nd.exe") ?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Here is a example of what I'm looking for. The dropdown choices used are only for this concept. In a working version, the items listed would be pulled from the folder names. This is only a concept script, and it doesn't have all the bells and whistles working. I'm looking for feedback, and ideas to make it better. Run the code to see how it looks, and let me know what you think on the concept.

CODE
#comments-start

Logic script for loading program

Name: ScriptLoader 1.0

Concept: Once a script is built for a program, a front end loader will be used to aid in the loading of software.

The program will read the folders, and then present a list in a GUI along with listboxes so one can

select what one wants to install. Once the selections are made, you click run and all the programs will

install. A RunAs function will be built in, as well as log files, and profiles for repetative use.

Protocals:

; 1. Each script will be designed with the following rules.

; a. The folder hierachy will be laid out in the following manner for "Install Apps":

; "Install_apps" - all programs will be kept here that do not need unique CD keys.

; "%program name%" - This folder name is what will show up in the listboxs

; "appinstall" - This will have the script (exe) for the program, and the application.

; b. The folder hierachy will be laid out in the following manner for "Apps needing CD key":

; "Key_apps" - all programs will be kept here that do need unique CD keys.

; "%program name%" - This folder name is what will show up in the listboxs

; "appinstall" - This will have the script (exe) for the program, and the application.

; C. The folder hierachy will be laid out in the following manner for "Tools":

; "Tools" - all programs will be kept here that will not be permanently installed on the PC.

; "%program name%" - This folder name is what will show up in the listboxs

; "appinstall" - This will have the script (exe) for the program, and the application.

;

; 2. A INI file will have entries for what will show up in the GUI when a profile is loaded. All

; profiles will be saved in a profiles folder.

3. Log files will be used to document CD keys, and what was loaded on the PC. The log file will also

capture the PC's computer name and SN#

4. When using RunAs, the information will be cached for each install after the run button is pushed.

5. A confirmation window will be displayed with all the selections along with any CD keys.

If any errors are noticed by the user, they can click cancel to fix the error.

Problems or decisions to make:

1. Will the program slow down due to a large list?

Possible solution: The apps will be 2 levels down so large file reads can be avoided. Not sure this will work

#comments-end

#include <GUIConstants.au3>

GUICreate("ScriptLoader 1.0 concept GUI beta", 500, 480, -1,-1, 0x00800000)

$button1 = GUICtrlCreateButton("Run", 30, 350, 50, 20)

$button2 = GUICtrlCreateButton("Exit", 30, 380, 50, 20)

$runas = GUICtrlCreateCheckbox("Use RunAs", 30, 410)

GUICtrlSetstate($runas,$GUI_UNCHECKED)

$filemenu = GUICtrlCreatemenu("&File")

$fileitem1 = GUICtrlCreateMenuitem ("&Open Profile",$filemenu)

$fileitem2 = GUICtrlCreateMenuitem ("&Save Profile",$filemenu)

$logmenu = GUICtrlCreatemenu("&Log file")

$logitem1 = GUICtrlCreateMenuitem ("&View Log file",$logmenu)

$helpmenu = GUICtrlCreateMenu ("&Help")

$helpitem1 = GUICtrlCreateMenuitem ("H&ow to use ScriptLoader",$helpmenu)

GUICtrlCreateTab(0,1,497,340)

GUICtrlCreateTabItem("Install Apps")

GUICtrlCreateLabel("1", 15, 42)

GUICtrlCreateLabel("2", 15, 72)

GUICtrlCreateLabel("3", 15, 102)

GUICtrlCreateLabel("4", 15, 132)

GUICtrlCreateLabel("5", 15, 162)

GUICtrlCreateLabel("6", 15, 192)

GUICtrlCreateLabel("7", 15, 222)

GUICtrlCreateLabel("8", 15, 252)

GUICtrlCreateLabel("9", 15, 282)

GUICtrlCreateLabel("10", 15, 312)

GUICtrlCreateLabel("11", 255, 42)

GUICtrlCreateLabel("12", 255, 72)

GUICtrlCreateLabel("13", 255, 102)

GUICtrlCreateLabel("14", 255, 132)

GUICtrlCreateLabel("15", 255, 162)

GUICtrlCreateLabel("16", 255, 192)

GUICtrlCreateLabel("17", 255, 222)

GUICtrlCreateLabel("18", 255, 252)

GUICtrlCreateLabel("19", 255, 282)

GUICtrlCreateLabel("20", 255, 312)

;examples for dropdowns

$apps1=GUICtrlCreateEdit(""& @CRLF,30, 40, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps1, "AOL 9.0"& @CRLF &"AdAware 1.06"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps2=GUICtrlCreateEdit(""& @CRLF,30, 70, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps2, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps3=GUICtrlCreateEdit(""& @CRLF,30, 100, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps3, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps4=GUICtrlCreateEdit(""& @CRLF,30, 130, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps4, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps5=GUICtrlCreateEdit(""& @CRLF,30, 160, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps5, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps6=GUICtrlCreateEdit(""& @CRLF,30, 190, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps6, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps7=GUICtrlCreateEdit(""& @CRLF,30, 220, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps7, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps8=GUICtrlCreateEdit(""& @CRLF,30, 250, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps8, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps9=GUICtrlCreateEdit(""& @CRLF,30, 280, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps9, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps10=GUICtrlCreateEdit(""& @CRLF,30, 310, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps10, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

;second collumn

$apps1B=GUICtrlCreateEdit(""& @CRLF,270, 40, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps1B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps2B=GUICtrlCreateEdit(""& @CRLF,270, 70, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps2B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps3B=GUICtrlCreateEdit(""& @CRLF,270, 100, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps3B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps4B=GUICtrlCreateEdit(""& @CRLF,270, 130, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps4B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps5B=GUICtrlCreateEdit(""& @CRLF,270, 160, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps5B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps6B=GUICtrlCreateEdit(""& @CRLF,270, 190, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps6B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps7B=GUICtrlCreateEdit(""& @CRLF,270, 220, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps7B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps8B=GUICtrlCreateEdit(""& @CRLF,270, 250, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps8B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps9B=GUICtrlCreateEdit(""& @CRLF,270, 280, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps9B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

$apps10B=GUICtrlCreateEdit(""& @CRLF,270, 310, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($apps10B, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _

&"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _

&"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _

&"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _

&"WealthManagement 5.0",1)

;second tab=================================================================================================

=============

GUICtrlCreateTabItem("Apps needing CD key")

GUICtrlCreateLabel("1", 15, 42)

GUICtrlCreateLabel("2", 15, 72)

GUICtrlCreateLabel("3", 15, 102)

GUICtrlCreateLabel("4", 15, 132)

GUICtrlCreateLabel("5", 15, 162)

GUICtrlCreateLabel("6", 15, 192)

GUICtrlCreateLabel("7", 15, 222)

GUICtrlCreateLabel("8", 15, 252)

GUICtrlCreateLabel("9", 15, 282)

GUICtrlCreateLabel("10", 15, 312)

GUICtrlCreateLabel("Key", 255, 42)

GUICtrlCreateLabel("Key", 255, 72)

GUICtrlCreateLabel("Key", 255, 102)

GUICtrlCreateLabel("Key", 255, 132)

GUICtrlCreateLabel("Key", 255, 162)

GUICtrlCreateLabel("Key", 255, 192)

GUICtrlCreateLabel("Key", 255, 222)

GUICtrlCreateLabel("Key", 255, 252)

GUICtrlCreateLabel("Key", 255, 282)

GUICtrlCreateLabel("Key", 255, 312)

$2apps1=GUICtrlCreateEdit(""& @CRLF,30, 40, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps1, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps2=GUICtrlCreateEdit(""& @CRLF,30, 70, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps2, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps3=GUICtrlCreateEdit(""& @CRLF,30, 100, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps3, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps4=GUICtrlCreateEdit(""& @CRLF,30, 130, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps4, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps5=GUICtrlCreateEdit(""& @CRLF,30, 160, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps5, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps6=GUICtrlCreateEdit(""& @CRLF,30, 190, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps6, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps7=GUICtrlCreateEdit(""& @CRLF,30, 220, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps7, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps8=GUICtrlCreateEdit(""& @CRLF,30, 250, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps8, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps9=GUICtrlCreateEdit(""& @CRLF,30, 280, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps9, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2apps10=GUICtrlCreateEdit(""& @CRLF,30, 310, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($2apps10, "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)

$2appsB =GUICtrlCreateEdit("", 280, 40, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB1=GUICtrlCreateEdit("", 280, 70, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB2=GUICtrlCreateEdit("", 280, 100, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB3=GUICtrlCreateEdit("", 280, 130, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB4=GUICtrlCreateEdit("", 280, 160, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB5=GUICtrlCreateEdit("", 280, 190, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB6=GUICtrlCreateEdit("", 280, 220, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB7=GUICtrlCreateEdit("", 280, 250, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB8=GUICtrlCreateEdit("", 280, 280, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

$2appsB9=GUICtrlCreateEdit("", 280, 310, 200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)

;third tab=================================================================================================

=========

GUICtrlCreateTabItem("tools")

$3myedit=GUICtrlCreateEdit(""& @CRLF,30, 40, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit1=GUICtrlCreateEdit(""& @CRLF,30, 70, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit1, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit2=GUICtrlCreateEdit(""& @CRLF,30, 100, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit2, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit3=GUICtrlCreateEdit(""& @CRLF,30, 130, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit3, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit4=GUICtrlCreateEdit(""& @CRLF,30, 160, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit4, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit5=GUICtrlCreateEdit(""& @CRLF,30, 190, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit5, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit6=GUICtrlCreateEdit(""& @CRLF,30, 220, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit6, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit7=GUICtrlCreateEdit(""& @CRLF,30, 250, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit7, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit8=GUICtrlCreateEdit(""& @CRLF,30, 280, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit8, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

$3myedit9=GUICtrlCreateEdit(""& @CRLF,30, 310, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)

GUICtrlSetData ($3myedit9, "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _

&"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)

GuiSetState()

While 1

$msg = GuiGetMsg ()

Select

case $msg = $button1

GUICtrlRead($button1)

$message = MsgBox(1, "Confirm your selections", "Please review your choices. If everything is correct, click yes to proceed."& @CRLF _

&""& @CRLF &"Child GUI needs to be made to capture the choices, and to post them for review")

if $message = 1 then exit

if $message = 2 then ContinueLoop

case $msg = $button2

Exit

Case $msg = $runas

$check = GUICtrlRead($runas)

if $check = $GUI_CHECKED Then

MsgBox(0, "runas", "RunAs box checked"& @CRLF & ""& @CRLF &"Child window needed for logon credentials"& @CRLF &"and run button")

EndIf

EndSelect

WEnd

If someone wants to assist me in building this, that would be great.

Edited by vollyman
Link to comment
Share on other sites

  • Moderators

I know this doesn't help you much on your current script, (It does look interesting), I just saw all the massive amounts of repeat data, and thought you might like to see how to save yourself a bit of time for future GUI's you make:

#include <GUIConstants.au3>
GUICreate("ScriptLoader 1.0 concept GUI beta", 500, 510, -1,-1, 0x00800000)
$button1 = GUICtrlCreateButton("Run", 30, 360, 50, 20)
$button2 = GUICtrlCreateButton("Exit", 30, 390, 50, 20)
$runas = GUICtrlCreateCheckbox("Use RunAs", 30, 420)
GUICtrlSetstate($runas,$GUI_UNCHECKED)

$filemenu = GUICtrlCreatemenu("&File")
$fileitem1 = GUICtrlCreateMenuitem ("&Open Profile",$filemenu)
$fileitem2 = GUICtrlCreateMenuitem ("&Save Profile",$filemenu)
$logmenu = GUICtrlCreatemenu("&Log file")
$logitem1 = GUICtrlCreateMenuitem ("&View Log file",$logmenu)
$helpmenu = GUICtrlCreateMenu ("&Help")
$helpitem1 = GUICtrlCreateMenuitem ("H&ow to use ScriptLoader",$helpmenu)

GUICtrlCreateTab(0,1,497,350)
GUICtrlCreateTabItem("Install Apps")
For $x = 1 To 10
GUICtrlCreateLabel($x , 15, ($x * 30) + 12)
Next


For $x = 11 To 20
GUICtrlCreateLabel($x, 255, ($x - 10) * 30 + 12)
Next
;examples for dropdowns

Dim $apps[11]
For $j = 1 To 10
$apps[$j] = GUICtrlCreateEdit(""& @CRLF,30, ($j * 30) + 10, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)
GUICtrlSetData ($apps[$j], "AOL 9.0"& @CRLF &"AdAware 1.06"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _
                &"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _           
                &"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _
                &"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _
                &"WealthManagement 5.0",1)
Next
Dim $appsB[11]
For $j = 1 To 10
$appsB[$j] = GUICtrlCreateEdit(""& @CRLF,270, ($j * 30) + 10, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)
GUICtrlSetData ($appsB[$j], "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"ACT!2005"& @CRLF &"CAD"& @CRLF _
                &"FoxPro"& @CRLF &"Java1.5"& @CRLF &"MS Frontpage 2003"& @CRLF &"MS Office XP"& @CRLF _           
                &"MS Office 2003"& @CRLF &"MS Project 2003"& @CRLF &"MS Visio 2003"& @CRLF &"Roxio 7.0"& @CRLF _
                &"SpyBot SD"& @CRLF &"SpywareBlaster"& @CRLF &"Talent Manager 4.0"& @CRLF &"Vector 12"& @CRLF _
                &"WealthManagement 5.0",1)   
Next
;second tab=================================================================================================


           
GUICtrlCreateTabItem("Apps needing CD key")
For $i = 1 To 10
GUICtrlCreateLabel($i, 15, (30 * $i) + 12)
Next

For $i = 1 To 10
GUICtrlCreateLabel("Key", 255, (30 * $i) + 12)
Next

Dim $2apps[11]
For $i = 1 To 10
$2apps[$i] = GUICtrlCreateEdit(""& @CRLF,30, 30 * $i + 10, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)
GUICtrlSetData ($2apps[$i], "Adobe 7.0 Full"& @CRLF &"Adobe Photoshop"& @CRLF &"Spectra"& @CRLF &"WinZip 9.0", 1)
Next

Dim $2appsB[11]
For $i = 1 To 10
$2appsB =GUICtrlCreateEdit("", 280, 30 * $i + 10,  200, 20, $ES_UPPERCASE+$LBS_DISABLENOSCROLL)
Next
;third tab=================================================================================================



GUICtrlCreateTabItem("tools")
Dim $3myedit[11]
For $i = 1 To 10
    $3myedit[$i] = GUICtrlCreateEdit(""& @CRLF,30, 30 * $i + 10, 200, 20, $ES_AUTOVSCROLL+$WS_VSCROLL+$ES_READONLY)
    GUICtrlSetData ($3myedit[$i], "AdAware 1.06"& @CRLF &"FireFox Stand Alone"& @CRLF &"HijackThis"& @CRLF _
    &"JunkFile cleaner"& @CRLF &"SpyBot SD"& @CRLF &"Stinger"& @CRLF &"WinDoctor", 1)
Next


GuiSetState()
While 1
    $msg = GuiGetMsg ()
    Select
    case $msg = $button1
        GUICtrlRead($button1)
        $message = MsgBox(1, "Confirm your selections", "Please review your choices. If everything is correct, click yes to proceed."& @CRLF _
               &""& @CRLF &"Child GUI needs to be made to capture the choices, and to post them for review")
               if $message = 1 then exit
               if $message = 2 then ContinueLoop
        
    case $msg = $button2
         Exit   
    Case $msg = $runas
           $check = GUICtrlRead($runas)
         if $check = $GUI_CHECKED Then
         MsgBox(0, "runas", "RunAs box checked"& @CRLF & ""& @CRLF &"Child window needed for logon credentials"& @CRLF &"and run button")  
        EndIf            
    EndSelect   
WEnd

Without your #cs/#ce and without including the guiconstants.au3, your script was 269 lines... now the same one is 97 and easier to modify if you need to make a change... just thought you'd be interested for future use :P

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Thanks! I'm still wondering if anyone has done something like this. I would think someone has already. I got the idea from someone at work who did something like this with a JS script. The problem with theirs was it would list all the applications, but you could only run one at a time. Also, it would blow up if you had too many. It couldn't show a scroll bar, and if you had too many apps, it would clock for 2 minutes trying to read all the apps to make the list.

Link to comment
Share on other sites

This is nice, and it is giving me some great ideas. I don't like messing with INI files when I have someone who can mess it up and they have to call me for support. Also, you have to update the INI when you add a application. This again can cause support issues. When I design it, I have to make it so a dumb person can use it without messing it up. I know that sounds silly, but you can't begin to imagine how many calls I get for other stuff I have designed, and the person won't read the help file.

Link to comment
Share on other sites

I don't like messing with INI files when I have someone who can mess it up and they have to call me for support

This is why I used FileInstall ( "source", "dest" [, flag] ) with flag 1 to every time they run my script will overwrite the ini files. It is easy for me to modify the ini file, tested and then send the user the new compiled script.
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

  • Moderators

This is why I used FileInstall ( "source", "dest" [, flag] ) with flag 1 to every time they run my script will overwrite the ini files. It is easy for me to modify the ini file, tested and then send the user the new compiled script.

So what do you do when you need to save settings... 2 ini's / another file / registry write? (definately not being a smart ass here, it's a serious question)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

So what do you do when you need to save settings... 2 ini's

If you download the script from post #6, you will noticed that the script had a folder called config where you modify the ini files to take care all the install. For those ini files I use fileinstall() then when you run the script and save the settings those settings get recorded into another ini file. Edited by Danny35d
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

  • Moderators

If you download the script from post #6, you will noticed that the script had a folder called config where you modify the ini files to take care all the install. For those ini files I use fileinstall() then when you run the script and save the settings those settings get recorded into another ini file.

Ok, that's what I thought :P...

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

I'm wondering if using a folder structure would be a better approach. Simply by dropping a folder in the correct spot would update the GUI, and it could be made so when the user needs a new app, make a exe file (using winzip). This way it would make the chance of DUE (Dumb User Error) less likely.

Link to comment
Share on other sites

I tried running your source code, and I get errors on line 8 as well as 334. I figured out what line 8 was, but I don't know what is causing 334.

C:\Documents and Settings\user\My Documents\autoit scripts\script loader\ktool\v1.1a.au3 (334) : ==> Unknown function name.: 
$tItem = GUIRead ( $ListAvailable )

I wanted to see if there was any changes from the source code and the EXE you have to see if I could fix the error, but you have it passowrd protected. Is there any difference between the 2?

Edited by vollyman
Link to comment
Share on other sites

You got a really nice idea there. I was working on something like that a while back actually, but not with AutoIt. I think the best i found was a customized version of XP install which had programs already installed in it.

Hm actually that leads to a question!, anyone know how ppl make customized win xp installs in the first place? i heard something about OEM...

"I'm paper, rock is fine, nerf scissors!!!"

Link to comment
Share on other sites

Can i just ask, how do you solve the serial issues? are those program installed last and asks for password, or is that information entered when you launch the applications?

Some programs asks for serials during install while some prefare to do that after install and of course the ones where you haveto type the serial once inside the program hehe :P

"I'm paper, rock is fine, nerf scissors!!!"

Link to comment
Share on other sites

If you look in the beginning of this thread, I posted a script that addresses that. I planned to have 2 types of scripts. Ones that need a Key, and ones that didn't. I would use a folder system to keep things separate. In Kennedy's script, he doesn't address that, but I really like how he has it setup. What I would add is something that would promp you for a key depending on the app. When you run Ktool, it would use the key you entered to install the app. I hope I'm explaining this right.

Edited by vollyman
Link to comment
Share on other sites

If you look in the beginning of this thread, I posted a script that addresses that. I planned to have 2 types of scripts. Ones that need a Key, and ones that didn't. I would use a folder system to keep things separate. In Kennedy's script, he doesn't address that, but I really like how he has it setup. What I would add is something that would promp you for a key depending on the app. When you run Ktool, it would use the key you entered to install the app. I hope I'm explaining this right.

Oh.. cool. Are you thinking of adding the key thru registry (if possible) or will the user be asked for the serial?

"I'm paper, rock is fine, nerf scissors!!!"

Link to comment
Share on other sites

The script for the installed program would request it, and then the GUI would insert it. To rewrite a install package is too much trouble, and something like InstallShield cost around 2 grand. It is easier to script it with Autoit and have your autoit script look for the key.

Link to comment
Share on other sites

  • Moderators

I tried running your source code, and I get errors on line 8 as well as 334. I figured out what line 8 was, but I don't know what is causing 334.

C:\Documents and Settings\user\My Documents\autoit scripts\script loader\ktool\v1.1a.au3 (334) : ==> Unknown function name.: 
$tItem = GUIRead ( $ListAvailable )

I wanted to see if there was any changes from the source code and the EXE you have to see if I could fix the error, but you have it passowrd protected. Is there any difference between the 2?

$tItem = GUIRead ( $ListAvailable )

Should be: $tItem = GUICtrlRead($ListAvailable)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...