Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InstallShield confusion! 1

Status
Not open for further replies.

amwprogg

Programmer
Jul 8, 2005
52
GB
I have just developed an application and am using InstallShield to create a CD-ROM for distribution. I've never used this software before (I haven't used FoxPro for very long either) - I've put all the files I need in one source directory and the build runs ok but when I test the distribution it says "Install was interrupted during execution. Try again later." - am I missing something? I've tried a few combos of the setup but to no avail. Also the disk image folders seem to end up NOT in the target areas I specify.
Any help or advice would be appreciated.
AMW.
 
Thanks for the reply, but I dont think this applies to me cause Im using v5.0 limited edition. I've read the article and tried a few things but still no joy.
 
Having used InstallShield for only a few days, it seems unnecessarily complicated! Does anyone have any tips from using this software themselves?
 
Yes. Bite the bullet. The time spent in the initial setup of your install makes it a lot easier to do the next time you upgrade or start a new project.
It's a little overwhelming at first, but the more I use it the more I like it.
From my experience, it definitely makes for easier installs.

I can go through and make a new setup in about an hour now. It helps to have everything in one package rather than have an error come up after a customer has ran the install and gotten erros.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Hi Dave

Just picking up on the end of this thread and looking at your comment:
I can go through and make a new setup in about an hour now. It helps to have everything in one package rather than have an error come up after a customer has ran the install and gotten erros.
We switched from V6 to V9 and are looking for an easy guide to make a set up using the limited edition the same as amwprogg.

Is there some easy step by step document other than the Microsoft MSDN page or do you have one?

Many thanks

Lee

Visual FoxPro Versions: 6 & 9
Operating System: Windows XP
 
Dave, you said: I can go through and make a new setup in about an hour now..

