Quantcast
Channel: VBForums - Application Deployment
Viewing all 268 articles
Browse latest View live

.vbs doesn't run on setup commit

$
0
0
Hello,

I have a .vbs file that contains the following 2 lines. If I just double click on the .vbs file, it executes the run.bat file, but when I put this file in CustomActions -> Commit in Visual Studio setup, the setup fails at the end with the following error.

Code:

Set objShell = CreateObject("WScript.Shell")
objShell.Run "run.bat"

This is the error.

Quote:

There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor.
Any ideas how to solve this?

Thanks.

Distribution to Windows 11

$
0
0
I have a program that I want to install on my wife's Windows 11 computer (does not have Visual Studio/6 on it). The program consists of a database, some jpg images and icons, References to DAO (probably not used any more but still exists in the list), ADO, MS Word, Scripting Runtime and MS Speech.
Using The Package and Deployment feature, it asks me to include Jet 2.x: Jet 2.x along with include ODBC Direct and ODBC with Jet Workspaces. Which of these, if any, do I need to Include?
I see a list of files to include (already checked):
My Database
My Executable
COMDLG32.OCX
DAO350.DLL
expsrv.dll
UNCHECKED: MDAC_TYP.exe
msado60.lib
MSFLGRD.OCX
MS JET35.DLL
MSJINT35.DLL
MSJTER35.DLL
MSRD2X35.DLL
MSREPL35.DLL
MSVCRT.DLL
MSWORD.OLB
RICHED32.DLL
richtx32.ocx
sapi.dll
scrrun.dll
SETUP.EXE
SETUP1.EXE
schwapi.dll
ST6UNST.EXE
VB5DB.DLL
VB6 Runtime and OLE Automation
VB6STKIT.DLL
vbajet32.dll
VBFLGRID13.OCX
...and a few jpg files were listed

I do have an MSFlexGrid as well as a VBFlexGrid, and a Richtextbox (along with several other controls on 4 different forms).

I want to make a single CAB file and then run the SetUp on my wife's computer. Before I attempt (and probably screw up her system), I kinda want to know about that Jet stuff above, as well as from that list above what I should include or not include. (Like also, why was MDAC unchecked...need it on modern computers?)

[RESOLVED] Sending a file

$
0
0
I wrote a program consisting of several forms and no special controls.

I compiled it and ran two anti-virus programs on it. It came out clean, as it should.

I compressed the exe and ran the same two anti-virus programs against it. It still came out clean.

I attached the zip file to an email and sent it to a friend. It bounced with the error msg
554: 5.7.1 [VI-2] Message blocked due to virus content of the message..

I tested it again by sending it to my second yahoo account. No problem. I then tried to send it to me backup email account on gmail. Same error message as when I tried to send it to friend.

I know there is no virus. I don't believe that I know how to write a virus. How do I send this compressed file?

Thanks

Setup File Error

$
0
0
My project is completed.
If I build the project it shows no errors, but as soon as I publish it, it gives an error: -
Unhandled Exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

When it is building it does not give errors: -
Build started...
1>------ Build started: Project: SymbolicSigns, Configuration: Debug Any CPU ------
1> SymbolicSigns -> D:\Programs\Database\Programs\Visual Studio\SymbolicSigns\SymbolicSigns\bin\Debug\SymbolicSigns.exe
Building SymbolicSigns...
2>------ Publish started: Project: SymbolicSigns, Configuration: Debug Any CPU ------
Connecting to 'D:\Programs\Database\Programs\Visual Studio\Publish\'...
Publishing files...
Publish success.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

But when you run the setup it gives the error: -

Could not find file
c:\Users\Kobus\AppData\LocalApps\2.0\Data\8PXKA8TY.4QL\C1QM3WED.01D\symb..tion_50147dd7cfe84333_0001 .0000_d67eaec39b7

I did check, the file is in the folder as recorded above.

What can I do to correct this in order to complete the setup file?

Update Installer using Microsoft Visual Studio Installer Projects 2022 Extenstion

