pelwer Posted July 18, 2009 Share Posted July 18, 2009 Hi folks, I'm having trouble using AutoIt's Run command to launch a ClickOnce style application. If I type this in Windows "Run ..." box from the Start Menu, it works fine: ( application launches ) "C:\Documents and Settings\pelwer1\Start Menu\Programs\Change Management System II\CMSII.appref-ms" If I put this into AutoIt and run the script nothing happens: ( AutoIt exits normally, but the app doesn't launch ) ; StartCMS Run( @StartMenuDir & "\Programs\Change Management System II\CMSII.appref-ms" ) I also tried this and also got nothing: ; StartCMS Run( "C:\Documents and Settings\pelwer1\Start Menu\Programs\Change Management System II\CMSII.appref-ms" ) Any clues as to what I'm doing wrong? thanks Pat. Link to comment Share on other sites More sharing options...
froufrou Posted July 20, 2009 Share Posted July 20, 2009 You could try this! Run(@ComSpec & " /c " & "CMSII.appref-ms " & '"' ,"C:\Documents and Settings\pelwer1\Start Menu\Programs\Change Management System II"& '"') Link to comment Share on other sites More sharing options...
pelwer Posted July 20, 2009 Author Share Posted July 20, 2009 No Joy, but this seems to work ( found this in another post on running ClickOnce apps ) Run(@comspec & " /c cd " & chr(34) & @StartMenuDir & "\Programs\Change Management System II\" & chr(34) & " && start " & "CMSII.appref-ms") It works, but I have no idea what it's doing! Link to comment Share on other sites More sharing options...
jvanegmond Posted July 20, 2009 Share Posted July 20, 2009 (edited) You can't really run a appref-ms like you can a normal executable. If you manage to open it you'll see that it really does reference an application (that's online). There are only a few methods to "run" them:Open a webpage (in IE) with the location set to the appref-ms file.start it using command line and start command: cmd /c start C:\your.appref-msNote that if you try doing this on startup; that's a whole different problem.Edit: ClickOnce will give you more trouble when you try to do anything with it that it's not designed to do (be started by another application for example). Simple solution: Move away from ClickOnce. Edited July 20, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
makeitfunky Posted July 31, 2009 Share Posted July 31, 2009 Hello! This is my first post, and I'm very new to AutoIt.Our company using appref-ms to start one of our applications...I tried using the examples given, but none of them are working. Is there anything you can recommend? If I do need to use a browser to launch the app, can you please provide some code to get me started?I would really appreciate it, thanks!-GeorgeYou can't really run a appref-ms like you can a normal executable. If you manage to open it you'll see that it really does reference an application (that's online). There are only a few methods to "run" them:Open a webpage (in IE) with the location set to the appref-ms file.start it using command line and start command: cmd /c start C:\your.appref-msNote that if you try doing this on startup; that's a whole different problem.Edit: ClickOnce will give you more trouble when you try to do anything with it that it's not designed to do (be started by another application for example). Simple solution: Move away from ClickOnce. Link to comment Share on other sites More sharing options...
makeitfunky Posted July 31, 2009 Share Posted July 31, 2009 Actually, through trial and error, I got this to work (using the example in the first post): Run(@comspec & " /c " & chr(34) & "C:\Documents and Settings\pelwer1\Start Menu\Programs\Change Management System II\CMSII.appref-ms" & chr(34)) Hello! This is my first post, and I'm very new to AutoIt. Our company using appref-ms to start one of our applications...I tried using the examples given, but none of them are working. Is there anything you can recommend? If I do need to use a browser to launch the app, can you please provide some code to get me started? I would really appreciate it, thanks! -George Link to comment Share on other sites More sharing options...
jayantsinha7 Posted January 8, 2015 Share Posted January 8, 2015 (edited)  Run('C:Usersjayant.sinhaAppDataRoamingMicrosoftWindowsStart MenuProgramsABC IncIndiaDevops.appref-ms') plz help how to understand Run(@comspec & " /c cd " & chr(34) & @StartMenuDir & "ProgramsChange Management System II" & chr(34) & " && start " & "CMSII.appref-ms") with respect to my application. how i can run. Edited January 8, 2015 by jayantsinha7 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