How to install msi file in silent mode inside an InstallShield project - installshield

I have an InstallShield project which consists of two files and several folders,
MainSoftware.exe
AuxSoftware.msi
FolderA
FolderB
etc...
The main purpose of the project is just copying all of these files in the path specified by the user. It is very simple. However, after copying AuxSoftware.msi in the destination path, I need that a silent installation begins with this file. I know that a silent installation can be run by the following command:
msiexec /i AuxSoftware.msi /qn
But I don't know how to tell InstallShield that this command must be executed in the destination path after copying AuxSoftware.msi.
Could you please help me?
Thanks in advance

You can only execute one installer at a time once it is in the InstallExecuteSequence. Stein has a very good, brief explanation in the answer here.
I would suggest using a bootstrapper (setup.exe) that can install them in sequence.

Thanks for your suggestions. I found a way. They call it "nested installations". I created a Custom Action having the second .msi or .exe installer I want to run after a specific point in the process of the main installation.

Related

I cannot Uninstall Tcl from my linux system

I installed tcl to learn it, however, I installed all the files in the wrong location. I am trying to uninstall it, But the uninstall file does not work. I am trying to carry out the instructions form their website:
To uninstall ActiveTcl, run the "uninstall.tcl" script that is located in the directory where you extracted the ActiveTcl archive. Note that you must use the "wish" in the distribution you wish to uninstall. For example:
% /path/Tcl/bin/wish /path/Tcl/lib/ppm/log/ActiveTcl/uninstall_ActiveTcl.tcl
stored, by default, in the directory /lib/ppm/log/ActiveTcl. You must use the wish interpreter from the distribution you wish to uninstall. Ensure that you do not run the uninstall script from a directory that will be removed during the uninstallation.
For example:
% /path/Tcl/bin/wish /path/Tcl/lib/ppm/log/ActiveTcl/uninstall_ActiveTcl.tcl
Note: if you are uninstalling both ActiveTcl and Tcl Dev Kit, uninstall Tcl Dev Kit before uninstalling ActiveTcl.
There is no uninstall_ActiveTcl.tcl. I do see an "uninstall" file but it does not have an extension, and I do not know how to run it.
Any help is appreciated
Thank you
Try editing the file to a uninstall.tcl file and see if that works. Take a back-up first though. Because we might need that file later
I re-installed it in a new location, compared the files that were installed between the old and the new location and deleted the file sin the old location. Unfortunately I could not delete many of the hidden files, as I did not know if they were there originally or if they belonged to Tcl. I am really surprised and disappointed there is no easy way to uninstall tcl properly.
I strongly suspect that you should uninstall ActiveTcl as follows:
Open a command prompt
Change directory to where you found the install file - e.g.
$ cd path_to_Tcl_installation/bin
Run the file
$ ./uninstall
On linux systems, you don't need any particular file extension in order to be able to run a file.
I don't know CentOS but a little googling led me to a forum thread that describes how to open a command prompt.
Good luck

How to eliminate spaces for installation while writing Inno setup file?

I am creating an installer for my project where I am facing a issue.
The project is not running as expected if it is installed in the directory which contains spaces e.g: "C:\Program Files (x86)" and it is working fine if it is installed in a directory which doesn't contains spaces e.g: "C:\Python27".
So as per my understanding there is nothing wrong with project side and its all with the .iss code.
So can anyone please tell me how to solve this issue. Since most of the installers are created using Inno setup and they are installed in the program files there will be a way to solve this and which I am not aware of it.
Regards,
Bharathi
The issue is not with the spaces. My application creates a log file to log the data. Since the normal user doesn't have rights to create the file in the program files folder the application is not working... The application should be run as admin to work.
Create a symlink using mklink.
Create something like this in [RUN] section:
Filename: {cmd}; Parameters: "/c MKLINK /D {sd}\ProgramPathNoSpaces ""{pf}\Program Path With Spaces"; Flags: RunHidden;
Run your application inside the ProgramPathNoSpaces, using a shortcut with the "start in" property defined.
Hope this help you, but everyone is right. The problem is in the application, this is only a workaround.

setup.iss file is not generated

