inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Aug 9, 2010 11:21:24 GMT -8
I know VB6 is an old programming language but I can't let go of it because it's what got me started programming. Anyways I am familiar with the Shell() function but I tried to launch an exe with switches but get errors. Let's just say I want to launch:
"C:\Program Files\Maxis\The Sims\Sims.exe" -r1024x768 -skip_intro
The blue is what I can't seem to work right. Is there any other way to get this to work?
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Aug 9, 2010 11:30:40 GMT -8
You'll need to post the error messages you are getting and your code if you want to receive any help.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Aug 9, 2010 11:43:38 GMT -8
I keep getting Fatal Errors. What should happen is the game starts up full screen 1024x768 resolution instead of in 800x600 and without the EA Games intro screen. As for the code:
Shell("C:\Program Files\Maxis\The Sims\Sims.exe -r1024x768 -skip_intro")
Unless there is a different way to launch exes, I'm stuck.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 10, 2010 13:58:12 GMT -8
It's been awhile since I've used VB6 but I'm pretty sure you would need to enclose any paths or parameters in its own quotes if they contain spaces. The line as you have it now would tell the CLI that you want to run the executable C:\Program passing it the parameters - Files\Maxis\The
- Sims\Sims.exe
- -r1024x768
- -skip_intro
There are two ways around that if I remember correctly: - use the old 8.3 path name c:\progra~1\Maxis\thesims\sims.exe
*can't remember the rules for shortening so test that path
- quote the path so the spaces are preserved and passed to the CLI unmolested.
I might be confusing this from another language but I believe VB allows escaping quotes by double-double quoting: Shell("""C:\Program Files\Maxis\The Sims\Sims.exe"" -r1024x768 -skip_intro")
If that don't work then you can always concatenate the string using chr(34) where you need to put the escaped quotes "" & chr(34) & "c:\Program Files\Maxis\The Sims\Sims.exe" & chr(34) & " -param1 -param2"
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Aug 11, 2010 11:31:44 GMT -8
I might be confusing this from another language but I believe VB allows escaping quotes by double-double quoting: Shell("""C:\Program Files\Maxis\The Sims\Sims.exe"" -r1024x768 -skip_intro")Well that quote trick works. I would expect something you would find in C++ or Java like "\"" to have " in the string. Well I still get the fatal error. Looking at Task Manager, Sims.exe has launched. I'm guessing something with VB6 is conflicting with whatever language The Sims was coded in or compiled with?
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Aug 11, 2010 15:35:31 GMT -8
Have you tried executing it without the -r1024x768 -skip_intro commands?
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Aug 12, 2010 17:47:30 GMT -8
Yes, still a fatal error.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 12, 2010 22:03:26 GMT -8
Sounds more like a problem in the execution of a line that follows the shell call. I would set a breakpoint on the line immediately following that shell line then step until the erroring line is identified. It may also help if the entire "fatal error" message was posted since I vaguely recall they were usually accompanied by a vb error number and/or description.
If it is indeed the sims.exe issuing the error then have you actually opened a command window and manually issued the command you're trying to send from VB to see if the exe accepts it? Some GUI applications will actually check the environment that spawned it and not assume it also supports windowed execution. If that is indeed the case then try using the START command (type start /? in a command window for usage) or use win32 API call from VB to launch an application.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Aug 13, 2010 13:19:15 GMT -8
If that is indeed the case then try using the START command (type start /? in a command window for usage) or use win32 API call from VB to launch an application. Yeah, how do I do that?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,022
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 13, 2010 15:27:53 GMT -8
If that is indeed the case then try using the START command (type start /? in a command window for usage) or use win32 API call from VB to launch an application. Yeah, how do I do that? I assume you're referring to win32 since I pointed out how to use the first option. You could simply have it: How To Launch a Win32 Application from Visual Basic. If you're interested in expanding your knowledge on using win32 from VB6 then allapi.net allapi.mentalis.org/ is an excellent resource (I'm surprised it's still up after all these years) Your reply however suggests you've completely ignoring everything else since I see no feedback on the information requested or even an indication if you even tried the suggestions. Is your reluctance to provide any insightful info related to your sims being a cracked version? I seem to recall complaints about several cracked versions being unable to run in any resolution higher than the minimum of 800x600. Without feedback and cooperation it seems pretty much futile to try and help, good luck with your problem though.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Aug 13, 2010 17:37:58 GMT -8
Is that "START /?" for CMD? If so, how is that supposed to help me? I've tried everything you and Jordan have suggested with no success. Running The Sims ("C:\Program Files\Maxis\The Sims\Sims.exe" -r1024x768 -skip_intro) from either a shortcut or using the run window launches as expected.
|
|