10

I have a Visual Studio Installer Project that I'm making in Visual Studio 2010 and am unable to figure out how to remove the "Welcome to the [Product Name] Setup Wizard" text from the wizard's dialog boxes.

For example: How do I remove the text "Welcome to the Setup1 Setup Wizard" from the screenshot below?

enter image description here

Jed
  • 10,649
  • 19
  • 81
  • 125

6 Answers6

10

You can "remove" the text by removing the Welcome dialog and replacing it with a custom dialog. In VS 2005 -

  1. Right click on the Setup project in the solution explorer
  2. Select View - User Interface
  3. Under the Start group for Install and Administrative Install delete "Welcome"

Then you can add a "Textboxes (A)" dialog (right click the "Start" group and select Add Dialog) to the project, set the visible property for the text boxes to false. Move the Textboxes (A) up to the top of the "Start" sequence.

The properties for this dialog include:

  • BannerBitmap
  • BannerText
  • BodyText

This should allow you to control the look / feel (to a certain extent) of this new "Welcome" page.

superjos
  • 12,189
  • 6
  • 89
  • 134
Hassanation
  • 866
  • 2
  • 14
  • 29
6

This is not supported by Visual Studio setup projects.

A solution would be to edit the MSI with Orca to modify the control text, but you would have to do it after each build. So you can either leave it this way or use another setup authoring tool which allows you to customize your installation dialogs.

Cosmin
  • 21,216
  • 5
  • 45
  • 60
5

I accomplished this by modifying an approach I've pieced together from various other results found online.

Step 1: Save the following as removebannertext.vbs in the setup project's root folder:

Option Explicit
If (Wscript.Arguments.Count < 1) Then
  Wscript.Echo "Windows Installer utility to execute SQL queries against an installer database." & vbCRLf & " The 1st argument specifies the path to the MSI database, relative or full path"
  Wscript.Quit 1
End If
Dim openMode : openMode = 1 'msiOpenDatabaseModeTransact
On Error Resume Next
Dim installer : Set installer = Wscript.CreateObject("WindowsInstaller.Installer") : CheckError
' Open database
Dim database : Set database = installer.OpenDatabase(Wscript.Arguments(0), openMode) : CheckError
Wscript.Echo "Removing all BannerText..."
Dim query
query = "UPDATE `Control` SET `Control`.`Attributes`=0 WHERE `Control`.`Control`='BannerText'"
Dim view : Set view = database.OpenView(query) : CheckError
view.Execute : CheckError
database.Commit
Wscript.Echo "Done."
Wscript.Quit 0
Sub CheckError
Dim message, errRec
If Err = 0 Then Exit Sub
message = Err.Source & " " & Hex(Err) & ": " & Err.Description
If Not installer Is Nothing Then
  Set errRec = installer.LastErrorRecord
  If Not errRec Is Nothing Then message = message & vbCRLf & errRec.FormatText
End If
Wscript.Echo message
Wscript.Quit 2
End Sub

Step 2: Set the project's PostBuildEvent property to this:

cscript.exe "$(ProjectDir)removebannertext.vbs" "$(BuiltOuputPath)"
Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
Goner Doug
  • 387
  • 5
  • 8
  • Can you please help me to update `BannerText` name using this script? also, I want to update `BannerText` in welcome dialog else dialog not updated but currently, all dialog are updated can you please suggest? – jishan siddique May 11 '20 at 14:18
3

Goner Doug Answer works good.

But the ProgressBar BannerText has not been removed.I guess instead of removing Attribute value in the BannnerText control suggested by Goner Doug, If we could empty the BannerText String then it might be good. We can also remove the Banner text of ProgressBar window by doing the same. Note that removing attribute value wont work for ProgressBar bannner text.

In Goner Doug answer, replace the query as

query = "UPDATE `Control` SET `Control`.`Text`='' WHERE `Control`.`Control`='InstalledBannerText' OR `Control`.`Control`='BannerText' OR `Control`.`Control`='RemoveBannerText'"

This will remove banner text in progress bar window too.

Option Explicit
If (Wscript.Arguments.Count < 1) Then
Wscript.Echo "Windows Installer utility to execute SQL queries against an installer database." & vbCRLf & " The 1st argument specifies the path to the MSI database, relative or full path"
Wscript.Quit 1
End If
Dim openMode : openMode = 1 'msiOpenDatabaseModeTransact
On Error Resume Next
Dim installer : Set installer = Wscript.CreateObject("WindowsInstaller.Installer") : CheckError
' Open database
Dim database : Set database = installer.OpenDatabase(Wscript.Arguments(0), openMode) : CheckError
Wscript.Echo "Removing all BannerText..."
Dim query
query = "UPDATE `Control` SET `Control`.`Text`='' WHERE `Control`.`Control`='InstalledBannerText' OR `Control`.`Control`='BannerText' OR `Control`.`Control`='RemoveBannerText'"
Dim view : Set view = database.OpenView(query) : CheckError
view.Execute : CheckError
database.Commit
Wscript.Echo "Done."
Wscript.Quit 0
Sub CheckError
Dim message, errRec
If Err = 0 Then Exit Sub
message = Err.Source & " " & Hex(Err) & ": " & Err.Description
If Not installer Is Nothing Then
Set errRec = installer.LastErrorRecord
If Not errRec Is Nothing Then message = message & vbCRLf & errRec.FormatText
End If
Wscript.Echo message
Wscript.Quit 2
End Sub
BinaryMee
  • 2,102
  • 5
  • 27
  • 46
2

You can easily change the welcome text by modifying the the project file in notepad. (i.e. project1.vdproj) Make sure to change the ProductName or Title. I can't remember which one exactly and then rebuild the project and you're all done.

  • Please elaborate. The displayed banner text doesn't appear in the file. [ProductName] appears as placeholders in the file. How exactly must the file be changed ? – Captain Sensible Jun 07 '18 at 08:18
1

One solution (if your setup creating process is not lengthy) - You will have to make the setup from scratch and rename it at that time like My Setup when it prompts for the name of the setup.

Manish Dubey
  • 706
  • 4
  • 17