May I suggest trying to automate the process (though VFP code) of copying files to the build folder, etc... that way it is much harder to forget pieces. We have moderately complicated application setups, and all it takes to produce a SETUP.EXE file is entering "DO RELEASE" at the command line. The installshield program is even automatically launched, then the "Build" button programatically pressed (this is ISExpress... it's through WinApi "magic"...)

So, with almost no developer intervention (not even to set the version number, which is automaticall pulled from the main .PRG file), the new release package is built in about 10 minutes.

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Lee,

I haven't seen the MSDN documentation. All I have done is just read the ISE documentation as each item is selected.
It is quite self exlanatory I thought. Just take the time to read what each item is and you will get a good idea.
But, I haven't used VFP 9 yet, or the version of ISE that comes with VFP 9. I'm not going to be much help on that.


Bill,

That's pretty much what I do now - automating the copying of required files to the build folder, but I still run ISE manually. Automating that would be a good idea too.


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Here is the code that works with ISE v4.0... something very similar should work for other ISE versions.
Code:
**********************************************************
* Author : William GC Steinford                          *
**********************************************************
PROCEDURE RunAndBuildISE
LPARAMETERS tcIseFile

lcISE_Prog = "c:\Program Files\InstallShield\Express\IsIDE.exe"


DECLARE INTEGER CreateProcess IN kernel32; 
    INTEGER  lpApplicationName, ;
    STRING  @ lpCommandLine, ; 
    INTEGER  lpProcessAttributes,; 
    INTEGER  lpThreadAttributes,; 
    INTEGER  bInheritHandles,; 
    INTEGER  dwCreationFlags,; 
    INTEGER  lpEnvironment,; 
    STRING   lpCurrentDirectory,; 
    STRING   lpStartupInfo,; 
    STRING @ lpProcessInformation 

DECLARE LONG    WaitForSingleObject in win32api  INTEGER hHandle, LONG dwMilliseconds
DECLARE INTEGER GetExitCodeProcess  in win32api  INTEGER hProcess, INTEGER @ nExitCode

#DEFINE SW_SHOW      5
#DEFINE STILL_ACTIVE 0x103

LOCAL lcStartInfo, lcProcessInfo, lcCmd, lhProcess, lnExitCode, ;
      llBuilt
lcStartInfo  = GetStartupInfo()
lcProcessInfo = repl( chr(0), 12 )

*!*	typedef struct _PROCESS_INFORMATION { HANDLE hProcess
*!*	                                      HANDLE hThread 
*!*	                                      DWORD dwProcessId 
*!*	                                      DWORD dwThreadId   } PROCESS_INFORMATION

* MSDN Notes: If both AppName and CmdLine are provided, then they are both treated as *lp
*             (ie: Pointer to Pointer to String, instead of just lp: Pointer to String)
*   When I specify both, it seems that appname works but commandline doesn't.
* MSDN Notes also: If one is null (AppName or CmdLine) then both are expected to be
*             given in the other parameter.
*   So that's what we do.  And it works.

lcCmd = ["]+lcISE_Prog+[" "]+tcIseFile+["]
if 0=CreateProcess( 0, @lcCmd, 0,0,0,0,0,0, ;
                    lcStartInfo, @lcProcessInfo )
  *?"Could not create process"                    
  RETURN -1
endif
lhProcess  = Buf2dword( left( lcProcessInfo, 4 ) )
lnExitCode = STILL_ACTIVE
lnRes      = 1
llBuilt    = .f.
do while lnExitCode=STILL_ACTIVE or lnRes=0
  WaitForSingleObject(lhProcess, 500) && 1/2 second
  IF NOT llBuilt
    IF RelBuildISE( tcIseFile )
      llBuilt = .t.
    ENDIF
  ENDIF
  lnExitCode = -2
  lnRes = GetExitCodeProcess(lhProcess, @lnExitCode) && non-zero means success.
  if lnExitCode=STILL_ACTIVE 
    if InKey()=27 && Cancel waiting
      RETURN -3
    endif
  endif
enddo
RETURN iif(lnRes=0,-2,lnExitCode)
ENDPROC

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Hi Bill

I ran the code but nothing happened. One thing I did change was the line:
Code:
lcISE_Prog = "c:\Program Files\InstallShield\Express 5.0 Visual FoxPro\IsIDE.exe"
Any suggestions?

Lee

Visual FoxPro Versions: 6 & 9
Operating System: Windows XP
 
Oops, I forgot to include the function RelBuildISE... of course, it's rather likely that the exact window names have been changed from ISE v4 (mine) and v5, so you may have to use Spy++ (from Visual Studio) to examine the window names.

Code:
**************************************
FUNCTION RelBuildISE( tcIseFile )
LOCAL lcIseFile, lnISE, lnMenuArea, lnToolbar
  lcIseFile = JUSTSTEM(tcIseFile)
  
  *#define WM_LBUTTONDOWN                  0x0201
  *#define WM_LBUTTONUP                    0x0202
  DECLARE INTEGER FindWindow in win32api as apiFindWindow ;
      INTEGER nClass, STRING cName
  DECLARE INTEGER FindWindowEx IN WIN32API as apiFindWindowEx ;
      INTEGER hwndParent, ;
      integer hwndChildAfter, ;
      string @ lpszClass, ;
      string @ lpszWindow
  Declare INTEGER SendMessage in user32 as apiSendMessage ;
      INTEGER hWnd, ;
      INTEGER nMsg, ;
      INTEGER nParam1, ;
      INTEGER nParam2

  lnISE      = apifindwindow(0,lcIseFile+' - InstallShield Express')
  IF lnIse>0
    lnMenuArea = -1 
    lnToolbar  = 0
    && sort through all the AfxControlBar42 windows to find the toolbar window
    DO WHILE lnMenuArea<>0 AND lnToolbar=0
      lnMenuArea = IIF(lnMenuArea<0,0,lnMenuArea)
      lnMenuArea = apiFindWindowEx(lnISE,lnMenuArea,'AfxControlBar42',0)
      lnToolbar  = apiFindWindowEx(lnMenuArea,0,'Afx:400000:8:10011:10:0','Standard')
    ENDDO
    addLog( 'hndISE='+TRANSFORM(lnIse)+', hndMenu='+TRANSFORM(lnMenuArea)+', hndTbr='+TRANSFORM(lnToolbar) )
    IF lnToolbar>0
      apiSendMessage( lnToolbar, 0x0201, 0x01, 0x000B0115 )
      apiSendMessage( lnToolbar, 0x0202, 0x00, 0x000B0115 )
      RETURN .T.
    ENDIF
  ENDIF
  RETURN .F.
ENDFUNC


- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Hi Bill

I ran the whole thing:
Code:
**********************************************************
* Author : William GC Steinford                          *
**********************************************************
PROCEDURE RunAndBuildISE
LPARAMETERS tcIseFile

lcISE_Prog = "c:\Program Files\InstallShield\Express 5.0 Visual FoxPro\IsIDE.exe"


DECLARE INTEGER CreateProcess IN kernel32; 
    INTEGER  lpApplicationName, ;
    STRING  @ lpCommandLine, ; 
    INTEGER  lpProcessAttributes,; 
    INTEGER  lpThreadAttributes,; 
    INTEGER  bInheritHandles,; 
    INTEGER  dwCreationFlags,; 
    INTEGER  lpEnvironment,; 
    STRING   lpCurrentDirectory,; 
    STRING   lpStartupInfo,; 
    STRING @ lpProcessInformation 

DECLARE LONG    WaitForSingleObject in win32api  INTEGER hHandle, LONG dwMilliseconds
DECLARE INTEGER GetExitCodeProcess  in win32api  INTEGER hProcess, INTEGER @ nExitCode

#DEFINE SW_SHOW      5
#DEFINE STILL_ACTIVE 0x103

LOCAL lcStartInfo, lcProcessInfo, lcCmd, lhProcess, lnExitCode, ;
      llBuilt
lcStartInfo  = GetStartupInfo()
lcProcessInfo = repl( chr(0), 12 )

*!*    typedef struct _PROCESS_INFORMATION { HANDLE hProcess
*!*                                          HANDLE hThread 
*!*                                          DWORD dwProcessId 
*!*                                          DWORD dwThreadId   } PROCESS_INFORMATION

* MSDN Notes: If both AppName and CmdLine are provided, then they are both treated as *lp
*             (ie: Pointer to Pointer to String, instead of just lp: Pointer to String)
*   When I specify both, it seems that appname works but commandline doesn't.
* MSDN Notes also: If one is null (AppName or CmdLine) then both are expected to be
*             given in the other parameter.
*   So that's what we do.  And it works.

lcCmd = ["]+lcISE_Prog+[" "]+tcIseFile+["]
if 0=CreateProcess( 0, @lcCmd, 0,0,0,0,0,0, ;
                    lcStartInfo, @lcProcessInfo )
  *?"Could not create process"                    
  RETURN -1
endif
lhProcess  = Buf2dword( left( lcProcessInfo, 4 ) )
lnExitCode = STILL_ACTIVE
lnRes      = 1
llBuilt    = .f.
do while lnExitCode=STILL_ACTIVE or lnRes=0
  WaitForSingleObject(lhProcess, 500) && 1/2 second
  IF NOT llBuilt
    IF RelBuildISE( tcIseFile )
      llBuilt = .t.
    ENDIF
  ENDIF
  lnExitCode = -2
  lnRes = GetExitCodeProcess(lhProcess, @lnExitCode) && non-zero means success.
  if lnExitCode=STILL_ACTIVE 
    if InKey()=27 && Cancel waiting
      RETURN -3
    endif
  endif
enddo
RETURN iif(lnRes=0,-2,lnExitCode)
ENDPROC



**************************************
FUNCTION RelBuildISE( tcIseFile )
LOCAL lcIseFile, lnISE, lnMenuArea, lnToolbar
  lcIseFile = JUSTSTEM(tcIseFile)
  
  *#define WM_LBUTTONDOWN                  0x0201
  *#define WM_LBUTTONUP                    0x0202
  DECLARE INTEGER FindWindow in win32api as apiFindWindow ;
      INTEGER nClass, STRING cName
  DECLARE INTEGER FindWindowEx IN WIN32API as apiFindWindowEx ;
      INTEGER hwndParent, ;
      integer hwndChildAfter, ;
      string @ lpszClass, ;
      string @ lpszWindow
  Declare INTEGER SendMessage in user32 as apiSendMessage ;
      INTEGER hWnd, ;
      INTEGER nMsg, ;
      INTEGER nParam1, ;
      INTEGER nParam2

  lnISE      = apifindwindow(0,lcIseFile+' - InstallShield Express')
  IF lnIse>0
    lnMenuArea = -1 
    lnToolbar  = 0
    && sort through all the AfxControlBar42 windows to find the toolbar window
    DO WHILE lnMenuArea<>0 AND lnToolbar=0
      lnMenuArea = IIF(lnMenuArea<0,0,lnMenuArea)
      lnMenuArea = apiFindWindowEx(lnISE,lnMenuArea,'AfxControlBar42',0)
      lnToolbar  = apiFindWindowEx(lnMenuArea,0,'Afx:400000:8:10011:10:0','Standard')
    ENDDO
    addLog( 'hndISE='+TRANSFORM(lnIse)+', hndMenu='+TRANSFORM(lnMenuArea)+', hndTbr='+TRANSFORM(lnToolbar) )
    IF lnToolbar>0
      apiSendMessage( lnToolbar, 0x0201, 0x01, 0x000B0115 )
      apiSendMessage( lnToolbar, 0x0202, 0x00, 0x000B0115 )
      RETURN .T.
    ENDIF
  ENDIF
  RETURN .F.
ENDFUNC
Unfortunately nothing happened.

Am I missing something?

Lee

Visual FoxPro Versions: 6 & 9
Operating System: Windows XP
 
As I said, I developed this around ISE v4... they must have changed some window names or the window structure in ISE v5, (which I don't have installed). Someone experienced with Spy++ who also has ISE v5 should be able to easily make the adjustments.... Once it's working, I personally find this a great advantage in generating a build.

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top