Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[27] Package & Deployment Wizard

Last post 08-28-2007 7:55 AM by Suresh P. 24 replies.
Page 2 of 2 (25 items) < Previous 1 2
Sort Posts: Previous Next
  • 09-23-2005 6:00 PM In reply to

    • buffbuh
    • Not Ranked
    • Joined on 09-23-2005
    • New Member
    • Points 35
    I understand that this is not a complete solution, but I found you had no other replies.

    I have had problems doing this, but have found a nasty, unprofessional work-around.

    First - create the shortcut, save it in folder.

    Second - Normally, a shortcut has extension "*.lnk", right?  Well, you have to change the extension to say "*.txt", making sure the file is not really "*.txt.lnk".  This may be accomplished via a command window with the rename instruction.

    Third - When packaging, add this file to your install package.  On the screen where destination folder is designated, you need to enter "$(App.Path)\..\..\All Users\Desktop", going back however many folders from the designated App.Path.

    Fourth - This is the nasty part - after installing, the "txt" file will be copied to the desktop.  Now you simply have to rename it via windows to "*.lnk".  That will make it a shortcut and replenish the appropriate icon.

    This is the closest to "automatic" I have come up with using VB's Package and Deployment Wizard.  If anyone has found a better way to do it, please let us know!

    Buffbuh
    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 09-23-2005 6:10 PM In reply to

    • buffbuh
    • Not Ranked
    • Joined on 09-23-2005
    • New Member
    • Points 35
    I'm not sure I understand the question completely.  I have packaged various .exe's in one package with one main .vbp file.  I just added the other .exe's to the package as additional files.  The main .vbp actually calls the other .exe's when appropriate using the following code:

    Dim strMyShell As String
    strMyShell = registry("strPath") & "Other.exe"
    If FileExists(strMyShell) Then
       Call ExecCmd(strMyShell, 0)  ' Second byte parameter determines whether parent .exe waits or not for "Other.exe" to finish before continuing.
    Else
       Err = 5
       ErrorOut Err, "'" & strMyShell & "' does not exist.  Get a copy and put it in the right directory."
    End If

    Where:



      Private Type STARTUPINFO
         cb As Long
         lpReserved As String
         lpDesktop As String
         lpTitle As String
         dwX As Long
         dwY As Long
         dwXSize As Long
         dwYSize As Long
         dwXCountChars As Long
         dwYCountChars As Long
         dwFillAttribute As Long
         dwFlags As Long
         wShowWindow As Integer
         cbReserved2 As Integer
         lpReserved2 As Long
         hStdInput As Long
         hStdOutput As Long
         hStdError As Long
      End Type

      Private Type PROCESS_INFORMATION
         hProcess As Long
         hThread As Long
         dwProcessID As Long
         dwThreadID As Long
      End Type

      Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal _
         hHandle As Long, ByVal dwMilliseconds As Long) As Long

      Private Declare Function CreateProcessA Lib "kernel32" (ByVal _
         lpApplicationName As Long, ByVal lpCommandLine As String, ByVal _
         lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, _
         ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, _
         ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, _
         lpStartupInfo As STARTUPINFO, lpProcessInformation As _
         PROCESS_INFORMATION) As Long

      Private Declare Function CloseHandle Lib "kernel32" (ByVal _
         hObject As Long) As Long

      Private Const NORMAL_PRIORITY_CLASS = &H20&
      Private Const INFINITE = -1&
     
    Public Sub ExecCmd(cmdline$, bytWait As Byte)

       '   From VB article  Q129796
       
         Dim ret&
         Dim proc As PROCESS_INFORMATION
         Dim start As STARTUPINFO
         ' Initialize the STARTUPINFO structure:
         start.cb = Len(start)

         ' Start the shelled application:
         ret& = CreateProcessA(0&, cmdline$, 0&, 0&, 1&, _
            NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)

       If bytWait = 1 Then
             If ret& = 0 Then
                  Err = 8
             End If
       
             ' Wait for the shelled application to finish:
             Do
               ret& = WaitForSingleObject(proc.hProcess, 0)
               ' ret& = WaitForSingleObject(proc.hProcess, INFINITE)
               DoEvents
             Loop Until ret& <> 258
             ret& = CloseHandle(proc.hProcess)
       End If
         
    End Sub

    • Post Points: 0
  • 09-23-2005 6:20 PM In reply to

    • buffbuh
    • Not Ranked
    • Joined on 09-23-2005
    • New Member
    • Points 35
    http://support.microsoft.com/kb/236529

    Good idea to do a search in Google on error messages - you'll often find links to Microsoft's Knowledge Base - good place to start.  

    Buffbuh
    • Post Points: 0
  • 09-23-2005 6:24 PM In reply to

    • buffbuh
    • Not Ranked
    • Joined on 09-23-2005
    • New Member
    • Points 35

    Compiled VB Project freezes Package Wizard

    A project I have compiles fine (slowly granted) - but when using Package and Deployment Wizard, it freezes right after designating Install folder.  I tried changing the Install folder location, but it doesn't help.  It just freezes - "not responding" forever.

    Help!

    Buffbuh
    • Post Points: 0
  • 02-03-2006 7:56 PM In reply to

    • sallen
    • Not Ranked
    • Joined on 02-03-2006
    • New Member
    • Points 10

    Compiled VB Project freezes Package Wizard

    Is there a resolution for this issue?  I'm having the same problem.
    Thanks,
    SALLEN
    • Post Points: 0
  • 02-03-2006 9:40 PM In reply to

    • buffbuh
    • Not Ranked
    • Joined on 09-23-2005
    • New Member
    • Points 35

    Wish I could help

    SALLEN,

    I don't think I ever found a solution.  But read on if you want an alternative solution.  

    I decided I wanted a more professional software installation package anyways, that offered more options and looked nicer - and I wanted it in .msi format, so I tried out MAKEMSI, a free software packaging tool, and have been using that to package my software ever since.

    There's a learning curve there, but I'd be willing to share what I've learned as far as packaging a VB project using MAKEMSI.  Granted, my VB package is not too complicated.  I include a number of VB executables, a DLL library, an .mdb file, and .ini file.  Added a banner graphic, icon, and software license text.  It's really not a bad way to go for free.  

    I have used Wise Installer, which is much better/easier to use, but costs quite a bit of money.  I might recommend that to someone with money to buy it.

    Sorry I don't have a fix for you.  I guess that's the straw that broke the camel's back for me.  I couldn't believe VB packager would hang up like that.  GRRRRR!!!

    Sincerely,
    Bryan (BuffBuh)

    • Post Points: 0
  • 02-03-2006 10:10 PM In reply to

    • sallen
    • Not Ranked
    • Joined on 02-03-2006
    • New Member
    • Points 10
    Thanks Bryan.  I'm going to have to do some research and recommend to my team what we do to resolve the issue.  We've been talking about going to a different PDW for quite some time and as you say this may be our straw that broke the camel's back.  I'll give the free one a look over and if I have any questions I'll be in touch--if you don't mind.
    Thanks,
    Sondra

    • Post Points: 0
  • 02-03-2006 10:36 PM In reply to

    • buffbuh
    • Not Ranked
    • Joined on 09-23-2005
    • New Member
    • Points 35
    No problem, Sallen.  I'd be happy to help out if I can.  I remember looking a while for answers for a while and finally gave up.  Let me know if you found a legitimate solution.  Good luck!

    Bryan
    • Post Points: 0
  • 04-08-2006 2:39 AM In reply to

    Re: [27] Package & Deployment Wizard

    I keep seeing people post on the forums about P&D issues, P&D Wizard was great when VB6 first arrived (around 98) but after Microsoft invested in MSI (Windows Installer) P&D was pointless.

    To save yourself (and your users) the trouble switch to using Visual Studio Installer 1.1 or one of the other freely available installers such as InnoSetup or NSIS Installer. You'll find that these tools are more robust and alot more user-friendly than the older v3.x versions of the installer shell/runtime that P&D uses.

    I hope that helpsBig Smile [:D]





    Digitally Yours,

    Thushan Fernando
    • Post Points: 5
  • 08-28-2007 7:55 AM In reply to

    • Suresh P
    • Not Ranked
    • Joined on 08-28-2007
    • India
    • New Member
    • Points 5

    Re: related to package installation

    Hello

          Open the  folder(Package folder) where .exe file is available..

          There one setup file is available open that setup file in notepad..

          In that below the Setup1 Files, search the word DLLSelfRegisterEx..

          Remove the letter Ex and save the file..

          Now install & execute.. Send respose..

    • Post Points: 5
Page 2 of 2 (25 items) < Previous 1 2