I have two MSI installers,BasicInstaller.msi and updateInstaller.msi.As name suggests,the updateInstaller.msi is a updated version(with some new files added) of basic installer.I have installed Basic installer in UI mode where i have mentioned the installation path as "D:/MSIApp".
I am installing the updateInstaller.msi in silent mode using msiexec.cmd(this goes into a bat file) that overwrites the files and registry entries created by BasicInstaller.msi. I am able to install it using the below command
msiexec /i updateInstaller.msi /qn TARGETDIR=D:/MSIApp
Now,i am looking for logic where in the installated path of basicInstaller is picked up and updateInstaller is installed at the same location.In short,i want to avoid TARGERDIR switch hard coding.
If i don't specify TARGETDIR in the msiexec,the updateInstaller is installed at the default "C:/programfiles/..." location.
Could some one help me with the possible solution options.Any help appreciated.
This is usually accomplished by having the installer lay down an InstallPath (or similarly named) registry entry. Subsequent installers can read the entry and use it as their installation path.
See this page for an example.
Related
All of the below on Windows 7 Machines and regarding Notepad++ installation / uninstallation:
Uninstaller
When I try to uninstall using the command
if exist "C:\Program Files (x86)\Notepad++\uninstall.exe" "C:\Program Files (x86)\Notepad++\uninstall.exe" /S
there are some files left in the Notepad++ file afterward. Notepad++'s uninstaller, when run manually, prompts halfway through the uninstall asking "Do you want to keep your custom settings" and I'm thinking that the command may be choosing to answer this "Yes" by default. I'm wondering if there's an easy way to have it choose "No" here instead. If not, I can probably just delete the folder.
Installer
I'm running the installation using the 32 bit default .exe file from Notepad++ in a deployment package compiled in Lansweeper. What I'm noticing is that presently, the package executed the CMD uninstall command, but stops short of installing the new version. For reference, I've been using an installed 7.3.2 and the installer for 7.3.3 to test, so that it should uninstall the 7.3.2 and install 7.3.3 by the end of the package.
I'm wondering if the fact that there are a number of options in the Notepad++ installer could be the culprit here. If it is better to install via command line or to include some sort of configuration file I'm fine with either option, just not especially well-versed in doing them.
Notepad++ Installer requests the following during installation:
Select a language - should choose English
Choose Components - want to be able to customize selection of localization / auto complete / themes / context menu / plugins / auto update according to our requirements
Choose Components - Don't use Appdata, Allow Plugins to be loaded from Appdata, and Create Shortcut on Desktop should all remain unchecked
Run Notepad ++ - should be unchecked (checked by default)
All the other components that I can see are straightforward Next / I Agree buttons.
I'm hoping someone may be able to make helpful suggestions here as I've not had any experience with configuring silent installs with specific parameters. Notepad++ doesn't seem to have its own MSI and I won't use a third party one so some sort of batch or configuration file or flagging options in cmd if possible are the preferable options.
Please let me know if there's any additional information I can provide that may be helpful.
Thank you in advance.
If you just need to update to the latest version. It is quite simple. Run the newest installer again and it will automatically update older versions.
See
Silent Install Notepad++
I'm using the command:
start /wait npp.7.2.Installer.x64.exe /S
Didn't show any interface during silent installation.
Notepad kicks a secondary process that doesn't finish until success is evaluated.
try:
"%ProgramFiles(x86)%\Notepad++\uninstall.exe" /S
timeout 5
I need to run a .bat file after .msi installation in Wix. I have created this .msi from Wix setup project.
In the .bat file, I have written scripts which edit the etc/hosts files and install some fonts into windows machine as per my application need.
Please help me to resolve my issue.
Thanks.
It's possible to run a .BAT but that's really to do things like set up a java classpath and launch a java application. Not to make additional changes to the machine.
There are several issues with your design.
1) The UI sequence shouldn't run with elevated permissions so the .BAT won't have rights to do the things you want to do
2) The changes are being made outside of the installation transaction so there's no support for rollback or uninstall
3) The changes are being made by a script that has no support for logging or error handling. It'll be fragile.
4) Because the changes aren't expressed in Windows Intaller tables you loose the expressiveness and transformability that MSI provides.
The .BAT should be refactored and likely eliminated. The "how do I xyz?" questions for each thing it does (install a font, modify a file...) should each be their own StackOverflow question.
<CustomAction Id="RunBatch"
Execute="deferred"
Return="ignore"
Impersonate="no"
ExeCommand=""[SystemFolder]cmd.exe" /C "[INSTALLDIR]mybatchfile.bat""
Directory="INSTALLDIR"/>
<InstallExecuteSequence>
<Custom Action="RunBatch" Before="InstallFinalize"/>
</InstallExecuteSequence>
I need to run Jboss 7 as service.
Followed these steps :-
Copied my Jboss to C:\Program Files <86>
Downloaded Jboss-native-2.0.10-windows-x64-ssl and copied the contenst of bin catalog to %JBOSS_HOME%/bin
Changes done on service.bat as per link instructions
https://community.jboss.org/message/724488
Changed my dir location to my Jboss bin
and given command service.bat install
C:\Program Files \jboss7>bin>service.bat install
Failed installing JBAS50SVC
Access is Denied.
Service JBoss Application Server 7.1.1 installed.
I'm not able to rectify this problem .
It appears to be windows access issue.
Try the following:
Does the windows ID you are using have Administrator privileges? If no, get a Admin ID else if Yes, proceed to step 2.
Try to do the same but in some other drive (not c: )
UPDATE #1 : OP says he can not see the output of service.bat file
Follow the following steps
Open start menu
Search for "cmd"
Right click "cmd" and run as Administrator
type in following command
cd C:\Program Files \jboss7\bin
Type service.bat and observe the output
On a 2008 Windows Server this occurs because you're not running the command line as an administrator. Those of us who have spent considerable amounts of time on 2003 server, and others before that, keep forgetting that your logged in ADMIN level account does NOT get passed to the command line automatically like with previous versions of Windows.
With any additional errors, past this one, I would keep going back to the service.bat file and looking at the path statements, throughout that file, to ensure that they are all correct to reach what is correct for your installation.
Also, don't forget to create a log folder under standalone (unless you're doing a domain install). Failure to do that will also cause issues as well.
yoda
I know there's a lot of information on here about installing python packages, but I'm quite new to python and I think I need a more "for dummies" level of help.
I was trying to install openpyxl for which as far as I can tell I need easy_install, for which, as far as I can tell, I need setuptools. I tried running the code provided here https://pypi.python.org/pypi/setuptools which is supposed to download and install setuptools (and according to some sites, easy_install aswell?) - it runs successfully, but help(modules) doesn't show setuptools or easy_install as modules, I have no idea whats installed and what isn't, or how I'm supposed to install any of it!
Essentially I'm very confused, very frustrated and really need someone to talk me through (in idiot-speak) what I'm supposed to do.
Thankyou!
We all start somewhere, I was there two weeks ago.
I'll assume you're using Python2. I believe Distribute and Pip are recommended for Python3 (which I will be using as examples). I will also assume you are on Windows.
First, python needs to be registered to Path. To check if this has been done automatically, open a command prompt (start -> programs -> accessories), and type 'python', then enter. If it returns the version number, etc, skip down a bit. If it throws an error, you need to add Python to Path.
Adding Python to Path
To add Python to Path on a Windows computer, go to:
Control Panel -> System -> Advanced Settings -> Environment Settings -> System Variables
Scroll down to select path, then click edit. Copy the entire line to a text document, and add your install directory for Python.exe (and the scripts folder) using ';' as a delimiter between different directories. Copy this back to Path and save. (Additionally close your command prompt window to reset it.)
For my Windows 7 machine, I added:
;C:\Python33;C:\Python33\scripts;
Take care when editing this file. There are many videos out there describing this in detail if you feel unsure about changing this.
Installing Modules (Such as setup_tools)
Once Python is registered in the Path file, download and unzip setup_tools to a folder within your Python install directory called 'modules'. I use ExtractNow to unzip, as it will unzip twice (as required) automatically.
Open a command prompt window again, and direct it to change directories by typing
cd [directory for module you want to install]
On my computer, this would be
cd C:\Python33\modules\distribute-0.6.40
Again, I use distribute, rather than setup_tools as it sounds like you need would for Python2. Simply use the appropriate directory. Press enter to change the directory.
Once you've entered this and it shows a changed directory, type:
python setup.py install
This indicates that you want to use the program python to use the setup.py file in the specified folder to install the module. This should be successful, and will write many lines of code.
If you want to install other modules, you would install them in a similar way. Python would automatically use setup_tools on your computer to finish each install.
Remember to import at the start of your script when using them to code:
import [module]
Happy Programming!
i am searching for hours now, a way that could allow me to install (optionally) a custom firefox extension along with my software installation package.. i can't find anything useful tho. Tried the registry method, the -install-global-extension method, the "Copy to extensions path" method... but nothing seems to work.
Any ideas on how to let the user chose if he wants to install my extension after my package install is finished?
You have this tagged "batch" so I'm assuming you are looking for a way to install extensions from the command line using batch format.
What is the output if you were to use something like this?
for %%e in ("path to extensions\*.xpi") do "firefox.exe" -install-global-extension "%%e"
I have an Nsis installer that in one of its steps copies a Firefox extension to the extensions directory. That works for every Firefox version from 3.0 to 4.0.
First it finds out which is the directory for the default profile, following this pattern: %APPDATA%\Mozilla\Firefox\Profiles*.default. Once profile name is determined (for example "4v3vxq80"), it copies the extension to %APPDATA%\Mozilla\Firefox\Profiles\$1\extensions (where $1 is the profile name).
I think the key is that all these steps are performed when Firefox is not running (I check for a running firefox.exe at the beginning).
Let me know if you want the nsis code that does the trick.