$
0
0
Hey guys.

I've been messing with the Microsoft Visual Studio Installer Projects 2022 Extension in VS2022. I am able to create an installer for my app, and that works just fine.

I'm having trouble specifically with the "RemovePreviousVersions" setting and running the install again to effectively "update" the installed application.

Right now, it will install over the previous installation if I raise the version number in settings before building the project, however, it doesn't seem to uninstall the previous version, and it also doesn't overwrite all of the necessary files. It replaced "MyApplication.runtimeconfig.json" and "MyApplication.pdb". It did not replace the executable or dll named after project. Running the executable, it was the previous version of the application, and not the newer one that the installer is using. I had to uninstall the app, and then reinstall using the same version of the installer I used to "update" it, and then it was the correct version.

I was under the impression I could do this, because that is the information I found online. I'm not having any luck with it, but I'm not sure if I did something wrong.

Looking at Microsoft's documentation, I see that they say it does not "Support minor upgrades and patching" but does "Support major upgrades." Does this mean if I am changing my version number, it will only "update" the installation if I increment the major version number, ie - 1.0.0 > 2.0.0, rather than going from 1.0.0 > 1.0.1?

I've been deciding between writing the software to automatically detect version changes from a server location and handle the update, or just use an installation tool to handle it since that would be easier, lol, but here I am.

