viewpoint-particle

Author Topic: Simple Application Installer Question  (Read 436 times)

winuser2003

  • Newbie
  • *
  • Posts: 34
Simple Application Installer Question
« on: May 12, 2017, 04:34:56 am »
Thank you for taking the time to look over my project....

What I am trying to accomplish here is the ability to create some kind of application installer for my enviroment. Rather than going to a share folder and browsing through folder after folder and doing searches, I wanted to make it a bit simpler by creating an application that will just present the applications available to install and by a click of a button it installs. I have started my code below, however with experience being a winbatch coder I like the feedback that is provided or ideas that maybe a bit better to approach this project. I have provided my code below.

Code: [Select]
filename = "apps.txt"
ibVariable3 = FileGet(filename, "")
ibVariable3 = StrReplace( ibVariable3, @CRLF, @TAB )

IntControl(33,0,0,0,0)
IntControl (49, 1, 0, 0, 0)
IntControl(75, 1, 0, 0, 0)
IntControl(54,"",1,0,0)
IntControl(62,-2,0,0,0)
IntControl(49,1,0,0,0)
MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=`Application Installer v1.0`
MyDialogX=348
MyDialogY=087
MyDialogWidth=220
MyDialogHeight=300
MyDialogNumControls=008
MyDialogProcedure=`DEFAULT`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`007,281,036,012,PUSHBUTTON,"PushButton_OK",DEFAULT,"Install",1,10,@csDefButton,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`171,281,036,012,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Exit",0,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog003=`047,281,036,012,PUSHBUTTON,"PushButton_3",DEFAULT,"Update",2,50,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog004=`089,281,036,012,PUSHBUTTON,"PushButton_4",DEFAULT,"Remove",3,60,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog005=`131,281,036,012,PUSHBUTTON,"PushButton_5",DEFAULT,"Review",4,70,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog006=`007,019,198,258,ITEMBOX,"ItemBox_3",ibVariable3,DEFAULT,DEFAULT,30,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog007=`071,005,054,008,STATICTEXT,"StaticText_2",DEFAULT,"Search Applications:",DEFAULT,40,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog008=`125,003,080,012,EDITBOX,"EditBox_1",ebVariable1,DEFAULT,DEFAULT,80,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog")

If I go this route... I would need to try and tie applications to there respective install files. Again, the feedback or ideas is welcomed.

td

  • Tech Support
  • *****
  • Posts: 2139
    • WinBatch
Re: Simple Application Installer Question
« Reply #1 on: May 12, 2017, 06:47:30 am »
There is not much there to comment other than you might want to reread the Consolidated WIL Help file documentation on IntControl 75.  You call the IntControl but don't use its returned coordinates for anything.

Perhaps someone else has a suggestion about  the general approach to your project.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


winuser2003

  • Newbie
  • *
  • Posts: 34
Re: Simple Application Installer Question
« Reply #2 on: May 12, 2017, 07:02:04 am »
Thats only window positioning isn't it?

td

  • Tech Support
  • *****
  • Posts: 2139
    • WinBatch
Re: Simple Application Installer Question
« Reply #3 on: May 12, 2017, 11:13:40 am »
Yes, it is "only" window positioning but there is no point to calling the IntControl, if you are not using the output.   

There are numerous WIL Dialog example in the Tech Database that provide a UI for different tasks.  You might find a few examples that will give you some ideas  or point you in the correct direction.  That may be more product that asking a generalized question on this forum.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


winuser2003

  • Newbie
  • *
  • Posts: 34
Re: Simple Application Installer Question
« Reply #4 on: May 12, 2017, 12:06:32 pm »
This is another way I thought of doing it, but not sure how I would call the variable...

