It is currently April 20th, 2024, 5:59 am

Trouble with RunCommand [solved ... without using Run]

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Trouble with RunCommand [solved ... without using Run]

Post by Mor3bane »

So this shortcut wont work either the generic way:

Code: Select all

LeftMouseUpAction=["C:\GOG Games\Dragon Age Origins\bin_ship\DAOrigins.exe" -enabledeveloperconsole]
Or this way:

Code: Select all

[DAORUN]
Measure=Plugin
Plugin=RunCommand
Parameter=-enabledeveloperconsole
StartInFolder="C:\GOG Games\Dragon Age Origins\bin_ship\"
Program="DAOrigins.exe"
State=Show

Code: Select all

LeftMouseUpAction=[!CommandMeasure DAORUN "Run"]
Incidentally the standard windows icon shortcut works fine, but trying to launch it from rainmeter is giving me grief.

Not sure this is somehow wrong but 99.99% of the time simply taking the link in quotes out of a desktop shortcut works, but alas this does not.
Last edited by Mor3bane on February 21st, 2020, 1:49 am, edited 1 time in total.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Trouble with RunCommand

Post by mak_kawa »

I am not sure what is "StartInFolder" option for RunCommand. But...what if you describe the Program option as fullpath, like "C:\GOG Games\Dragon Age Origins\bin_ship\DAOrigins.exe"?
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trouble with RunCommand

Post by jsmorley »

StartInFolder is really a throwback to the old DOS days, when you wanted to change into the directory that contained your program before you ran it, so the program itself could access or write files it needed to in the proper current directory. Nothing in Windows works this way anymore, and StartInFolder is really a bit of a prehensile-tail, which is really only going to be of much use if you are executing a DOS / CMD "batch" file or something.

Pretty much every Windows shortcut has an entry for "Start in", but almost none of them actually need or use it.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trouble with RunCommand

Post by jsmorley »

LeftMouseUpAction=["C:\GOG Games\Dragon Age Origins\bin_ship\DAOrigins.exe" -enabledeveloperconsole]

Looks right to me... Not sure why it isn't working for you.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Trouble with RunCommand

Post by mak_kawa »

Hi jsmorley

Thank you for clarification. I now realize that the "StartInFolder" is equivalent to the "Working Folder" of the Windows shortcut property.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Trouble with RunCommand

Post by Mor3bane »

I get this error.
The file is in another directory, but as i said the actual desktop shortcut works fine.
Capture.PNG
I am trying to bypass the launcher which is annoying. Using the launcher path:

Code: Select all

"C:\GOG Games\Dragon Age Origins\DAOriginsLauncher.exe"
Works fine. But it uses a launch window that is just redundant after initial setup...
You do not have the required permissions to view the files attached to this post.
Last edited by Mor3bane on February 21st, 2020, 12:32 am, edited 1 time in total.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trouble with RunCommand

Post by jsmorley »

Mor3bane wrote: February 21st, 2020, 12:28 am I get this error.
The file is in another directory, but as i said the actual desktop shortcut works fine.

Capture.PNG
Ah, ok.

Try this:

Code: Select all

[DAORUN]
Measure=Plugin
Plugin=RunCommand
Parameter="C:\GOG Games\Dragon Age Origins\bin_ship\DAOrigins.exe"-enabledeveloperconsole
StartInFolder=""C:\GOG Games\Dragon Age Origins\bin_ship\""
State=Show
You need the two ""quotes"" on StartInFolder since Rainmeter will throw away the first set of starting and ending quotes.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Trouble with RunCommand

Post by jsmorley »

Another option, and perhaps simpler, is to go find the shortcut, shift-right-click it, and say "Copy as path".

Then just use that...

LeftMouseUpAction=["C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Graphics\GifCam.lnk"]

Not the "program", the "shortcut"...
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Trouble with RunCommand

Post by Mor3bane »

Meh.
Did it just like this:

Code: Select all

[DAORUN]
Measure=Plugin
Plugin=RunCommand
Parameter="C:\GOG Games\Dragon Age Origins\bin_ship\DAOrigins.exe"-enabledeveloperconsole
StartInFolder=""C:\GOG Games\Dragon Age Origins\bin_ship\""
State=Show

Code: Select all

LeftMouseUpAction=[!CommandMeasure DAORUN "Run"]
Nothing happens now - but... no error message.
I remember being able to do this a long while back - there was a trick iirc... just dont remember...
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Trouble with RunCommand

Post by Mor3bane »

jsmorley wrote: February 21st, 2020, 12:36 am Another option, and perhaps simpler, is to go find the shortcut, shift-right-click it, and say "Copy as path".

Then just use that...

LeftMouseUpAction=["C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Graphics\GifCam.lnk"]

Not the "program", the "shortcut"...
The same error again :'(
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.