הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Question
Saturday, May 15, 2010 7:24 PM
I've made an application with the help of a few forums members and now I'm ready to publish the application. When the application is installing I would like it to be "Invisible". Meaning I don't want the user to see the simple installer(Generated by Visual Studio) at all.
All replies (14)
Saturday, May 15, 2010 7:45 PM ✅Answered
I think that all MSI setup files accept a /q option on the command line to install silently. You would have to launch the command msiexec /i file.msi /q. Just distribute a batch file with that command in it.
--
Mike
Saturday, May 15, 2010 8:08 PM ✅Answered | 1 vote
I may have lead you a bit astray. I now see you mentioned "publish". There are two types of installers available with visual studio. One is to select the project and choose "Publish". This creates a very simple install that can be used from a web site. This is often called a "Click-Once" installer. If this is the mode you are using, I'm not sure about the flexibility for a "silent install"
There is another option which is to create a "Deployment Project", This is a bit more complex but is somewhat more flexible for the effort. I was refering to the "Deployment Project", which creates an MSI file (projectname.msi). That is the mode I was describing as I use the Click-Once mode very infrequently.
With the Deployment Project mode, it is up to the end user to choose to run a silent install, not you as the developer. The end user simply opens a command prompt (start menu, run cmd.exe). They change to the location of the installer, then just run the command msiexec /i file.msi /q.
--
Mike
Saturday, May 15, 2010 8:23 PM ✅Answered
Oh, ok, well is there a way to make it so the user just double clicks on the installer file and it does the command prompt automatically?
What kind of installer do you have .exe or .msi file ? With MSI file which support silent installation, you have to create batch file which as FamilyTreeMike suggested above. For exe, you have to create another executable file which will run the main installerprogram silent using process or shell.
kaymaf
CODE CONVERTER SITE
http://www.carlosag.net/Tools/CodeTranslator/.
http://www.developerfusion.com/tools/convert/csharp-to-vb/.
Saturday, May 15, 2010 7:57 PM
I'm a newbie when it comes to anything concerning command line stuff. Could you break down what I have to do step by step? It would be very helpful.
Saturday, May 15, 2010 8:15 PM
Oh, ok, well is there a way to make it so the user just double clicks on the installer file and it does the command prompt automatically?
Saturday, May 15, 2010 8:23 PM | 1 vote
Create a text file in the same folder as the installer file, and call the text file "install.bat". Put this line in the file with notepad or any other text editor, making sure to use whatever your msi filename is instead of file.msi:
msiexec /i file.msi /q
Then just have the user run install.bat from your files.
I don't think there is a way to change setup.exe to run the way you want.
--
Mike
Saturday, May 15, 2010 8:30 PM
What kind of installer do you have .exe or .msi file ? With MSI file which support silent installation, you have to create batch file which as FamilyTreeMike suggested above. For exe, you have to create another executable file which will run the main installerprogram silent using process or shell.
kaymaf
exe
I have the simple Visual Studio Generated (Publish Wizard) setup files. How do I create a batch file? I'm totally lost. I've never done this before.
Saturday, May 15, 2010 8:51 PM
I dont use Visual studio publish tool so i cant tell what file generated when you publish your program which lead to my question above. What file generated when you publish the program, is it .exe or .msi file ? . As far as i know, the executable (.exe) file does not support silent unless you write your own installer from the scratch.
kaymaf
CODE CONVERTER SITE
http://www.carlosag.net/Tools/CodeTranslator/.
http://www.developerfusion.com/tools/convert/csharp-to-vb/.
Saturday, May 15, 2010 9:00 PM
Ok, i've compiled it into an .msi file.
So now I have a file called "myapplication" installer.msi
What does one do now
Saturday, May 15, 2010 9:23 PM | 1 vote
Now, copy the text in the bold below, paste it in notepad and save it as Anyname .bat. make sure you pass the full path to installer.msi.
**@ECHO OFF
ECHO installer program now Installing on your PC .....
ECHO .
ECHO Please wait, Do NOT close this window .....
msiexec.exe /i installer.msi /quiet /qn
ECHO Installation is Complete
pause**
kaymaf
CODE CONVERTER SITE
http://www.carlosag.net/Tools/CodeTranslator/.
http://www.developerfusion.com/tools/convert/csharp-to-vb/.
Saturday, May 15, 2010 9:26 PM | 1 vote
You can test the batch file without running any program, so that you will understand it better
**@ECHO OFF
ECHO installer.msi now Installing on your PC .....
ECHO .
ECHO Please wait, Do NOT close this window .....
ECHO Installation is Complete
pause**
Above code in bold text you display the screen shot below when you run it
kaymaf
CODE CONVERTER SITE
http://www.carlosag.net/Tools/CodeTranslator/.
http://www.developerfusion.com/tools/convert/csharp-to-vb/.
Saturday, May 15, 2010 10:06 PM
Ok, i'll be straight forward with you.
I'll understand if you do not wish to help me.
This is my exact situation:
I'm working with a marketing company to monetize the application(Hoping everything goes well). I can't have an installer open or ever pop up. When the user opens the installer the company's "installer/product offers" pops up offering additional products and then eventually installs my program. So I can't have any window open at all. My end of the deal is to make the application installer "silent" and then they will do the rest.
Saturday, May 15, 2010 11:03 PM
Ok, i'll be straight forward with you.
I'll understand if you do not wish to help me.
what you mean by the above statement? Well, may be you should try to solve the problem on your own. Search on how to run batch file without console window or use vbscript. You can replace Pause by Exit in the batch file but the screen will still flash for second. By the way, for msi to run silent on Vista\7 you have to elevate the user, read this on MSI and UAC http://msdn.microsoft.com/en-us/library/aa372468.aspx
This what i can offer, you on your own
kaymaf
CODE CONVERTER SITE
http://www.carlosag.net/Tools/CodeTranslator/.
http://www.developerfusion.com/tools/convert/csharp-to-vb/.
Saturday, May 15, 2010 11:13 PM
Does this mean that you have another company somehow packaging your product with their installer? If this is the case, then it sounds outside of the advice kaymaf and I have provided. You would need to work with that packaging company. More than likely though, they will simply take your msi file and call it with the options we have outlined. They may tell you however they need your product in some other form, such as a zip file, a .cab file or .mmi file (I think that is what an installer merge file is tagged.)
--
Mike