Gypsy Baron Posted November 10, 2011 Report Posted November 10, 2011 Hello Pete, I wish to run an external program when FSUIPC4 starts and have defined the correct path and program name in my FSUIPC4_MP.ini file, however the program is not being run and the FSUIPC4 log file indicates an error [Error=193] which is meaningless to me. My FSX is named "FSX_MP.exe", thus the reference to "FSUIPC4_MP.ini" above. I am running Win7 x64. All programs are set to "Run as Administrator". UAC has been turned OFF since day 1. Here are the salient sections of my INI file and the log file with the Programs declaration followed by the INI snippet: !4=//----------------- Run Backup Script ------------------------ [Programs] Run1=C:\TEMP\RUN_A2A_BAK.vbs ********* FSUIPC4, Version 4.746 by Pete Dowson ********* User Name="xxxxxxxxxxxxxxx" User Addr="xxxxxxxxxxxxxxxxxxxxx" FSUIPC4 Key is provided WIDEFS7 not user registered, or expired Running inside FSX on Windows 7 ... FSX has been renamed as "fsx_MP" Module base=61000000 Wind smoothing fix is not installed DebugStatus=15 62 System time = 09/11/2011 18:49:28 62 FLT path = "C:\Users\Gypsy Baron\Documents\Flight Simulator X Files\" 109 Trying to connect to SimConnect Acc/SP2 Oct07 ... 109 FS path = "X:\Microsoft Flight Simulator X\" 1281 FSUIPC couldn't run: "C:\TEMP\RUN_A2A_BAK.vbs" [Error=193] 1281 LogOptions=00000000 00000001 1297 SimConnect_Open succeeded: waiting to check version okay My guess is that FSUIPC4 can not launch a .vbs script which would be a shame as I need to run that script to launch a .bat file so that the .bat file does not open a Command Prompt window. EDIT: It does not work in Xp Pro x32 either. Paul
Pete Dowson Posted November 10, 2011 Report Posted November 10, 2011 I wish to run an external program when FSUIPC4 starts and have defined the correct path and program name in my FSUIPC4_MP.ini file, however the program is not being run and the FSUIPC4 log file indicates an error [Error=193] which is meaningless to me. Windows error numbers are meaningless to everyone I should think. Google them as I have to. That one comes up with "not a valid Win32 application". I am running Win7 x64. All programs are set to "Run as Administrator". Why? none of mine are run like that. You should only need to do that during installation. Run1=C:\TEMP\RUN_A2A_BAK.vbs "vbs"? That is not a known executable -- you need .EXE, .COM, or .BAT. A "vbs" file is probably a script executed by some other program. My guess is that FSUIPC4 can not launch a .vbs script which would be a shame asI need to run that script to launch a .bat file so that the .bat file does not open a Command Prompt window. I've no idea how one can execute a vbs, sorry. If you know the EXE which runs the vbs then you could probably do it with ".....exe" follwed by "RUN_A2A_BAK.vbs" as a parameter. Regards Pete
Ian P Posted November 10, 2011 Report Posted November 10, 2011 It's a Visual Basic Script, Pete - but I didn't think FS recognised VB Scripts, either, Paul? Don't they have to be compiled? Ian P.
Pete Dowson Posted November 10, 2011 Report Posted November 10, 2011 It's a Visual Basic Script, Pete Okay, so it presumably won't execute by calling "CreateProcess", which is what I use. Maybe it would run with a WinExec call instead? I don't use that because it is deprecated (spaces in the parameters are ambiguous to it even if in quotes), and it doesn't provide the process and thread IDs I need for some of the run options. I suspect that executing scripts and the like needs a Shell call instead. BTW, now you are here, Ian, could you tell me why I see that I have 3 pending topics to approve, but they are not visible to me -- they usually appear in pink? I can still see pending posts in existing topics, but not new topics. This started happening only today. I can't approve them if I can't see them! :-( Regards Pete
Pete Dowson Posted November 10, 2011 Report Posted November 10, 2011 I suspect that executing scripts and the like needs a Shell call instead. If this is a needed facility I can add a new function to the new Lua EXT library added recently to do a "ShellExecute". It looks like this can run anything in the same way as double clicking in Explorer can do. It doesn't give me enough information back to offer all the other options in the Run category, but should certainly allow "vbs" to run. Paul, please advise. Regards Pete
Gypsy Baron Posted November 11, 2011 Author Report Posted November 11, 2011 It's a Visual Basic Script, Pete - but I didn't think FS recognised VB Scripts, either, Paul? Don't they have to be compiled? Ian P. The scrip runs outside of FSX....it runs fine if I double-click it's icon or type it's name into the "run" command line so Win7 knows how to run it. This script merely launches a batch file that does the auto-backup of my A2A accusim dat files every 10 minutes but the script is needed to start the bat file to run without opening a DOS Command window.
Gypsy Baron Posted November 11, 2011 Author Report Posted November 11, 2011 If this is a needed facility I can add a new function to the new Lua EXT library added recently to do a "ShellExecute". It looks like this can run anything in the same way as double clicking in Explorer can do. It doesn't give me enough information back to offer all the other options in the Run category, but should certainly allow "vbs" to run. Paul, please advise. Regards Pete That would be great, Pete, as I previously tried to "run" this script via the Lua EXT library without success. As a matter of fact, that was my first choice. The reason I need to launch that bat file without a command window is that I can't have one pop up while I am in flight, particularly while flying in formation in multi-player. I need to keep the FSX window focused while the periodic file backup takes place. Paul
Pete Dowson Posted November 11, 2011 Report Posted November 11, 2011 That would be great, Pete, as I previously tried to "run" this script via the Lua EXT library without success. As a matter of fact, that was my first choice. The EXT library run functions use the same methods as the FSUIPC INI RUN parameters. It's the only way I can offer the other options. A shell execution doesn't give me so much control. But it could be done without returning a handle (i.e. so no use in closing whatever you started, or doing anything else with it really). I'll add a "shell" function, just with pathname and command line parameter options. Maybe tomorrow, but more likely over the weekend. It isn't hard, but i'm a bit tied up most of tomorrow. Regards Pete
Gypsy Baron Posted November 11, 2011 Author Report Posted November 11, 2011 The EXT library run functions use the same methods as the FSUIPC INI RUN parameters. It's the only way I can offer the other options. A shell execution doesn't give me so much control. But it could be done without returning a handle (i.e. so no use in closing whatever you started, or doing anything else with it really). I'll add a "shell" function, just with pathname and command line parameter options. Maybe tomorrow, but more likely over the weekend. It isn't hard, but i'm a bit tied up most of tomorrow. Regards Pete Thanks Pete. When you get to it. No big hurry. Paul
Ian P Posted November 11, 2011 Report Posted November 11, 2011 Thanks Paul - that makes more sense. VB is one of the few programming languages I have ever used to create something that actually worked, so have poked into its use with FS8/9/X on a few occasions. Pete: I've replied to your e-mail (twice, in fact - once before and once after a lot of searching on the support forum). Cheers gents. Ian P.
Pete Dowson Posted November 11, 2011 Report Posted November 11, 2011 Pete: I've replied to your e-mail (twice, in fact - once before and once after a lot of searching on the support forum). Strange. Neither has arrived. I'm getting Miguel's okay -- he sent me a copy of one of yours. I'm not blocking them this end. Must be something my ISP doesn't like about them, but if that were the case it would normally replace them with a warning. Regards Pete
Ian P Posted November 11, 2011 Report Posted November 11, 2011 Odd. <_< I've just sent you an e-mail via my webhost's mail server rather than simFlight. Can you let me know if you get it, please? Cheers, Ian P.
Pete Dowson Posted November 11, 2011 Report Posted November 11, 2011 I've just sent you an e-mail via my webhost's mail server rather than simFlight. Can you let me know if you get it, please? Yes. Received 5/5 okay. Seems something's blocking the other IP address, but it isn't at my PC. Pete
Pete Dowson Posted November 12, 2011 Report Posted November 12, 2011 Thanks Pete. When you get to it. No big hurry. Okay, go to Download Links and get FSUIPC 3.998j, 4.747 and/or WideClient 6.899j, as needed. The Lua "ext" library has been extended quite a bit. You'll need the updated Lua library documentation too. Regards Pete
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