chiners_68 Posted September 25, 2006 Share Posted September 25, 2006 I need to run a progrma from my script. the shortcut for the program has the line "C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE" /runtime /wrkgrp "C:\Program Files\CompassCC\ProAchieve\CCC.MDW" "C:\Program Files\CompassCC\ProAchieve\ProAchTarg.MDE" how can i get this to run in autoit..? if i run this from the run command C:\Program Files\CompassCC\ProAchieve\ProAchTarg.MDE it opens the program. if i put this line alone in autoit, it wont run.. Link to comment Share on other sites More sharing options...
iceberg Posted September 25, 2006 Share Posted September 25, 2006 (edited) try Run("C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE " & /runtime /wrkgrp " & "C:\Program Files\CompassCC\ProAchieve\CCC.MDW" & "C:\Program Files\CompassCC\ProAchieve\ProAchTarg.MDE") Edited September 25, 2006 by iceberg mouse not found....scroll any mouse to continue. Link to comment Share on other sites More sharing options...
jinxter Posted September 25, 2006 Share Posted September 25, 2006 (edited) run("C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE /runtime /wrkgrp C:\Program Files\CompassCC\ProAchieve\CCC.MDW C:\Program Files\CompassCC\ProAchieve\ProAchTarg.MDE") doesn't work ? (ie. remove the " except where it's needed. ) The problem might be that it will not understand the spaces, in which case you might try the 8.3 equvivalent, (ie. Program Files = Progra~1) or perhaps using ' around the long filenames. (I can't verify ATM) Edited September 25, 2006 by jinxter > there are 10 types of people in the world, those who understand binary and those who don't. Link to comment Share on other sites More sharing options...
MHz Posted September 25, 2006 Share Posted September 25, 2006 (edited) Wrap the whole command in single quotes, or since it is so long, then add some continuation characters as well to spread across more then one line. Run('"C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE"' & _ ' /runtime /wrkgrp ' & _ '"C:\Program Files\CompassCC\ProAchieve\CCC.MDW" ' & _ '"C:\Program Files\CompassCC\ProAchieve\ProAchTarg.MDE"') Edited September 25, 2006 by MHz Link to comment Share on other sites More sharing options...
chiners_68 Posted September 25, 2006 Author Share Posted September 25, 2006 now getting an error from Access Link to comment Share on other sites More sharing options...
chiners_68 Posted September 25, 2006 Author Share Posted September 25, 2006 MHz, your one worked... cheers Link to comment Share on other sites More sharing options...
MHz Posted September 25, 2006 Share Posted September 25, 2006 (edited) Try using the workingdir parameter in the Run() function. Edit: Cool, glad it worked. The workingdir is usually a good idea for installed programs. Edited September 25, 2006 by MHz 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