Jump to content

Installshield


Recommended Posts

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.

Link to comment
Share on other sites


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.

Link to comment
Share on other sites

?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.html

Google this for "in-house" tips

how to create a self-extracting installer with 7zip site:msfn.org

Basically, 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 by submix8c
Link to comment
Share on other sites

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 %~dp0
myob.exe /s /v"/qn SERIAL=000000000000"

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Thanks Sub & Mike

You 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

Link to comment
Share on other sites

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 %~dp0
myob.exe /s /v"/qn SERIAL=000000000000"

Hi Mike

Tried 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 by MAVERICKS CHOICE
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...