June 26, 201313 yr Hi Guys, having a little trouble getting my head around this script to install my accounting package will run ok from the following path & script, though prefer to package & run from any Dir?Here's the code: C:\"MYOB.exe" /s /v"SERIAL=000000000000" -f1"C:\setup.iss"If I omit the path invokes an install momentarily, it's probably blatantly obvious?Appreciate any advice or suggestions.
June 27, 201313 yr So, is that supposed to be a CMD/BAT script? You have a link to AutoIT in your siggy - is that what you used? Your question is WAY to vague without supporting information.
June 27, 201313 yr Author So, is that supposed to be a CMD/BAT script? You have a link to AutoIT in your siggy - is that what you used? Your question is WAY to vague without supporting information.Yes that's right, just a batch script once the script is sorted will package with 7Z.
June 27, 201313 yr ?Have you tried using the following method?"%~dp0MYOB.EXE" / "%~dp0SETUP.ISS" That variable expands to Current Directory (short path names with Tilde). Double-click and BOOM. HOWEVER, you want to package it with 7-Zip so you'll PROBABLY want to use the User Temporary directory?Here's a pretty complete variables list - http://ss64.com/nt/syntax-variables.htmlGoogle this for "in-house" tipshow to create a self-extracting installer with 7zip site:msfn.orgBasically, have 7-Zip "dump" it into a UserTemp\RandomName and insert the Variables into the Script, run the Script.makedir "%temp%\%random%"There's your generated Temp folder name.HTH Edited June 28, 201313 yr by submix8c
June 28, 201313 yr Author just tried your suggestion, "%~dp0MYOB.EXE" /s /v"SERIAL=000000000000" -f1"%~dp0setup.ISS"Though not working. Edited June 28, 201313 yr by MAVERICKS CHOICE
June 28, 201313 yr Hi MC,If you recorded the setup.iss then silent install should work, so I will mention some things that may help.1. If the setup.iss is in the same directory as the setup file then the f1 switch is usually not needed. I cannot state if working directory affects this though if concerned, try cd /d %~dp0 in your cmd script before calling the setup file.2. If the f1 switch is supported by the installer, then perhaps the f2 is as well for the log file. If you are installing from read only media then Installshield may try to create a install log file in the same directory as the setup file. If the directory is read only then the install process may fail. If so then try adding to the command line /f2"%tmp%\setup.log". Create a unique filename for the log like say a password generator does so it does not conflict with another file.3. I notice that you are not passing /qn to the msi. The answer file set.iss may not be read by setup if it is not silent.This would be what I would try.cd /d %~dp0myob.exe /s /v"/qn SERIAL=000000000000"
June 28, 201313 yr And also JUST NOTICED that you used the FIRST CodeBox I gave. I HOPE that your testing a CMD file that you double-click on because that's the way THAT one is "supposed" to work. You DID look at the SS64 link I gave, right?I had "inadvertantly" not made an "actual" (second) CodeBox with the "temp" stuff.Question (in reference to above post) - you're using an MSI-type Package? We have NO CLUE how you created this! MSI is VERY picky about pathnames!Can you provide the ISS script? There is ANOTHER topic a Member created about this stuff that he REFUSED to "reveal" any particulars.
June 28, 201313 yr Author Thanks Sub & MikeYou both nailed it here for us silly me was running the script from an elev cmp prompt instead from the batch file!I put the prog. setup.iss & .bat all in the same dir & now works flawlessy.Thanks again for all your suggestions
June 28, 201313 yr Author Hi MC,If you recorded the setup.iss then silent install should work, so I will mention some things that may help.1. If the setup.iss is in the same directory as the setup file then the f1 switch is usually not needed. I cannot state if working directory affects this though if concerned, try cd /d %~dp0 in your cmd script before calling the setup file.2. If the f1 switch is supported by the installer, then perhaps the f2 is as well for the log file. If you are installing from read only media then Installshield may try to create a install log file in the same directory as the setup file. If the directory is read only then the install process may fail. If so then try adding to the command line /f2"%tmp%\setup.log". Create a unique filename for the log like say a password generator does so it does not conflict with another file.3. I notice that you are not passing /qn to the msi. The answer file set.iss may not be read by setup if it is not silent.This would be what I would try.cd /d %~dp0myob.exe /s /v"/qn SERIAL=000000000000"Hi MikeTried your suggestion though it invokes the installer momentarily & then immediately shuts the program down.You mention good point of the "setup.log" as it writes to the same Dir as it was run. Thinking then the prog may fail if ran from non writable media? More testing to do! Edited June 28, 201313 yr by MAVERICKS CHOICE
Create an account or sign in to comment