Code: [Select]
APPS = strcat("7_ZIP_9_20",@TAB,"7_ZIP_9_20_X64'a",@TAB,"ACDSYSTEMS_ACDSEE_STANDARD_6_0",@TAB,"ACTIVEPLANT_ACTIVEX_6_0_0_0105",@TAB,"ACTIVEPLANT_INSIGHT_FOR_EXCEL_1_0",@TAB,"ACTIVEPLANT_INSIGHT_FOR_EXCEL_7_2_0_1223",@TAB,"ACTIVPLANT_VPWEB_7_5_1")
apps = strcat(apps,@TAB,"ADDRESS REGISTRATION SYSTEM 4.0.6",@TAB,"ADOBE_ACROBAT_X",@TAB,"ADOBE_ACROBAT_XI",@TAB,"ADOBE_CAPTIVATE_2_0",@TAB,"ADOBE_FLASH_PLAYER_11_ACTIVEX_11_1_102_55",@TAB,"ADOBE_FLASH_PLAYER_14_0_0_145",@TAB,"ADOBE_FLASH_PLAYER_15_0_0_89")
apps = strcat(apps,@TAB,"ADOBE_FLASH_PLAYER_ACTIVEX_11_7_700_169",@TAB,"ADOBE_ILLUSTRATOR_8_0_1",@TAB,"ADOBE_OUTPUT_DESIGNER_5_5_1",@TAB,"ADOBE_PHOTOSHOP_CS",@TAB,"ADOBE_PHOTOSHOP_ELEMENTS_9_0",@TAB,"ADOBE_READER_10_1_0")
apps = strcat(apps,@TAB,"ADOBE_READER_11_0_0_2",@TAB,"ADOBE_SHOCKWAVE_PLAYER_11_6_1_629",@TAB,"ADOBE_SHOCKWAVE_PLAYER_12_0_2_122",@TAB,"ADOBE_SVG_VIEWER_3_0",@TAB,"ALEXSEM_TEST",@TAB,"APPLE_QUICKTIMEPLAYER_7_7_1")
apps = strcat(apps,@TAB,"ATTACHMATE_REFLECTION_X",@TAB,"AUTOCAD_2010_POSTREQS_1_0_32",@TAB,"AUTOCAD_PREREQS_1_0_32_A",@TAB,"AUTODESK_2012_DOTNET_FRAMEWORK",@TAB,"AUTODESK_AUTOCAD_2012_32",@TAB,"AUTODESK_AUTOCAD_2012_64",@TAB,"AUTODESK_AUTOCAD_2012_PREREQS_32")
apps = strcat(apps,@TAB,"AUTODESK_AUTOCAD_2015_32",@TAB,"AUTODESK_AUTOCAD_2015_64",@TAB,"AUTODESK_AUTOCAD_ELECTRICAL_2010_32",@TAB,"AUTODESK_AUTOCAD_ELECTRICAL_2015_32",@TAB,"AUTODESK_AUTOCAD_ELECTRICAL_2015_64",@TAB,"AUTODESK_AUTOCAD_INVENTOR_PRO_2015_32",@TAB,"AUTODESK_AUTOCAD_INVENTOR_PRO_2015_64")
apps = strcat(apps,@TAB,"AUTODESK_AUTOCAD_MECHANICAL_2010_32",@TAB,"AUTODESK_AUTOCAD_MECHANICAL_2012_32",@TAB,"AUTODESK_AUTOCAD_MECHANICAL_2012_64",@TAB,"AUTODESK_AUTOCAD_MECHANICAL_2012_PREREQS_32",@TAB,"AUTODESK_AUTOCAD_MECHANICAL_2012_PREREQS_64",@TAB,"AUTODESK_AUTOCAD_MECHANICAL_2015_32",@TAB,"AUTODESK_AUTOCAD_MECHANICAL_2015_64")

;filename = "apps.txt"
;ibVariable3 = FileGet(filename, "")
;ibVariable3 = StrReplace( ibVariable3, @CRLF, @TAB )


IntControl(33,0,0,0,0)
IntControl (49, 1, 0, 0, 0)
IntControl(54,"",1,0,0)
IntControl(62,-2,0,0,0)
IntControl(49,1,0,0,0)
MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=`Application Installer v1.0`
MyDialogX=348
MyDialogY=087
MyDialogWidth=220
MyDialogHeight=300
MyDialogNumControls=008
MyDialogProcedure=`DEFAULT`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`007,281,036,012,PUSHBUTTON,"PushButton_OK",DEFAULT,"Install",1,10,@csDefButton,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`171,281,036,012,PUSHBUTTON,"PushButton_Cancel",DEFAULT,"Exit",0,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog003=`047,281,036,012,PUSHBUTTON,"PushButton_3",DEFAULT,"Update",2,50,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog004=`089,281,036,012,PUSHBUTTON,"PushButton_4",DEFAULT,"Remove",3,60,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog005=`131,281,036,012,PUSHBUTTON,"PushButton_5",DEFAULT,"Review",4,70,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog006=`007,019,198,258,ITEMBOX,"ItemBox_3",apps,DEFAULT,DEFAULT,30,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog007=`071,005,054,008,STATICTEXT,"StaticText_2",DEFAULT,"Search Applications:",DEFAULT,40,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog008=`125,003,080,012,EDITBOX,"EditBox_1",ebVariable1,DEFAULT,DEFAULT,80,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog")

Thoughts?

winuser2003

  • Newbie
  • *
  • Posts: 34
Re: Simple Application Installer Question
« Reply #5 on: May 15, 2017, 11:54:40 am »
I been looking over alot of data and information. I am trying to find something in the relation to just highlighting an item and clicking a button to take action on that particular highlighted item. Please do you have any suggestions? I am sure there is something out there where if you highlight an option you can take action.

td

  • Tech Support
  • *****
  • Posts: 2139
    • WinBatch
Re: Simple Application Installer Question
« Reply #6 on: May 15, 2017, 01:41:21 pm »
Not sure what data and information you have been looking at but there is a plethora of WIL Dialog examples in the Tech Database and the Consolidated WIL Help file.  Here is a link to the WIL Dialog tutoral:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+Tutorials+All~about~Dynamic~Dialogs~6.2.txt

You should also reviewthe the ITEMBOX and REPORTVIEW controls' documentation in the Consolidated WIL Help file.   The dialog functions "DialogProcOptions", "DialogControlGet", "DialogControlSet", and "DialogControlState" documentation should prove useful, as well. 
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates