Jump to content
The simFlight Network Forums
marcusbx33

RUN1 command section [PROGRAM] in FSUIPC.INI with FSX

Recommended Posts

Hello,

 

OS WIN7 X64

FSX SP2

FSUIPC V4.934

 

I have a problem in FSUIPC.ini at the [PROGRAM] section.

this command bellow is not fonctional for starting VAC program (Voice Activated Command):

 

Run1=CLOSE,"C:\Program Files (X86)\VAC System\VACSystem.exe leveld.xml,True" (does not work)

 

Run1=CLOSE,"C:\Program Files (X86)\VAC System\VACSystem.exe leveld.xml" (this OK)

 

In advance, thanks for the answer.

 

Kind regards,

Marc.

Share this post


Link to post
Share on other sites

Hi,

first let me say that I don't want to hijack the topic, but it seems to me that it relates to the same underlying problem. If you find this not related to the problem or inappropriate, just ingore.

 

It seems that special characters (as the comma or back-slash) incur problems in the Run-command. I have one very similar. This is my programs section:
 

[Programs]
Run1="C:\Windows\surun.exe notepad.exe"
Run2="C:\Users\Peter\Desktop\FSX\ReHIDMacros.cmd"
Run3="C:\Windows\surun.exe c:\windows\notepad.exe"

The "notepad-call" is just to have something for testing that should work in any case.
 

And this are the relevant parts of the log-file:

********* FSUIPC4, Version 4.936a by Pete Dowson *********
...
FSUIPC4 Key is provided
...
47 Trying to connect to SimConnect Acc/SP2 Oct07 ...
...
920 Run: "C:\Windows\surun.exe notepad.exe"
967 Run: "C:\Users\Peter\Desktop\FSX\ReHIDMacros.cmd"
967 FSUIPC couldn't run: "C:\Windows\surun.exe c:\windows\notepad.exe" [Error=267]

The first two call works, notepad comes up, HIDMacros is restarted. The third is not, although the path to surun.exe is the same as in the first call and the path to notepad.exe is correct. It seems that the appearance of the program parameter containing special charactes as the backslash are indicative for the problem.

 

Hope this helps to identify the root cause. For the time being I can help myself with a workaround.

 

 

best regards,

Peter
 

Share this post


Link to post
Share on other sites
[Programs]
Run1="C:\Windows\surun.exe notepad.exe"
Run2="C:\Users\Peter\Desktop\FSX\ReHIDMacros.cmd"
Run3="C:\Windows\surun.exe c:\windows\notepad.exe"

 

I think in that last example  "c:\windows\notepad.exe" is a parameter to the program. the "" enclosing it all makes it part of the program pathname. Try

 

Run3="C:\Windows\surun.exe" c:\windows\notepad.exe

 

I think only the program pathname needs quotes, and actually it only needs those if there are spaces within. The quotes make the spaces part of the name, hence the parameters get to be part of that name if you keep them within quotes.

 

This is all to do with how Windows accepts command lines, it is nothing to do with FSUIPC itself.

 

The same applies to the OP's query:

 

Run1=CLOSE,"C:\Program Files (X86)\VAC System\VACSystem.exe leveld.xml,True" (does not work)

 

should probably be:

 

Run1=CLOSE,"C:\Program Files (X86)\VAC System\VACSystem.exe" leveld.xml,True

 

Pete

 

Share this post


Link to post
Share on other sites

Indeed, this one worked: 

"C:\Windows\surun.exe" c:\windows\notepad.exe

However, this one not (same error):

"C:\Windows\surun.exe" "c:\windows\notepad.exe"

I don't know which parser is handling that, so might be, that if you ever need to communicate a parameter with empty spaces (e.g. a path) then the problem might reoccur.

 

For my problem I created just another batch-file "InitFSX.cmd" which is called by FSUIPC's [PROGRAMS] section. The file collects all the more complicated startups commands and does not anymore require parameters from the command line. That solved the problem, too.

 

bests,

Peter

Share this post


Link to post
Share on other sites

However, this one not (same error):

"C:\Windows\surun.exe" "c:\windows\notepad.exe"

I don't know which parser is handling that, so might be, that if you ever need to communicate a parameter with empty spaces (e.g. a path) then the problem might reoccur.

 

I think that should be:

 

"C:\Windows\surun.exe" c:\windows\notepad.exe

 

or even just

 

C:\Windows\surun.exe c:\windows\notepad.exe

 

unless "surun.exe" handles the "". And whether or not spaces in parameters are handled depends solely on the program processing them. I'm pretty sure everything after the program identity can be handled in whatever way the program wants to.

 

Pete

Share this post


Link to post
Share on other sites

If FSUIPC 5 contains the same run functions as FSUIPC 4 then take a look at the
\modules\FSUIPC Documents\FSUIPC Documents\FSUIPC# for Advanced Users.pdf
look for the "Programs: facilities to load and run additional programs" section.

If it all carried over from FSUIPC 4 then something like the following "may" work - (as an example)
RunIf1=READY,DELAY,C:\Windows\System32\notepad.exe

The above will give a 10 second delay "after" the sim is up and running.
Again this is under the assumption that the facilities are still available in FSUIPC 5

No hurting in giving it a try.. Pete will be back soon and can give further advise.


 

Share this post


Link to post
Share on other sites
3 hours ago, spokes2112 said:

The above will give a 10 second delay "after" the sim is up and running.
Again this is under the assumption that the facilities are still available in FSUIPC 5

Yes, they are.

Pete

 

Share this post


Link to post
Share on other sites
1 hour ago, Portanav said:

Can I increase the 10 in DELAY=10, upwards?

No, not as it stands at the moment. No one has ever asked for that, and I'm not sure how easy it would be to implement, because the 10 seconds are from an event used by other parts.

Using a Lua plug-in which loads a program using the ext library functions would allow you to do what you want, with more flexibility. The Lua plug-in facilities were added specifically to meet needs not thought of before or not asked for at a more appropriate time. Take a look at that. The Lua documentation is in your FSYUIPC Documents folder.

Pete

 

Share this post


Link to post
Share on other sites
On 8/16/2018 at 4:49 AM, spokes2112 said:

If FSUIPC 5 contains the same run functions as FSUIPC 4 then take a look at the
\modules\FSUIPC Documents\FSUIPC Documents\FSUIPC# for Advanced Users.pdf
look for the "Programs: facilities to load and run additional programs" section.

If it all carried over from FSUIPC 4 then something like the following "may" work - (as an example)
RunIf1=READY,DELAY,C:\Windows\System32\notepad.exe

The above will give a 10 second delay "after" the sim is up and running.
Again this is under the assumption that the facilities are still available in FSUIPC 5

No hurting in giving it a try.. Pete will be back soon and can give further advise.


 

Thanks. tried it and it works.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.