(Side note: I would generally look into the issue a lot more, but google isn't giving very useful results. It is mainly showing me how to use the VS2022 Installer to install or update VS2022.)

[RESOLVED] Update Installer using Microsoft Visual Studio Installer Projects 2022 Extenstion

$
0
0
Hey guys.

I've been messing with the Microsoft Visual Studio Installer Projects 2022 Extension in VS2022. I am able to create an installer for my app, and that works just fine.

I'm having trouble specifically with the "RemovePreviousVersions" setting and running the install again to effectively "update" the installed application.

Right now, it will install over the previous installation if I raise the version number in settings before building the project, however, it doesn't seem to uninstall the previous version, and it also doesn't overwrite all of the necessary files. It replaced "MyApplication.runtimeconfig.json" and "MyApplication.pdb". It did not replace the executable or dll named after project. Running the executable, it was the previous version of the application, and not the newer one that the installer is using. I had to uninstall the app, and then reinstall using the same version of the installer I used to "update" it, and then it was the correct version.

I was under the impression I could do this, because that is the information I found online. I'm not having any luck with it, but I'm not sure if I did something wrong.

Looking at Microsoft's documentation, I see that they say it does not "Support minor upgrades and patching" but does "Support major upgrades." Does this mean if I am changing my version number, it will only "update" the installation if I increment the major version number, ie - 1.0.0 > 2.0.0, rather than going from 1.0.0 > 1.0.1?

I've been deciding between writing the software to automatically detect version changes from a server location and handle the update, or just use an installation tool to handle it since that would be easier, lol, but here I am.

(Side note: I would generally look into the issue a lot more, but google isn't giving very useful results. It is mainly showing me how to use the VS2022 Installer to install or update VS2022.)

Advice on installation and update methods for VB.Net programs

$
0
0
Hey guys,

I've been re-writing my company's existing applications in .Net and they're basically letting me go wild with it.

We've been testing one of the completely new applications in our live environment and it's resulted in a lot of compiling and re-installing the application on the target PC. I don't have much experience with creating installers or pushing updates with Visual Studio, so I'm not entirely sure the best way to go about it.

Reading through Microsoft's documentation, it seems they recommend Microsoft Visual Studio Setup and Deployment Projects, InstallShield, or WIX.

Visual Studio Setup mostly works for my purposes, but I'm not a fan of changing the major version number everytime I want to deploy an update. I would rather reserve those for significant iterations, and use the minor version numbers for bugfixes and minor additions. Not a deal breaker, because it's certainly easy to use, but it's more of a pain in the ass.

I have no experience with InstallShield or WIX, but InstallShield has the same drawback as Visual Studio Setup.

I've been looking into WIX but it seems a tad more involved than Visual Studio Setup. It however, supports minor patching.

I'm really just looking for any advice or experience anyone may have using any of these, or any other methods that allow easily updateable programs. Right now it's not super important because the application is only rolled out to one specific PC, and it's easy enough for me to uninstall the application and reinstall the updated version, but this is not feasible for very long.

Our current update environment are batch files located on a network drive that just copy compiled EXE's into the installation path on the user's pc. This has worked for this company for quite awhile using VB6. I would ideally like something similar, but with update installers instead, so users can update their applications as needed without my intervention.

[RESOLVED] Advice on installation and update methods for VB.Net programs

$
0
0
Hey guys,

I've been re-writing my company's existing applications in .Net and they're basically letting me go wild with it.

We've been testing one of the completely new applications in our live environment and it's resulted in a lot of compiling and re-installing the application on the target PC. I don't have much experience with creating installers or pushing updates with Visual Studio, so I'm not entirely sure the best way to go about it.

Reading through Microsoft's documentation, it seems they recommend Microsoft Visual Studio Setup and Deployment Projects, InstallShield, or WIX.

Visual Studio Setup mostly works for my purposes, but I'm not a fan of changing the major version number everytime I want to deploy an update. I would rather reserve those for significant iterations, and use the minor version numbers for bugfixes and minor additions. Not a deal breaker, because it's certainly easy to use, but it's more of a pain in the ass.

I have no experience with InstallShield or WIX, but InstallShield has the same drawback as Visual Studio Setup.

I've been looking into WIX but it seems a tad more involved than Visual Studio Setup. It however, supports minor patching.

I'm really just looking for any advice or experience anyone may have using any of these, or any other methods that allow easily updateable programs. Right now it's not super important because the application is only rolled out to one specific PC, and it's easy enough for me to uninstall the application and reinstall the updated version, but this is not feasible for very long.

Our current update environment are batch files located on a network drive that just copy compiled EXE's into the installation path on the user's pc. This has worked for this company for quite awhile using VB6. I would ideally like something similar, but with update installers instead, so users can update their applications as needed without my intervention.

[RESOLVED] Setup File Error

$
0
0
My project is completed.
If I build the project it shows no errors, but as soon as I publish it, it gives an error: -
Unhandled Exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

When it is building it does not give errors: -
Build started...
1>------ Build started: Project: SymbolicSigns, Configuration: Debug Any CPU ------
1> SymbolicSigns -> D:\Programs\Database\Programs\Visual Studio\SymbolicSigns\SymbolicSigns\bin\Debug\SymbolicSigns.exe
Building SymbolicSigns...
2>------ Publish started: Project: SymbolicSigns, Configuration: Debug Any CPU ------
Connecting to 'D:\Programs\Database\Programs\Visual Studio\Publish\'...
Publishing files...
Publish success.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========

But when you run the setup it gives the error: -

Could not find file
c:\Users\Kobus\AppData\LocalApps\2.0\Data\8PXKA8TY.4QL\C1QM3WED.01D\symb..tion_50147dd7cfe84333_0001 .0000_d67eaec39b7

I did check, the file is in the folder as recorded above.

What can I do to correct this in order to complete the setup file?

Problems on VB6 Compile

$
0
0
I do compile cleanly when the code is correct. But, most of my programs get flagged by McAfee, either when I scan after compile, or when I try to run them. This does not happen to all programs. I write in VB6.

This is frustrating because
1. I do not know how to write a virus, never thought about it,
2. I can't send my code to anyone, because it will get flagged there.

The pieces of the .exe (.frm, .mod, etc) do not get flagged when scanned.
Any suggestions on how to track down the culprit?

Thanks

System.Data.SqlClient not found at run-time (installed release .exe)

$
0
0
I am using the VS2022 template (project) for setup and deployment. I am not using any sql in the Winform app (.NET 7.0). Occasionally, when compiling (building) the assembly, the assembly will populate a listing of System.Data.SqlClient in the setup dependencies. If I manually delete the System.Data.SqlClient dependency in the setup project, then build the setup, there are no issues.

However, with the latest version of VS (Pro), I started noticing the exception System.Data.SqlClient not found during run-time of the installed .exe (bulit in \Release\bin). Whether or not this is due to the latest update of VS, I am wondering how to stop the compiled/installed app assembly from *looking for* System.Data.SqlClient. I have all the namespaces (Imports...) removed that mention Sql. The attached pic is from actual run-time of the installed .exe

Name:  sql.jpg
Views: 39
Size:  15.6 KB
Attached Images
 

[RESOLVED] PDF Files in VB Project

$
0
0
Good Day,
I am having a problem with the following: -

Name:  VS Form.jpg
Views: 63
Size:  33.8 KB

On the Top of the form, I have 2 buttons "Help" and "License Agreement". These files is in a PDF format as well as in a word format. If one clicks on the button, it opens automatically with the following codes

Private Sub btnEULA_Click(sender As Object, e As EventArgs) Handles btnEULA.Click
System.Diagnostics.Process.Start("C:\Program Files\EULA1.pdf")
End Sub

Private Sub btnHelp_Click(sender As Object, e As EventArgs) Handles btnHelp.Click
System.Diagnostics.Process.Start("C:\Program Files\Symbolic Signs Help File.pdf")
End Sub

Unfortunately some users do not understand to copy these 2 files in the correct Folder for these buttons to work and I am looking how to code it to automatically include these files to work with the buttons when the software is installed.

I wanted to include them in the Application Files when publishing the setup file, but it appears that one cannot include PDF nor Word Files.

Is there a way I can do this Programmatically?
Attached Images
 

[RESOLVED] Copy File From A Folder to another Folder and open it with a button

$
0
0
Sorry Everybody, This post is in the wrong place. I reposted it as a new thread on its own, but I am not able to delete it.

Good day everybody,

This is Visual Studio 2020, Windows 10 and VB.Net

I do not know if it can be done.
I am trying to do the following: -


I have a Button named btnCopy on a form. My intention is to find a file from the Installation CD where the Setup or Installation File is, and copy it to the Folder where the program is going to be installed. The reason behind this is in order for all users who are going to use the program to be able to open the file when another button btnShow is clicked.


Below is my codes: -

Code to Copy the file From the CD to the Installation Folder with btnCopy

My.Computer.FileSystem.CopyFile(
"D:\Text1.pdf",
"C:\Users\Kobus\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\My Name\Text1.pdf",
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)


Code to Open and Show the file with btnShow

Private Sub btnShow_Click(sender As Object, e As EventArgs) Handles btnShow.Click
System.Diagnostics.Process.Start("C:\Users\User Name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\My Name\Text1.pdf")
End Sub

The challenge is that all users might not have the CD Drives as D:\. Some users might have something else.
I am also not sure whether my coding is correct for the buttons btnCopy and btnShow

[RESOLVED] Deployment of Files

$
0
0
Good Day,
I just have a quick question.

If my deployed file change whether it is a Word or PDF or whatever.

Do I have to re-deploy it again with: -

Project
Add Existing Item
Click All Files
Add the file to the project
Click on the file in Solution Explorer
In File Properties Select
Content and copy always

Thank You

[RESOLVED] Deployment of Files Error

$
0
0
Good Day Everybody,
Firstly I want to thank you for the assistance you have given me in the past.

I have deployed files in the past with your assistance, but now I have done it again, but I am getting an error and I do not know how to fix it although I have tried several methods as described by the error message.

I am going about this step by step procedure when I am deploying the file.

Go to solution Explorer
Project
Add Existing Item
Click All Files
Add the file to the project
Click on the file in Solution Explorer
In File Properties Select
Content and copy always

This is the code
Private Sub btnLicenseAgreement_Click(sender As Object, e As EventArgs) Handles btnLicenseAgreement.Click
System.Diagnostics.Process.Start("C:\Program Files\OneFile.pdf")

End Sub

The file is showing in the Solution Explorer
The file is under The Project Folder in Windows Explorer.
The deployed files is present in the application files

Error

System.ComponentModel.Win32Exception: 'The system cannot find the file specified'

Kind Regards

[RESOLVED] Database File Not Found After ClickOnce Installation

$
0
0
I am having what I believe to be an issue publishing a database application. At first, I thought it might be a connection issue, but after a lot of review, I believe that there is something that is not being set correctly prior to publishing the database application.

While running the application in Debug mode, there are no failures of any kind. All queries run successfully and as expected.

Of note. There was a message that popped up the first time I ran the application in debug mode. I was unable to document the message, but I answered no and the application continued. Likely that is very important, but I do not have the information.

I then ran the build process. It succeeded with no errors.

I then ran the publish process. It succeeded with no errors.

At the first request made to any query, from the menu, the message below was generated.

Name:  Message.jpg
Views: 33
Size:  29.8 KB

I checked and the directory exists. As the message indicated, there was no copy of MasterBase.accdb located in that directory. There was, however, other material, as listed below.

Name:  files.jpg
Views: 32
Size:  22.4 KB

I believe that this directory, and it's contents are generated when running the Setup.exe file, but have been unable to verify that. I also believe that a copy of the database, MasterBase.accdb should be in this directory.

It appears to me that I have failed to define some setting in the project properties that points to the database. However, I have no idea what or where to do that. Of course, I could be completely off-base and the issue is something entirely different.
Attached Images
  

TechnologyAdvice and DZone Observability and App Performance Survey

$
0
0
Hey All,

VBForums has partnered with DZone, who is conducting their annual Observability + App Performance research survey, and we want to hear from YOU! Taking ~7 mins., our questions cover topics like observability, performance monitoring, and site reliability.
The purpose of this survey is to understand how you and your organization design, build, monitor, and observe your software and systems with the objective of maximizing performance. We define "performance" broadly to include efficient use of computational resources, data analysis, observability, end-user experience, predictability, and recoverability.

Your answers will help developers and other IT professionals across the SDLC. We'll analyze responses and publish our findings in our upcoming Observability and Application Performance Trend Report, scheduled for release this November.

https://survey.alchemer.com/s3/7545604/taforum

DZone Research and TechnologyAdvice Survey: Enterprise Security

$
0
0
Calling all AppSec experts!

How do you approach security across the SDLC? What cloud security and supply chain threats impact your team? Share your insights on all things AppSec in our 7-minute research survey (+ enter to win 1 of 4 $125 e-gift cards).

In DZone's December Trend Report, you'll find results gathered from our community of global software professionals — and see how your experiences compare.

https://survey.alchemer.com/s3/7581720/taforums

Install my program on customer's computer

$
0
0
VB 6.0 My program and all its files fit nicely on a flash drive, but that is not a practical medium for distributing to customers. So I ask the forum: (1) what software packages are safe (and easy) to use to install my .exe program and files on customer’s computers and (2) what changes do I need to make to prepare my project for installation? Thanks.

Visual Studio Setup Deployment Project Issues

$
0
0
Hi, to make it brief, I added into Visual Studio 2022 Windows Installer, it is supposed to be .MSI Setup project.

I added all the files and folders as well as logo into the project.

In settings, I changed directory name and desktop link and program link and etc...

So, in settings, there is an option x86 and x64 project. I would want to run the installer on both 32-bit and 64-bit target machine, as far as I know x86 option should work for both, or maybe I am wrong,

or I have to build both instances?

So, my project 2.3 Gb, so I could not build as compressed setup option, since it allows only 2 Gb MAX, so I tried compressed CABINET file.CAB file as an option, but failed as well I attached a photo of an

error, but third option worked "as loose uncompressed files".

Is there a way to be able to compress into SETUP.MSI file or at least a .CAB file on the side to be able to run the installer.

Is there a way to have .EXE SETUP option in the project to be able to compress all the files into it?

Those technical questions above I would like to have some of your opinion or suggestions.

Get back, thanks in advance.
Attached Images
 
Viewing all 268 articles
Browse latest View live