How to run the exe file to other system?
Using VB 6
I copied the exe file to other system, then run that exe file, it not working it showing error
“component comdlg32.ocx or one its dependencies not correctly registered a file is missing or invalid”`
Can any one help me how to avoid this error?
When deploying VB6 applications, you should create a Setup, this will manage the DLL's that the VB6 application depends on. Since it is not enough to just copy the .Exe and .Dll's. You also need to register them.
The creation of the setup is included in the VB6 environment.
You can read this http://support.microsoft.com/kb/830761 which is very comprehensive.
1: http://support.microsoft.com/kb/830761 for more information.
Or if you just want the redistributable files check this kb http://support.microsoft.com/kb/290887
Copy and register the comdlg32.ocx on other system. Link: Fix Missing Comdlg32.ocx Run time Error in Portable apps.
Create an installer for your program.
Unless you are deploying your program to really old versions of Windows (prior to XP), one nice alternative is to create an XCopy package using reg-free COM. This is fairly easy for most simple programs using Make My Manifest though it can be done by hand or using other tools if you invest in a little study.
Even then a formal installer package is usually desireable though, if nothing else to create Start Menu shortcuts and set up application workspace directories.
Keep in mind that even the PDWizard is difficult to use blindly. Packaging and deployment is a topic that requires some learning investment.
Outdated or missing comdlg32.ocx runtime library is causing this error. Here is a copy of comdlg32.ocx (~60 Kb Zip). Download the file to the Desktop and extract the comdlg32.ocx to your the Windows\System32 folder.
Note: If you already have a copy of comdlg32.ocx, backup the existing file to a different folder and delete it from System32 folder.
1. Download comdlg32.zip and save to Desktop.
2. Unzip the file using WinZip or any other utility.
3. Extract comdlg32.ocx to Windows\System32 folder.
4. Type the following command from Start, Run dialog:
regsvr32 %Systemroot%\System32\comdlg32.ocx
Typically a VB 6 app will consist of an .exe some .dll libraries and a config.ini file. The exe is the starting place and it consumes the dll's and config.ini and other resources to run => you have to have all parts in the same directory for the app to run typically called "packaging" an app. E.g. An installer simply ensures that all those files in a packaged app are placed on a users computer in an Windows application directory, and creates a shortcut launch icon so that a user can click the shortcut in the start bar and the app will run.
To "package" your app (put the dll's and exe in the same folder) you can use an Add-In called "Package and Deployment Wizard":
And here is a demo of using it: https://www.youtube.com/watch?v=XT7jaoAiKDo
You can either package and create an installer and package or just create a package:
Now if the Deployment Wizard doesnt show as an add-in on your VB6 Editor Installation, go to editor's program folder and find the tools Tools folder, i.e:
Then you should be able to find the Deployment Wizard there:
Open it to use it.
Related
Running the solution without problems in Visual studio 2017, or directly through .exe file in solution folder (inside release and debug folders). But when the ".exe" file is not in the solution folder, it will crash and stop working.
I found that these lines are causing the issue:
ScreenReaderAPIWrapper.ScreenReader sc = new ScreenReaderAPIWrapper.ScreenReader();
sc.SayString(textDisplay.Text.ToString());
The ScreenReaderAPIWrapper library for .net you're using is a wrapper around another library called UniversalSpeech. There are several solutions alike out there, like Davy Kager's Tolk or Chris Toth's AccessibleOutput. All of these libraries make use of native APIs provided by corresponding screen reader modules (jfwapi.dll, saapi32.dll, NvdaController32.dll and others).
For these libraries to work, you have to provide all of the needed DLLs along with your executable, otherwise you'll get those errors about the exe file that stopped working.
If you need to distribute your program, consider using installer tools like NSIS or InnoSetup to pack all needed files into one single installer.
I am new to Unity3d development. I have created two versions of a 3D puzzle app, one for Mac and the other for Windows. Mac applications are created with the package contents contained within it. The Windows application is created with the exe file and a separate data folder with the same name as the exe file + suffix _Data. I want to create a single exe file to distribute on Amazon and other downloadable platforms. The problem I'm having is finding something where the data folder and the exe file have to be located at the same level.
I'm used to Apple devices but recently purchased a Windows laptop for testing.
I could not find anything in the Unity3D documentation on how to do this. The documentation talks about how to distribute the application to the Windows Store, something I don't plan to do. The only thing I could find on their forum was one question that was asked in 2011.
One of the suggested solutions, Enigma Virtual Box, I could not get to work because Unity3D requires that the exe file and the data folder be at the same level. I have also tried the trial for Smart Packer Pro but I need a dll file as a starting point which I could not find in my Unity3D project folder.
All of the information I'm finding related to Windows packaging into a single exe file are at least five years old. None of them relate to packaging Unity3D applications. I have also searched microsoft.com and windows.com but could not find anything there.
UPDATE 5/12/2016 14:15
I installed Inno Setup and attempted to create a script for my application. It copied the exe file but created an empty data folder instead of copying the data folder I need to run the exe file. I checked to make sure that the folder name was correct in the script.
; -- myapplication.iss --
; Demonstrates copying 3 files and creating an icon.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName=myapplication
AppVersion=1.0
DefaultDirName={pf}\myapplication
DefaultGroupName=myapplication
UninstallDisplayIcon={app}\myapplication.exe
Compression=lzma2
SolidCompression=yes
OutputDir=userdocs:Inno Setup Examples Output
[Files]
Source: "myapplication.exe"; DestDir: "{app}"
[Dirs]
Name: "{app}\myapplication_Data";
Packing a Unity3D application is not not possible without 3rd party software.
a bit more recent url (2014) suggests using smart packer, this however is a tool I personally never used before.
I tend to use inno setup as it seems a bit more professional, it eases up moving files, creating links (short-cuts) and uninstalling quite a bit as well. Simply said, this allows you to extract the exe and _data folder to the same folder, and create a shortcut to the exe.
Follow up on edit
I installed Inno Setup and attempted to create a script for my application. It copied the exe file but created an empty data folder instead of copying the data folder I need to run the exe file. I checked to make sure that the folder name was correct in the script.
After selecting the main exe file during the application files part of the setup wizard, you can add a folder. Here you can select yourgame_data folder to be included in the installer. This however does require an additional step. After adding the folder, you need to set the destination subfolder to yourgame_data for it to be able to properly create the subdirectories. You can refer to this picture guide for more information. I included the relevant step(s) below.
I want to know how installation in windows works like what sort of files get created first as .dll , drivers & all.
To be more precise when we click on .exe file what happens internally?
Generally speaking, anything can happen after you click the exe. But most of the time, installer does some or most of these:
check if the needed frameworks and libraries are already installed (ex: .NET framework)
create a registry entry with the application settings and uninstaller path
extract the binaries and assets or download them
create the needed directories (ex: Program Files/SomeProgram) and move the extracted files to the proper folders
create a desktop shortcut
associate the file extensions with the program
do whatever else the program needs.. It really depends on what you are installing and what needs to be set up for the program to
function properly.
I have looked everywhere and cannot find any simple solution to this. It must be a single file installer.
I had created it with a simple 2 line batch file
copy .\Files\WGMX.ocx C:\Windows\System32\
C:\Windows\System32\regsvr32.exe /s wgmx.ocx
But translating this simple 2 line batch file into any of the installer helpers I have used has been an incredible nightmare. Any help would be appreciated.
Assuming you want a normal MSI package, this can be done very easy with the free version of Advanced Installer. Just create a new "Simple" project, i.e. the free one, go to Files and Folders page and add your OCX files, than double click it and go to Registration tab, so enable the desire settings.
Very important, if you want the same file in "System32" folder on x64 machines you need to create a separate MSI, with the installation type set to AMD64, option available in Install Parameters page.
I would like to build a setup, or something like that (1 file), to deliver a single file to a target system. Plugin for an application, installable to users AppData folder.
After some research I'm still not sure in which direction to look. I can create the setup project with Visual Studio 2010, but all of the options so far seem to be way too heavy or have some flaws.
SetupProject stubbornly wants to create an application folder which I don't need, and complains about installation to user folder. Cab doesn't seem to offer automatic install, oneclick is not available for the project, etc.
Is there an easier setup technology I could use?
Requirements:
Install -> Copy 1 file to a folder
under %userprofile%\3rdpartyapp\ if
it exists (xcopy).
Uninstall -> Delete the file and also
one folder with custom settings
(rmdir \s).
Distribution -> Free for commercial
use.
Maybe I should just pack the file in self extracting c++ exe?
It may be overkill for one file, but I like InnoSetup for creating setup packages. Check it out, and see if it suits you. It is very easy to use and deploy.
Take a look at WiX toolset. It allows creating MSI-based installers, and the installer could be quite simple:
Search for %userprofile%\3rdpartyapp;
Copy the file into it, if it exists;
Fail install or maybe create it, if it does not exist.
Uninstall would be very simple: it would need to remove the installed file. To remove a subfolder of 3rdpartyapp, you can use RemoveFolderEx element.
MSI registers the installed app with Add/Remove Programs Control panel. Uninstall is handled by Windows Installer service, therefore you don't need to copy any additional files or programs to support uninstall.
I think any setup technology is too heavy for one file. I'd go with creating a simple application that would extract the file from its resources stream and copy it into %userprofile%\3rdpartyapp.
Uninstall is trickier: there should be something that can handle the uninstall process. It could be a batch or script (js, vbs) file stored somewhere in user's profile, another simple application or the same one. (Installation process can also be handled with a script.)