Jump to content

Another Run or ShellExecute...


Go to solution Solved by BrewManNH,

Recommended Posts

Sorry for bugging you guys. I'm new to AutoIT and am having a problem with the run command not liking transforms, where as Shellexecute I can seem to get it to work.

So I have a Setup.exe that requires a transform to be passed along to the MSI that is inside of Setup.exe.

The command line run prompt is:

"Setup.exe" /v"Transforms="transform.mst" /passive"

I was able to get this command to work with ShellExecute:

ShellExecute("setup.exe" , '/v"Transforms="transform.mst"")

Unfortunately I know that the Run command is the better command to run in this case. I have not had luck in getting code to run properly without errors. Does anybody have an example I can look at of where a MST file is being passed along inside a setup.exe?

Sorry if this seems like a really stupid question. I have yet to find a run command that works properly.

Link to comment
Share on other sites

  • Moderators

And if, as you state, it is just an MSI wrapped in a Setup.exe, why not just extract the MSI and cut out the middle man?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

From what I understand ShellExecute is used more for opening files with their correct program. I read this on the forum somewhere. I don't have a lot of experience with using AutoIT, so I might be misguided on the thought that Run is typically used for Installations and Executables and ShellExecute is used for opening files.

I have tried several run commands:

Run('msiexec', '"setup.exe" /V"TRANSFORMS="transform.mst"")  is the most recent.

I unfortunately deleted the others when i was testing them in my script.

Link to comment
Share on other sites

And if, as you state, it is just an MSI wrapped in a Setup.exe, why not just extract the MSI and cut out the middle man?

Trust me I would love to do that. Unfortunately its a very poorly coded installation and the .MSI that is extracted does not contain everything that setup.exe is scripted to do. The way they built the installation is garbage.

Link to comment
Share on other sites

  • Moderators

Is it a commercial product? I consult a lot for application repackaging; if it is that bad I would love to tear it apart and use it as an example of what not to do.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Developers

From what I understand ShellExecute is used more for opening files with their correct program. I read this on the forum somewhere. I don't have a lot of experience with using AutoIT, so I might be misguided on the thought that Run is typically used for Installations and Executables and ShellExecute is used for opening files.

When it works and you do not need any of the other functionality of Run() then I would just use ShellExecute().

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Solution

Would this be better for you?

Run('setup.exe /VTRANSFORMS=\transform.mst\')

Or perhaps this?

Run('"setup.exe" /VTRANSFORMS="\transform.mst\"')

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Is it a commercial product? I consult a lot for application repackaging; if it is that bad I would love to tear it apart and use it as an example of what not to do.

 

lol its a Nuance product called EXEditor. Its by far the worst written installation I have ever seen. I am going to try and use AutoIT to write a script to go through the installation because the way they have built it, it cannot be automated to my knowledge. Most Installshield SETUP.EXE and MSI's are really simple to make the custom changes via MST answer files. The setup.exe scripts some installation to run half way through. Also making things tough is that custom SQL instances are created and cannot be repackaged using adminstudio.

Link to comment
Share on other sites

  • Moderators

lol its a Nuance product called EXEditor. Its by far the worst written installation I have ever seen. I am going to try and use AutoIT to write a script to go through the installation because the way they have built it, it cannot be automated to my knowledge. Most Installshield SETUP.EXE and MSI's are really simple to make the custom changes via MST answer files. The setup.exe scripts some installation to run half way through. Also making things tough is that custom SQL instances are created and cannot be repackaged using adminstudio.

 

You had me a Nuance, and you have the sympathies only another repackager could give for having to work with their products  :)

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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
 Share

  • Recently Browsing   0 members

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