tsicoupe Posted November 14, 2014 Share Posted November 14, 2014 (edited) Hello, I am having an issue getting this program to install correctly. If i run the following command in a command prompt it installs exactly how i want it to: msiexec /i "SMARTEducationSoftware.msi" INSTALL_NOTEBOOK=1 INSTALL_BOARD=1 ENABLE_MATH_TRIAL=0 INSTALL_RESPONSE=1 INSTALL_INK=1 DESKTOP_ICONS="" CUSTOMER_LOGGING=0 NB_PROD_KEY=XX-XXXXX-XXXXX-XXXX-XXXXX-AAA ACTIVATE_LICENSE=1 NETWORK_CONTENT=1 CONTENT_TARGET_PATH="domaindatasmartgallery" /qn i tried having a script open the command prompt and then use the send command to send that as a long keystroke but i keep getting syntax errors. I also tried to compile it using ShellExecute and i get the same syntax errors. I know its obviously something i am typing wrong but if you could help me out or if there is a better way of doing this i would appreciate any help. This is what i tried: Run("C:\Windows\System32\cmd.exe") WinWaitActive("C:\Windows\System32\cmd.exe") send('cd C:appssmart14.2)' & "{ENTER}") send("msiexec /i "SMARTEducationSoftware.msi" INSTALL_NOTEBOOK=1 INSTALL_BOARD=1 ENABLE_MATH_TRIAL=0 INSTALL_RESPONSE=1 INSTALL_INK=1 DESKTOP_ICONS="" CUSTOMER_LOGGING=0 NB_PROD_KEY=XX-XXXXX-XXXXX-XXXXX-XXXXX-AAA ACTIVATE_LICENSE=1 NETWORK_CONTENT=1 CONTENT_TARGET_PATH="domaindatasmartgallery" /qn{ENTER}") as well as ShellExecute("msiexec.exe" [, "/i "SMARTEducationSoftware.msi" INSTALL_NOTEBOOK=1 INSTALL_BOARD=1 ENABLE_MATH_TRIAL=0 INSTALL_RESPONSE=1 INSTALL_INK=1 DESKTOP_ICONS="" CUSTOMER_LOGGING=0 NB_PROD_KEY=XX-XXXXX-XXXXX-XXXXX-XXXXX-AAA ACTIVATE_LICENSE=1 NETWORK_CONTENT=1 CONTENT_TARGET_PATH="domaindatasmartgallery" /qn"]) Edited November 14, 2014 by tsicoupe Link to comment Share on other sites More sharing options...
Developers Jos Posted November 14, 2014 Developers Share Posted November 14, 2014 try: ShellExecute("msiexec.exe" , '/i "SMARTEducationSoftware.msi" INSTALL_NOTEBOOK=1 INSTALL_BOARD=1 ENABLE_MATH_TRIAL=0 INSTALL_RESPONSE=1 INSTALL_INK=1 DESKTOP_ICONS="" CUSTOMER_LOGGING=0 NB_PROD_KEY=XX-XXXXX-XXXXX-XXXXX-XXXXX-AAA ACTIVATE_LICENSE=1 NETWORK_CONTENT=1 CONTENT_TARGET_PATH="\\domain\data\smartgallery" /qn') 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 More sharing options...
Luigi Posted November 14, 2014 Share Posted November 14, 2014 (edited) try to answer the above! Edited October 19, 2019 by Luigi Visit my repository Link to comment Share on other sites More sharing options...
tsicoupe Posted November 14, 2014 Author Share Posted November 14, 2014 thanks that did work, lastly i am trying to delete a registry entry when that program is finished installing. This is what i did: ProcessWaitClose("msiexec.exe") RegDelete("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun", "SMART Floating Tools") only problem is msiexec stays running after the setup is complete so it never processes this command unless you manually end the process. Any suggestions on that? Maybe i could have it wait until a shortcut file exists then process that command since the registry entry would of been created by then. How would i do that? Link to comment Share on other sites More sharing options...
jguinch Posted November 14, 2014 Share Posted November 14, 2014 (edited) ShellExecute and Run return the ProcessID. So you can do : $iPid = ShellExecute("msiexec.exe" , '/i "SMARTEducationSoftware.msi" INSTALL_NOTEBOOK=1 INSTALL_BOARD=1 ENABLE_MATH_TRIAL=0 INSTALL_RESPONSE=1 INSTALL_INK=1 DESKTOP_ICONS="" CUSTOMER_LOGGING=0 NB_PROD_KEY=XX-XXXXX-XXXXX-XXXXX-XXXXX-AAA ACTIVATE_LICENSE=1 NETWORK_CONTENT=1 CONTENT_TARGET_PATH="\\domain\data\smartgallery" /qn') ProcessWaitClose($iPid) Edited November 14, 2014 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
tsicoupe Posted November 14, 2014 Author Share Posted November 14, 2014 Only problem with that is every time i launch it the pid changes. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 15, 2014 Moderators Share Posted November 15, 2014 His example doesn't care if the PID changes, not sure why you feel that's an issue. There's also ShellExecuteWait (read description in the help file) Or for your suggestion to wait for a shortcut, you can always use FileExists() in a loop: ShellExecute("data here") While Not FileExists("path\filename.lnk") Sleep(100) ; for cpu resting WEnd Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
tsicoupe Posted November 17, 2014 Author Share Posted November 17, 2014 ShellExecuteWait worked, thanks for all the help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now