|
-
Oct 13th, 2007, 06:11 PM
#1
Thread Starter
Addicted Member
VB 2005 deployment using inno setup
Hello,
I am trying to crate installation package for my application using inno setup.
In installation setup I include my application file and all dlls from "debug" forlder (Interop.Microsoft.Office.Core.dll, Interop.VBIDE.dll, Interop.Word.dll).
After installing the Application, it is running, but it has very limited functionality – some forms inside the application can’t be opened.
I had the same problem when I tried to activate my application from other VB .NET application, but it was solved by setting the directory from which the process starts (see http://www.vbforums.com/showthread.php?t=491355 for details).
The target PC has Framework 2.0 installed.
Could you point out my mistake?
Thanks.
-
Oct 13th, 2007, 08:42 PM
#2
Re: VB 2005 deployment using inno setup
On What OS are you installing?
Do you have all the dependencies?
What does your script look like?
etc...
-
Oct 13th, 2007, 08:46 PM
#3
Re: VB 2005 deployment using inno setup
I also looked at your other post and boy that is about the worst thing you can do for deploying an app, hard coding the application path. All sorts of evils happen tat way.
-
Oct 14th, 2007, 02:39 AM
#4
Thread Starter
Addicted Member
Re: VB 2005 deployment using inno setup
Hi Randem,
the OS is XP SP2.
here is my script (haviely based on forum samples):
Code:
#define SourceFileDir "c:\Documents and Settings\User\My Documents\The Project\Frozen versions\Setup Files\"
#define OutputFileDir "c:\Documents and Settings\User\My Documents\The Project\Frozen versions\Inno output\"
[Setup]
AppName=My Application
AppVerName=My Application 1.0.0
AppPublisher=Alex Becker
AppPublisherURL=http://www.vbforums.com/
AppSupportURL=http://www.vbforums.com/
AppUpdatesURL=http://www.vbforums.com/
DefaultDirName={pf}\My Application
DefaultGroupName=My Application
LicenseFile={#SourceFileDir}\EULA and Warninig\EULA.rtf
InfoBeforeFile={#SourceFileDir}\EULA and Warninig\Warning.rtf
UninstallDisplayIcon={app}\My Application.exe
OutputDir={#OutputFileDir}
OutputBaseFilename=My Application setup
SetupIconFile={#SourceFileDir}\MAicon.ico
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: {#SourceFileDir}\My Application.exe; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\MAicon.ico; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\MAicon1.ico; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\Help\help.html; DestDir: {app}; Flags: ignoreversion
;.NET FRAMEWORK
Source: {#SourceFileDir}\FW\dotnetfx.exe; DestDir: {tmp}; Flags: ignoreversion
Source: {#SourceFileDir}\Interop.Microsoft.Office.Core.dll; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\Interop.VBIDE.dll; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\Interop.Word.dll; DestDir: {app}; Flags: ignoreversion
;SkinCrafter
Source: {#SourceFileDir}\SkinCrafter\vcredist_x86.exe; DestDir: {tmp}; Flags: ignoreversion
Source: {#SourceFileDir}\SkinCrafter\skincrafter.net-vs2005_light.dll; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\SkinCrafter\mfc80.dll; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\SkinCrafter\gdiplus.dll; DestDir: {app}; Flags: ignoreversion
[Icons]
Name: {group}\My Application; Filename: {app}\My Application.exe
Name: {commondesktop}\My Application; Filename: {app}\My Application.exe; Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\My Application; Filename: {app}\My Application.exe; Tasks: quicklaunchicon
[Run]
;INSTALL THE FRAMEWORK
;THIS LINE RUNS THE FRAMEWORK INSTALL
Filename: {tmp}\dotnetfx.exe; Parameters: "/q:a /c:""install /l /q"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: Checking for and installing .NET Framework if needed, This can take several minutes...
;THESE LINES ARE TO GIVE THE PATH TO YOUR EXE FULL TRUST ON THE MACHINE
;THIS IS DONE BECAUSE IF THE USER INSTALLS THE SOFTWARE TO A NETWORK SHARE
;IT WILL HAVE LIMITED TRUST BY DEFAULT. INSTEAD OF MAKING THE USER HAVE TO MANAGE THIS MANUALLY
;IN THE .NET FRAMEWORK MANAGEMENT, WE GIVE THE APP DIR FULL TRUST USING CASPOL
;THE FIRST LINE DELETES ANY EXISTING REFERENCE TO THIS APP (INCASE THIS IS A REINSTALL)
;THE SECOND LINE GIVE THE FULL TRUST BACK
;IF YOU DONT INCLUDE THE FIRST LINE, AND USER IS REINSTALLING, THEN YOU WILL END UP WITH 2 ENTRIES
Filename: {win}\Microsoft.NET\Framework\v2.0.50727\CasPol.exe; Parameters: "-q -machine -remgroup ""My Application"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: Setting Program Access Permissions...
Filename: {win}\Microsoft.NET\Framework\v2.0.50727\CasPol.exe; Parameters: "-q -machine -addgroup 1.2 -url ""file://{app}/*"" FullTrust -name ""My Application"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: Setting Program Access Permissions...
;Installing "Microsoft Visual C++ 2005 Redistributable Package" for skincrafter
Filename: {tmp}\vcredist_x86.exe; Parameters: "/q:a /c:""install /l /q"""; WorkingDir: {tmp}; Flags: skipifdoesntexist; StatusMsg: "Checking for and installing ""Microsoft Visual C++ 2005 Redistributable Package"" if needed, This can take several minutes..."
;Run Application if checked by user
Filename: {app}\My Application.exe; Description: {cm:LaunchProgram,My Application}; Flags: nowait postinstall skipifsilent
[UninstallRun]
;ON UNINSTALL, REMOVE CASPOL ENTRY FOR FULL TRUST
Filename: {win}\Microsoft.NET\Framework\v2.0.50727\CasPol.exe; Parameters: "-q -machine -remgroup ""My Application"""
Last edited by alex30; Oct 14th, 2007 at 02:46 AM.
-
Oct 14th, 2007, 01:04 PM
#5
Re: VB 2005 deployment using inno setup
First off you HAVE to change the hard coding in your app "c:\Documents and Settings\User\My Documents\Visual Studio 2005\Projects\My Application\My Application\bin\Debug\" is not going to exist on the users machine and if they choose a "SANE" location to install your app, your app will not work.
This is like asking for directions to a friend house in another state and always giving your home address as the place you are going to....
IT JUST WON'T WORK!!!!
BTW: Have you attempted to compile your script. It should not compile without ISSP (Inno Setup Script Precompiler). Not a good idea for a simple script.
-
Oct 14th, 2007, 02:50 PM
#6
Thread Starter
Addicted Member
Re: VB 2005 deployment using inno setup
I compiled the scrip and it was OK.
I will try also the ISSP.
But, how to make the application working in any location?
It is running without problems only from Visual Studio "Debug" folder.
I thought that copying all dlls from "Debug" folder to other folder would solve the problem.
-
Oct 14th, 2007, 02:55 PM
#7
Re: VB 2005 deployment using inno setup
I just told you how to do both....
-
Oct 15th, 2007, 09:33 AM
#8
Thread Starter
Addicted Member
Re: VB 2005 deployment using inno setup
Hi,
I can't install ISSP, since the PC with VS is in the lab without internet connection, but I found something strange.
If I create manually "C:/Program Files/My Application/" and copy the next five files from debug folder – it works perfect if I launch the application from "C:/Program Files/My Application/":
- My Application.exe
- Interop.Microsoft.Office.Core.dll
- Interop.VBIDE.dll
- Interop.Word.dll
- skincrafter.net-vs2005_light.dll
But if I make it with Inno setup – the application is running with limited functionality.
Here is the code:
Code:
#define SourceFileDir "c:\Documents and Settings\User\My Documents\The Project\Frozen versions\Setup Files\"
#define OutputFileDir "c:\Documents and Settings\User\My Documents\The Project\Frozen versions\Inno output\"
[Setup]
AppName=My Application
AppVerName=My Application 1.0.0
AppPublisher=Alex Becker
AppPublisherURL=http://www.vbforums.com/
AppSupportURL=http://www.vbforums.com/
AppUpdatesURL=http://www.vbforums.com/
DefaultDirName={pf}\My Application
DefaultGroupName=My Application
LicenseFile={#SourceFileDir}\EULA and Warninig\EULA.rtf
InfoBeforeFile={#SourceFileDir}\EULA and Warninig\Warning.rtf
UninstallDisplayIcon={app}\My Application.exe
OutputDir={#OutputFileDir}
OutputBaseFilename=My Application setup
SetupIconFile={#SourceFileDir}\MAicon.ico
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin
[Languages]
Name: english; MessagesFile: compiler:Default.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: {#SourceFileDir}\My Application.exe; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\MAicon.ico; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\MAicon1.ico; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\Interop.Microsoft.Office.Core.dll; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\Interop.VBIDE.dll; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\Interop.Word.dll; DestDir: {app}; Flags: ignoreversion
Source: {#SourceFileDir}\SkinCrafter\skincrafter.net-vs2005_light.dll; DestDir: {app}; Flags: ignoreversion
[Icons]
Name: {group}\My Application; Filename: {app}\My Application.exe
Name: {commondesktop}\My Application; Filename: {app}\My Application.exe; Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\My Application; Filename: {app}\My Application.exe; Tasks: quicklaunchicon
[Run]
;Run Application if checked by user
Filename: {app}\My Application.exe; Description: {cm:LaunchProgram,My Application}; Flags: nowait postinstall skipifsilent
-
Oct 15th, 2007, 01:05 PM
#9
Thread Starter
Addicted Member
Re: VB 2005 deployment using inno setup
Solved by adding "workingdir: {app}"
-
Oct 16th, 2007, 05:01 AM
#10
Re: VB 2005 deployment using inno setup
There is no way you can compile this script in Inno Setup without ISSP.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|