I have a installshiled project which generates setup.exe file. I'd like to enable silent install by generating proper setup.iss file. I ran the following command:
Setup.exe /r
which lunched the installer, but it never created the setup.iss file. I looked in C:\Windows as the documentation suggested, as well as some other locations (local directory, program files etc.)
Why isn't it created and how to fix?
Thanks,
Ok I found the problem, and a workaround:
The problem was that my msi project was a Basic MSI Project, as opposed to InstallScript and InstallScript MSI projects. This kind of project does not support reading a response file (aka setup.iss). However, there is a way to perform silent installation for the .msi / setup.exe file:
Setup.exe /s /v"/qn"
will do the trick.
All of this information can be found here
Another option is to explicitly state where you want the setup file generated, using the /f1 option:
Setup.exe /r /f1"C:\your\path\here\setup.iss"
Documentation on this can be found here, but here is a summary from that link:
Using the /f1 option enables you to specify where the response file is (or where it should be created) and what its name is, as in Setup.exe /s /f1"C:\Temp\Setup.iss". Specify an absolute path; using a relative path gives unpredictable results. The /f1 option is available both when creating a response file (with the /r option) and when using a response file (with the /s option)

How do I fix MSB3073 error in my post-build event?

I'm working on a project that requires that DLLs generated by building my solution to be copied from the bin folder to another folder, both of which are on my machine, in my C drive. I've written a batch file that uses xcopy to accomplish this, which you can see here:
xcopy /s /y /q "C:\Users\scogan\Documents\Visual Studio 2012\Projects\Organizr\Server\bin\Debug\Organizr.Services.dll" "C:\inetpub\wwwroot\AppServer\bin\"
xcopy /s /y /q "C:\Users\scogan\Documents\Visual Studio 2012\Projects\Organizr\Server\bin\Debug\Organizr.Services.pdb" "C:\inetpub\wwwroot\AppServer\bin\"
Now, I've tried numerous iterations of this file, which is located at:
C:\Users\scogan\Desktop\CopyFiles.bat
so my post-build event command line looks like this:
call C:\Users\scogan\Desktop\CopyFiles.bat
I've run this batch file on its own with two text files in folders on my desktop, and it works fine. I've also run it as it is with the files I need to copy on its own, and that works fine, too. However, when I try to run this as a post-build event, I get this output:
1> Organizr -> C:\Users\scogan\Documents\Visual Studio 2012\Projects\Organizr\Client\bin\Debug\Organizr.exe
1> File not found - Organizr.Services.dll
1> 0 File(s) copied
1> 0 File(s) copied
1> File not found - Organizr.Services.pdb
1>c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4291,5): error MSB3073: The command "call C:\Users\scogan\Desktop\CopyFiles.bat" exited with code 4.
I've done some research, and found that error code 4 means that "Initialization error occurred. There is not enough memory or disk space, or you entered an invalid drive name or invalid syntax on the command line."
I've also looked up what MSB3073 is, and haven't really found much that can help me there. So, my question is what am I doing wrong? Are the absolute paths messing it up? Any help here is appreciated.
Playing around with different project properties, I found that the project build order was the problem. The project that generated the files I wanted to copy was built second, but the project that was running the batch file as a post-build event was built first, so I simply attached the build event to the second project instead, and it works just fine. Thanks for your help, everyone, though.
Prefer the MsBuild "Copy" task in an AfterBuild target over a post-build event.
Append this Target into your project file and remove the PostBuildEvent.
<Target Name="AfterBuild">
<Copy SourceFiles="C:\Users\scogan\Documents\Visual Studio 2012\Projects\Organizr\Server\bin\Debug\Organizr.Services.*"
DestinationFolder="C:\inetpub\wwwroot\AppServer\bin\"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
</Target>
For what it's worth, the problem in my case was caused by using '/' as the directory separator in a copy command. Must use backslashes.
In my case, the dll I was creating by building the project was still in use in the background. I killed the application and then xcopy worked fine as expected.
The specified error is related to the post built event. Somehow VS tool is not able to copy the files to the destination folder. There can be many reasons for it. To check the exact error cause go to Tools > Option> Project and Solution > Built and run, and change "MsBuild project build output verbosity" to "Diagnostic". It will give you enough information to detect the actual problem.
This is too late but posting my experience for people looking at it later:-
In MS VS 2010 I had the same issue. It got resolved by putting quotes to post build copy command args which contained spaces!
In Project Properties --> Configuration Properties --> Build Events --> Post-Build Event --> Command Line change:
copy $(ProjectDir)a\b\c $(OutputPath)
to
copy "$(ProjectDir)a\b\c" "$(OutputPath)"
If the problem still persists even after putting the after build in the correct project try using "copy" instead of xcopy. This worked for me.
The Post-Build Event (under Build Events, in the properties dialog) of an imported project, had an environment variable which was not defined.
Navigated to Control Panel\All Control Panel Items\System\Advanced system settings to add the appropriate environment variable, and doing no more than restarting VS2017 resolved the error.
Also, following on from #Seans and other answers regarding multiple project races/contentions, create a temp folder in the output folder like so,
and select the project producing the preferred output:
and build (no rebuild/clean) is a speedy solution.
Following thing you should do before to run copy command if you facing some issue with copy command
open solution as a administrator and build the solution.
if you have problem like "0 File(s) copied" check you source and destination path. might you are using wrong path. it would be better if you run the same command in "command prompt" to check whether it is working fine or not.
I solved it by doing the following:
In Visual studio I went in Project -> Project Dependencies
I selected the XXX.Test solution and told it that it also depends on the XXX solution to make the post-build events in the XXX.Test solution not generate this error (exit with code 4).
I've found the issue happens when you have multiple projects building in parallel and one or more of the projects are attempting to copy the same files, creating race conditions that will result in occasional errors. So how to solve it?
There's a lot of options, as above just changing things around could solve the issue for some people. More robust solutions would be...
Restrict the files being copied i.e. instead of xcopy $(TargetDir)*.*"... instead do xcopy "$(TargetDir)$(TargetName).*"...
Catch the error and retry i.e:
:loop
xcopy /Y /R /S /J /Q "$(TargetDir)$(TargetName).*" "somewhere"
if ErrorLevel 1 goto loop
Use robocopy instead of xcopy
You probably won't want to do this as it will increase your build times, but you could reduce the maximum number of parallel project builds to 1 ...
I had the same problem for my Test project. I found out why my post build event wasn't working and that's because I was copying files before running the $(ProjectName).exe command and some of these files were required for Test project itself. Hence, by just moving $(ProjectName).exe as the first command fix the issue.
I faced this issue recently and surprisingly only i was having this problem and none of my team members were facing this issue when building the project code.
On debugging i found that my code directory had spacing issue , It was D:\GIT Workspace\abc\xyz.
As a quick fix i changed it to D:\GITWS\abc\xyz and it solved the problem.
I was getting this error after downloading some source code from Github. Specifically the rust oxide development framework. My problem is that the Steam.ps1 script file, that's used to update some of the dlls from Steam was blocked by the OS. I had to open the files properties an UNBLOCK it. I had not realized this was done to ps1 files as well as exes.
In my case a setting mismatch between Project's Configuration Properties->General->Output Directory setting and Linker->General->Output Directory.
There was a warning about it during linking.
I was facing a similar issue where it said it cannot copy a DLL from my build location to destination. The issue was my project path contained spaces, removing them the error was gone.

Installshield Silent Install Log

I've been given a silent install from a 3rd party (made with Installshield) I need to include as part of the project I am working on at the moment.
I've got it all working right up until I burn it to a DVD and attempt the install.
Installshield in silent install mode writes a log file to the same directory as setup.exe. Being on a DVD this is a read only folder.
I see I can change the default location of the log file using a command line switch, but is there a way to make it not create one at all?
I struck the same problem. I tried:
Setup.exe /s /f2null
And I couldn't find a log file anywhere afterwards...
For each setup.exe that build by installsheild, you can use f2"logpath" parameter to specify the log file in your own script.
If 3rd party "setup.exe" creates a log automatically - the easiest solution it redirect this log to %temp% directory.

Resources