I am trying to install a program silently (the program is old, has InstallShield v7.00). However, every time I run the command, it does nothing and the setup.log file states "ResultCode=-8".
That ResultCode indicates that an invalid path to the InstallShield Silent installation script file was specified (which I am assuming to be the response file I generated earlier, which is named setup.iss).
Setup.exe and setup.iss are both in the same folder. I tried specifying the exact path to both files, and not, as seen in the list of commands I have tried below:
"C:\Test\setup.exe" /s /f1"C:\Test\setup.iss"
setup.exe /s /f1 setup.iss (CMD directory is in C:\Test)
setup.exe /s (Thought it would just find the setup file automatically as they are in the same folder)
I am trying to install EPSON OPOS ADK, for which the installation manual states the exact commands I am using are correct.
There is no MSI file contained in the EXE file (or, if there is, I cannot extract it with WinRAR and I could not find it in ProgramData while the setup was running).
Does anyone know what I am doing wrong or what I can do?
EDIT: Below is the contents of my setup.iss file:
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-DlgOrder]
Dlg1={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdWelcome-0
Count=7
Dlg2={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdLicense2-0
Dlg3={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdSetupType-0
Dlg4={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdStartCopy-0
Dlg5={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-AskOptions-0
Dlg6={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdFinish-0
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdWelcome-0]
Result=1
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdLicense2-0]
Result=1
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdSetupType-0]
szDir=C:\Program Files (x86)\OPOS\Epson2
Result=301
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdStartCopy-0]
Result=1
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-AskOptions-0]
Result=1
Sel-0=1
Sel-1=0
Sel-2=1
Sel-3=0
[Application]
Name=EPSON OPOS ADK
Version=031.000.01000
Company=SEIKO EPSON CORPORATION
Lang=0009
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
EDIT 2:
So I ran the recording for the .iss file again, but this time instead of just doing "setup -r", I did "setup -r f1"C:\"" instead. This should make no difference other than telling it where to save the recording. However, I got a different .iss file out of it. Here it is:
[InstallShield Silent]
Version=v7.00
File=Response File
[File Transfer]
OverwrittenReadOnly=NoToAll
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-DlgOrder]
Dlg0={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-Uninstall-0
Count=7
Dlg1={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdWelcome-0
Dlg2={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdLicense2-0
Dlg3={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdSetupType-0
Dlg4={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdStartCopy-0
Dlg5={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-AskOptions-0
Dlg6={0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdFinish-0
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-Uninstall-0]
Uninstall=0
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdWelcome-0]
Result=1
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdLicense2-0]
Result=1
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdSetupType-0]
szDir=C:\Program Files (x86)\OPOS\Epson2
Result=301
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdStartCopy-0]
Result=1
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-AskOptions-0]
Result=1
Sel-0=1
Sel-1=0
Sel-2=1
Sel-3=0
[Application]
Name=EPSON OPOS ADK
Version=031.000.01000
Company=SEIKO EPSON CORPORATION
Lang=0009
[{0EEDEE2B-7C9D-4584-B2B5-C28C93678BC1}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
I was very happy when I saw it was different, and figured my issue would be solved. Well, not exactly.
Now, instead of getting ResultCode = -8, I am getting ResultCode = 0. A code of 0 indicates there was a successful installation. However, the program did NOT install. Nothing was touched. I noticed this before even looking at the code because it finished "installing" almost immediately after running the command, with no loading icons or anything.
So now, InstallShield is reporting that the program was successfully installed but it, in actuality, was not. I tried re-recording the .iss file numerous more times but I am just getting this same file now. The file is likely no longer the issue. However, I am at a loss for what the issue could be now.
Setup.iss: I guess the real problem might be that there is an error in your setup.iss file. Can we see its content? Maybe the setup.iss you are using is for another Setup.exe entirely? Try re-generating a new one?
UPDATE: Maybe have a look here as well: Epson OPOS ADK for .NET drivers for Windows 7
That silent.iss response file seems to lack a header section when compared with this documentation: Performing Silent Installations and Uninstallations (PDF, section "InstallScript Installations" page 3 onwards).
Setup.exe Extract: Maybe also make sure that this is not an MSI setup after all:
Short version: Programmatically extract contents of InstallShield setup.exe
Long version: Extract MSI from EXE
And:
Extracting from an MSI (administrative installation).
How to deploy the Installshield MSI without having to run Setup.exe
Sample Setup.exe Command Lines: For inspiration an ancient Itninja / AppDeploy PDF with sample Installshield setup.exe commands (I think the last few entries in the document were never finished, they just all say Setup.exe /uninst - so just ignore them). Did you try the /SMS parameter? I don't see how that would solve your particular problem, but you should know about the switch anyway.
Some Links:
InstallShield Error Codes (Setup.log)
InstallShield Setup Silent Installation Switches
Performing Silent Installations and Uninstallations (PDF)
EPSON OPOS ADK for .NET Manual (PDF)
Installshield 2018 Help File:
Setup.exe and Update.exe Command-Line Parameters
Advanced UI and Suite/Advanced UI Setup.exe Command-Line Parameters
Setup.exe (InstallScript Projects)
Related
I plan to reinstall the operating system on my secondary computer but don't want to lose the entire current file associations open with 2 programs are Notepad++ and Winrar because I have added quite a few other file extensions opened with these 2 programs.
I tried to follow the instructions Export or Import Default Application Associations with the command line:
Dism /Online /Export-DefaultAppAssociations:"C:\AppAssociations.xml"
But it was the command line designed on Windows 10 and above, I received an error after trying it on Windows 7:
Error: 87
The export-defaultappassociations option is unknown. For more information, refer to the help by running DISM.exe /?.
I also tried exporting the FileExts key (at HKCU/Software/Microsoft/Windows/CurrentVersion/Explorer/FileExts) and then merging after installing the operating system but nothing changed, still unable to restore the file association data.
I plan to export all current data via the ftype and assoc commands, however, the data returned by these 2 commands has the following problem:
With the assoc command: Only the default file extension data is associated with Winrar, there are no custom file extensions added by me and opened with Winrar, and there is no file extension data opened with Notepad++.
With the ftype command: I see 3 results with Winrar:
WinRAR="C:\Program Files\WinRAR\WinRAR.exe" "%1"
WinRAR.REV="C:\Program Files\WinRAR\WinRAR.exe" "%1"
WinRAR.ZIP="C:\Program Files\WinRAR\WinRAR.exe" "%1"
And there is absolutely no notepad++.exe in the output.
So I need a method (command line, software,...) that can help me export/import current file associations data (at least of 2 programs Notepad++ and Winrar).
I will appreciate the method you give.
I'm having difficulties trying to setup a startup task in an Azure role.
The ultimate goal is to disable RC4 cipher, along with other SSL configurations. In my (VS2012Express) project (solution partially achieved following another answer here in SO that led me to https://gist.github.com/sidshetye/29d6d48dfa0c2f5488a4 ) I created a Startup.cmd file like this:
# Execute powershell command to disable RC4 and imporve SSL security settings
ECHO Batch started >> "StartupLog.txt" 2>&1
PowerShell -ExecutionPolicy Unrestricted .\HardenSSL.ps1 >> log- HardenSSL.txt 2>&1
EXIT /B 0
HardenSSL.ps1 is the PowerShell script from the previous link. Both the .cmd and .ps1 scripts are placed in the application root directory, marked as "Content" with properties set to "CopyLocal=Always".
In my service definition, I put this:
<Startup>
<Task commandLine="Startup.cmd" executionContext="elevated" taskType="background"></Task>
</Startup>
Now, when I deploy the application to Azure, "nothing" happens. I configured the role instance to allow remote desktop, connected to the machine. I verified the scripts where published, and there were no log files, RC4 still enabled. I tried to manually run the .cmd and the machine runs the scripts to completion, disables RC4 and restarts. So the scripts are actually "correct".
The problem is that the scripts are not getting fired up at startup. I may be wrong, but I don't see anything related looking Windows events. Actually, the server now keeps all the configurations, but I have to be sure the scripts get executed in case I'll have to publish to new instances/cloud services.
I also tried to:
1. place the scripts on a child directory
2. create other 2 "simpler" .cmd that just create a log file with "script started" to exclude problems related to the .cmd calling the PowerShell script.
None of those scripts got executed.
Hope I've been sufficiently clear, any help would be greatly appreciated.
Thank you in advance,
Alberto
UPDATE 1
Reading through various discussions, I missed one very important thing: the script files are actually published in 2 distinct places, one being inside the /bin folder.
Ex: I placed my scripts in a /StartupScripts folder in my project, and when I connect via Remote Desktop to the Azure server I find the scripts both in "approot/StartupScripts" and in "approot/bin/StartupScripts".
The scripts the are actually executing are those placed inside the "bin" folder. the real problem is that I have probably a path problem inside the .cmd since I now found the execution logs with an error.
Now I will try to change it up and update the question here on SO.
Ok.
In the end it was indeed a problem with a path in my Startup.cmd file: .\HardenSSL.ps1 could not be found if the StartUp Task pointed to a subfolder.
Solution was to place both Startup.cmd and HardenSSL.ps1 files in the application root, remove the ".\" part when calling the PowerShell Script and all worked well.
Anyway, I would like to suggest anyone to pick this other solution I found in stack exchage:
https://security.stackexchange.com/a/79957
It links to a NuGet package that does the same thing as the script I found on the link to github in the original post, just "better"; mainly:
Better configuration of cipher suites, with support for ForwardSecrecy for all reference browsers on SSLLabs
Retain SSL support for Internet Explorer 8 on windows XP (unfortunately still a necessity for us)
Alberto.
I am working with Installshield 2014 and 2011. I'm using major upgrades and automated build scripts to handle the build. InstallShield is the stand alone build ver. for both.
Now everything worked fine with Installshield 2011 on windows 2003 servers. I could use the automation interface to open a project, change the product code (for the major upgrade) then save it right before building the installer.
The code for such is in a vbs file as such:
Dim oISM, oGUID
Set oGUID = CreateObject("InstallShield.GUID")
Set oISM = CreateObject("IswiAuto17.ISWiProject")
oISM.OpenProject strInstallShieldProjectFile
oISM.ProductCode = "{" & oGUID.CreateGUID( ) & "}"
oISM.SaveProject : oISM.CloseProject : set oISM = Nothing
Now we've upgraded to windows 2012 servers and InstallShield 2014. I've double checked and according to InstallShield the only change needed is the ver number (17 changes to 21).
But now nothing works. If I take the code out and put it in it's own vbs file for testing and run it, I get this:
ActiveX component can't create object: 'InstallShield.GUID'
Looking on google I see that's from running in 64 bit mode.... but I'm not. I'm running a cmd prompt in 32 bit mode.
http://helpnet.flexerasoftware.com/installshield18helplib/AutomationInterface64Bit.htm
I tried calling the script with:
%WINDIR%\SYSWOW64\cmd.exe /c cscript
as suggested here:
How do I run a VBScript in 32-bit mode on a 64-bit machine?
and other places. This did not work as I got the same error.
I tried removing that line as I'm sure I can create a guid another way, and reran it.
Then I got this when it tries to create the project:
Unknown runtime error: 'CreateObject'
Once again google came up and I checked:
https://community.flexerasoftware.com/showthread.php?189788-Automation-error
and couple others. I tried ensuring the dll was registered using the regsvr32 and it said it was successful. But after rerunning, it gave the same error.
I tried directly coping the command from the InstallShield documentation to ensure no spelling mistakes but again same error.
I even tried switching the case of the "sw" as mentioned here:
Installshield Automation is failing while running vbscript with error unable to create object
Again though, same error.
I also tried switching to powershell as powershell is much easier to debug and read.
The powershell code is simple and is as follows:
$oIsm = new-object -comobject IswiAuto21.ISWiProject
$oISM.OpenProject("$file")
$oISM.ProductCode = "{" + [guid]::NewGuid() + "}"
$oISM.SaveProject(); $oISM.CloseProject(); $oISM = $null
But this also does not work despite these saying it should:
https://community.flexerasoftware.com/showthread.php?190769-Automation-using-Powershell
http://blogs.flexerasoftware.com/installtalk/2011/01/getting-started-with-installshield-automation-and-powershell.html
When I use the 32 bit powershell I get this error:
new-object : Creating an instance of the COM component with CLSID {78D393F9-76E3-438C-9CAB-6664EF5FE1F2} from the IClassFactory failed due to the following error:
800a801d Exception from HRESULT: 0x800A801D.
If I run solely the vbs without a cmd prompt I also see the error of 800A801D in a pop up box.
How can I fix this? I'd like to use powershell but a vbs fix would help as well at this point. I have tried everything I can think of and google says I'm doing it correctly (32 bit powershell/cmd, registering the dll, creating the object, etc).
Did you install the automation interface? Typically it's an optional feature that's set to absent when you install InstallShield.
Typically the HRESULT should tell you what's wrong, or be so generic that it doesn't help. In this case, it's a bit of an enigma as I haven't found its definition anywhere. The leading 0x800A... indicates FACILITY_CONTROL and the trailing ...801d happens to match the tail of TYPE_E_LIBNOTREGISTERED (0x8002801D), but I don't know whether that's meaningful. Unfortunately FACILITY_CONTROL is defined by the control that issues the error, and that's not clear here.
Let's try to figure out what's wrong. My bet is on COM registration. If you want, you can skip to a likely fix by running regsvr32 C:\...\System\ISWiAutomation21.dll.
So let's follow what CreateObject("IswiAuto21.ISWiProject") will do. First it has to look up the ProgID:
C:\>reg query HKCR\ISWiAuto21.ISWiProject\Clsid
HKEY_CLASSES_ROOT\ISWiAuto21.ISWiProject\Clsid
(Default) REG_SZ {78D393F9-76E3-438C-9CAB-6664EF5FE1F2}
Then it has to look up the CLSID, and in this case, its InprocServer32 key:
C:\>reg query HKCR\Clsid\{78D393F9-76E3-438C-9CAB-6664EF5FE1F2}\InprocServer32
HKEY_CLASSES_ROOT\Clsid\{78D393F9-76E3-438C-9CAB-6664EF5FE1F2}\InprocServer32
(Default) REG_SZ C:\...\ISWiAutomation21.dll
ThreadingModel REG_SZ Apartment
If either of these are missing, it will be unable to find the COM server. In addition, the TypeLib subkey and the Type Library it references are both important:
C:\>reg query HKCR\Clsid\{78D393F9-76E3-438C-9CAB-6664EF5FE1F2}\Typelib
HKEY_CLASSES_ROOT\Clsid\{78D393F9-76E3-438C-9CAB-6664EF5FE1F2}\Typelib
(Default) REG_SZ {92278CC1-987E-4A01-940C-47DCADF27496}
C:\>reg query HKCR\Typelib\{92278CC1-987E-4A01-940C-47DCADF27496}\1.1\0\win32
HKEY_CLASSES_ROOT\Typelib\{92278CC1-987E-4A01-940C-47DCADF27496}\1.1\0\win32
(Default) REG_SZ C:\...\ISWiAutomation21.dll
If any of this information is missing, it will have to be repaired. The COM Server itself may need to probe several additional IDs at this point, so there's a chance that even if this subset is okay, there are others that are missing or corrupted. Self-registering the COM server should fix this. So should running the installation's repair.
Note that all of these queries were done using the 32-bit command C:\Windows\SysWow64\reg.exe, or you can peruse the registry visually with C:\Windows\SysWow64\regedit.exe.
I am following this documentation-https://code.google.com/p/tesseract-ocr/wiki/TrainingTesseract3
I am trying to make a font for my language using this command-
training/ text2image --text=training_text.txt --outputbase=bn.Boishakhi.exp1 --font=Boishakhi --fonts_dir=C:\
I am getting this error
"Training is not recognized as external or internal command", on windows xp sp3 command line.
I am also having another problem.I ran tesseract successfully in windows xp sp3(English default traindata) but I cannot run it from command line to generate output in Windows 7 and 8.1. The commands I used are as follows:
cd C:\
cd Program Files
cd Tesseract-OCR
tesseract C:\Document.tif output -l eng
Please help.
I tried to change /(slash) to \ (backslash) but now the new error is "Cannot find the path specified"
As far as running in windows 7 or 8.1 is concerned, the error is "cannot create output file output.txt"
The first message means that the executable training was not found on the path. If the required executable was text2image then the space should be removed and the correct directory-separator used. \ separates directories in Windows; / introduces switches.
So training\text2image... should cure the problem, provided text2image is an executable found in training which is a subdirectory of whatever is the current directory, or you could use an absolute path, "C:\wherever\you have installed\tessteract\training\text2image" - and "note the quotes" that are required if the path to the name includes spaces (optional otherwise.)
As for your second question, you have unaccountably provided no information about any error messages you received, or how the system responded, so any response will be a guess. It may have something to do with the default protected status of the root directory C:\ and it may not. Please edit the question to include the error message or run report.
I'm trying to install a custom build software on Windows Server 2008R2, 2008 and 2003. The software needs the "Desktop-Experience" feature from Windows to be installed.
I know I can check with servermanagercmd.exe (even though it's kind of cumbersome) in 2003 and 2008 - unfortunately, this does no longer work in 2008R2 (64bit) from inside an NSIS installer - it does work if I just run the command. Called from the installer, I'm getting a "servermanagercmd.exe is not recognized as an internal or external command, operable program or batch file."-error, even if I'm setting the working directory to c:\windows\system32 (yes, on a 64 bit machine, but there's no servermanagercmd.exe in sysWOW64).
Here's the line of code inside NSIS:
nsExec::ExecToStack 'servermanagercmd.exe -query | findstr "Desktop-Experience"'
In 2008R2, I thought the situation would actually improve, as PowerShell is now installed by default. However, when trying to get the information, I need to first load the ServerManager module inside PowerShell - but this module is not available for reading for Trusted Installer . So I'm facing the same situation again: If I'm running my powershell command from a command line, it works, but not from inside the NSIS installer.
Again, here's the line of code inside NSIS:
nsExec::ExecToStack 'powershell.exe "& "Import-Module ServerManager"'
The three(!) (double)quotation marks are actually correct.
So, does anybody know of a way to check whether Desktop-Experience is installed (and install it if not) in Windows Server 2008R2 from inside an NSIS installer? The solution does not need to work on Server2003 or 2008, because the string parsing from servermanagercmd.exe works there.
Are you using the macros in x64.nsh to turn off WOW64 redirection? (Or use "$windir\sysnative\servermanagercmd.exe")