|
First, thank you for your constructive input! I really appreciate it!
Eddy Vluggen wrote: ..but no. Just naming it won't trigger that.
and yet, it does...consistently. Changing the filename changes the behavior.
Second, regarding changing a filename, I never said it was expensive however to a developer (me) it does cost time and requires some planning to make it a seamless transition for my customers.
Third, your unfounded insult means nothing to me. My colleagues and paying clients would disagree with you.
Fourth, I might be hiring for a jr. position. Are you available?
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
Long, long ago, a Microsoft operating system only looked at, I think, the first 8 characters of the filename to find a file. But that was long, long ago.
|
|
|
|
|
Good reference to The Jerk!
|
|
|
|
|
I thought someone might get it! Loved that movie! Good catch!
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
Huh! Horror story.
Paul Sanders.
If I had more time, I would have written a shorter letter - Blaise Pascal.
Some of my best work is in the undo buffer.
|
|
|
|
|
What is the full filename? I suspect it's something like mosaic:...
|
|
|
|
|
You suspect correctly. They were both Mosaic... Simply adding a couple of letters in front fixes the issue. I can't explain it.
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
Could it be that Windows is looking for the name of the executable for reasons of competing browsers? You start the Mosaic browser and it intercepts that launch and shows you the "wonderful world" of IE/Edge.
Granted, Mosaic is about as old as the dirt the internet is made of, so...
|
|
|
|
|
I suspect it's an app execution alias. These are used in Windows 10 and 11. For example, on Win 11, shell-executing "python" will launch the windows store on a default install.
These can be turned off in Apps & Features on the target machine.
Did you try shell executing the full path to the executable (rather than just the filename)?
Gee
|
|
|
|
|
Gee. wrote: Did you try shell executing the full path to the executable (rather than just the filename)?
I was/am setting the working directory in the method calls. That could be a clue though, so thanks!
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
Changing CWD can be a pain in the neck (or maybe even lower down).
Even seasoned programmers may believe that they change CWD, complaining that it fails. That is because the way they do it causes a new process to be spun off, and the CWD applies to that process. When it terminates, "Task completed", the changed WD dies with that process. Make sure that the process executing the CWD is not a child process. If you call some API with a CWD parameter, it might start a new process and use the parameter to set the CWD for that process, without affecting the CWD of the calling process.
You have the same situation with the PATH value: A child process cannot modify the path of its ancestor process. It could change the user profile to change the initial PATH for shells started at a later time, but the shell reads the user profile at startup, and is not affected by profile updates while it is running. The same goes for arbitrarily named environment variables.
Most build systems structure a build in a series of job steps, usually with each job step run as a separate process. Countless developers have tried to modify the environment (CWD, PATH or other environment variables) in one job step, expecting the modification to apply to later steps. It fails, even if the the first step updates the user profile. True enough: The next job step process is started after the profile update, but it is (in several build systems, maybe all) a plain child process, not a shell, so it inherits the environment of the build system process that creates it. The user profile is read by the shell when initializing, not at a plain process creation.
In my last job, we had a large crowd of very qualified system developers. Yet, I had to explain again and again why their CWD, PATH and environment updates "failed". I urged them to forget about inheriting the environment by child processes, and rather transfer such values through the Registry, but two thirds of the SW development group were Linux developers by heart, having been forced to accept working under Windows to get a job, bluntly refusing to use any Windows mechanism unknown in Linux if there was any way to avoid it. As long as they could bitch at lengths about the worthless environment handling in Windows, not realizing that a Linux build system would behave in exactly the same way.
So: When you think that you have set the WD of a given process, check it out to be 100% sure: After modifying it, retrieve the CWD to a variable you can inspect in a debugger, or print it out e.g. on the error device.
|
|
|
|
|
It's as good a guess as I've been able to come up with!
I haven't ruled out Cortana intercepting the call and redirecting it to where it thinks (based on the filename?) it needs to go...only to find the callee doesn't live there! As you mentioned, the term 'Mosaic' has been around for a long time in the www lexicon, so I can sorta see a vague connection.
For now, it's a good catch by my tester. I have already adapted (given in) and getting past it. I really only posted here for posterity...on the off-chance that Google may provide it to the next poor sod who can't understand why something (a core win32 method ffs) that has worked for 20 years, suddenly fails on a new Windows version.
Note to my future self: As crazy as it sounds, try changing the filename.
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|
|
My freshman year at the Tech. University was the last year of two huge Univac 1100 mainframes as the primary computers for student exercises. Those who have ever worked with the EXEC-8 OS will remember that the file system had "files", which were fairly large disk areas that you organized in "elements" which were e.g. source program units (i.e. what we call "files" in other systems).
Usually, students were given a single such "file" to hold all their work, customary named by the student's name. One of my classmates were refused: Her name was not accepted as a file name, and we could not see the reason.
We asked the system managers, who explained that Exec-8 used a Master File Directory organized as a hash table on the complete file "path" (not a hierarchical one, but a concatenation of a project name and the file name. The code doing the hashing could not handle bucket overflow. So the rejection of my classmate's name really was "Sorry, this hash bucket is full - please select a file name hashing to another bucket!"
|
|
|
|
|
Does it only happen on computers with a certain browser installed?
|
|
|
|
|
Instead of ShellExecute, can you use a different API like CreateProcess?
|
|
|
|
|
|
kmoorevs wrote: Doing so incorrectly starts a web browser with the message 'Hmmm, I can't find that file...Typo?'.
Mosaic is the name of a web browser from the mid 1990s. Years later Mosaic became Netscape and then later became Mozilla Firefox. It would appear that Windows still has a few VERY OLD bits of code lurking around.
|
|
|
|
|
In a box in the basement, I came across a short source listing from my student days ...
I was a TA at the time. The 'Programming 101' freshmen had been given a fairly simple programming exercise. We, the TAs, were taking the 'Compiler Technics' course, learning that in FORTRAN, there are no reserved words, only tokens with predefined meaning. The context reveals whether the predefined semantics apply, or if the word is a user defined symbol.
So we made up a self-defined exercize: Solve the 'Programming 101' exercize in FORTRAN, using predefined words only, and no numeric constants. (We found no way to generate character values for the WRITE statements, and had to allow ourselves the use of strings.)
Here is the result. We were using a pre-FORTRAN-77 compiler for the development, getting a nicely formatted output. When the F77 compiler arrived, the output was all left justified, but 'mathematically correct'. We tested it on two different F77 compilers, on two diffent machines, and honestly believe that this code is fully F77 compliant. Unfortunately, I do not currently have access to any F77 compiler, so I cannot verify that (and I really, really hope that it is not Fortran 2018 compliant!)
In FORTRAN, space was insignificant. We had a 'compact' version with all the space removed, which made it rather difficult to follow the program flow. So I give you the readable version. One 🍺 to the first one to tell what the printout from this program will be!
.
PROGRAM PROGRAM
INTEGER IF, INTEGER, GOTO, IMPLICIT
REAL REAL, DIMENSION, EXTERNAL, FORMAT, END
INTEGER LOGICAL
REAL COMPLEX, DATA, CALL, ASSIGN, CHARACTER
DO FOR IF = INTEGER, INTEGER; END DO
INTEGER = IF + IF
GOTO = INTEGER * INTEGER * INTEGER * INTEGER - INTEGER - IF
CALL FUNCTION(IMPLICIT, REAL, DIMENSION, EXTERNAL, FORMAT, END
$, LOGICAL, COMPLEX, DATA, CALL, ASSIGN, CHARACTER)
CALL SUBROUTINE(IMPLICIT, LOGICAL, GOTO, IF, INTEGER)
END
SUBROUTINE FUNCTION(IMPLICIT, REAL, DIMENSION, EXTERNAL, FORMAT
$, END, LOGICAL, COMPLEX, DATA, CALL, ASSIGN, CHARACTER)
RETURN
END
SUBROUTINE SUBROUTINE(IMPLICIT, LOGICAL, GOTO, IF, INTEGER)
INTEGER GOTO, IMPLICIT(GOTO), LOGICAL(GOTO), IF, INTEGER
$, EXTERNAL, RETURN
DO FOR EXTERNAL = IF, GOTO
DO FOR RETURN = EXTERNAL, EXTERNAL - IF
IMPLICIT(RETURN) = LOGICAL(RETURN) + LOGICAL(RETURN - IF)
END DO
IMPLICIT(IF) = IF
IMPLICIT(EXTERNAL) = IF
DO FOR RETURN = IF , GOTO - EXTERNAL
WRITE(IF, '(''$ '')')
END DO
DO FOR RETURN = IF, EXTERNAL
WRITE(IF, '(''$''I4)') IMPLICIT(RETURN)
END DO
WRITE(IF, '( /)')
DO FOR RETURN = IF, GOTO
LOGICAL(RETURN) = IMPLICIT(RETURN)
END DO
END DO
END
|
|
|
|
|
I have no idea what this code does. However, I did find a free compiler online for you: Free FORTRAN Compilers[^]
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
The last time I looked at a Fortran listing was in school in the fall of 1977. It's been a while!
|
|
|
|
|
I instantly thought to myself, why in the hell would anyone on planet earth still use Fortran...
Quick Google search reveals that scientists at NASA and CERN still use Fortran to this day for mission critical work.
|
|
|
|
|
Don't forget old guru C.A.R. Hoares's remark after studying the various proposals for what became Fortran-77: "I don't know what programming languages will look like in year 2000, but they will be called 'Fortran'!"
He most definitely was right. My own experience is with Fortran IV and Fortran-77. When I was presented with a Fortran 2008 code sample, I first refused to believe that it was called 'Fortran', bearing very little resemblance to the Fortran I knew. Fortran is very much like 'Ethernet': The ethernet of today has very few similarities with the 3 Mbps linear bus topology thick coax with true CSMA/CD medium access control of my 'computing childhood'. The main similarity, both for Ethernet and Fortran, is the name.
|
|
|
|
|
A few years ago a CAD system developer told me they wrote the product in Fortran. In my naivety I said I didn't think anyone still used Fortran. They burst out in hoots of laughter; it turns out a great deal of mathemics-based software is still written in Fortran.
|
|
|
|
|
1) is it possible that you added a space after DO FOR... that should not be there?
2) no DATA statements or other initialization of the varables?
Pound to fit, paint to match
|
|
|
|
|
Spaces are completely ignored in F77 (and earlier). Columns are significant - specifically col 6. This would be another valid version of the program:
. PROGRAMPROGRAM
INTEGERIF,INTEGER,GOTO,IMPLICIT
REALREAL,DIMENSION,EXTERNAL,FORMAT,END
INTEGERLOGICAL
REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
DOFORIF=INTEGER,INTEGER;ENDDO
INTEGER=IF+IF
GOTO=INTEGER*INTEGER*INTEGER*INTEGER-INTEGER-IF
CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END
$,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER)
CALLSUBROUTINE(IMPLICIT, LOGICAL, GOTO, IF, INTEGER)
END
SUBROUTINEFUNCTION(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT
$,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER)
RETURN
END
SUBROUTINESUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),IF,INTEGER
$,EXTERNAL,RETURN
DOFOREXTERNAL=IF,GOTO
DOFORRETURN=EXTERNAL,EXTERNAL-IF
IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF)
ENDDO
IMPLICIT(IF)=IF
IMPLICIT(EXTERNAL)=IF
DOFORRETURN=IF,GOTO-EXTERNAL
WRITE(IF,'(''$ '')')
ENDDO
DOFORRETURN=IF,EXTERNAL
WRITE(IF,'(''$''I4)')IMPLICIT(RETURN)
ENDDO
WRITE(IF,'( /)')
DOFORRETURN=IF,GOTO
LOGICAL(RETURN)=IMPLICIT(RETURN)
ENDDO
ENDDO
END This is (printable) character by character identical to the first version I presented. I am not 100% sure that F77 allows semicolon to put multiple statements on one line; there is one case of it in the above code, and both the F77 compilers we had access to accepted it. I could have filled up the lines to col.72 to make the code even more compact , but I'll leave that as an exercise for those with extreme tastes in code layout ...
lewist57 wrote: 2) no DATA statements or other initialization of the varables? We had denied ourselves the use of literals (but had to lift those restrictions for the strings in the WRITE statements).
However: F77 specifies that integer values are initialized to zero. Fortran loops are always executed at least once. So INTEGER starts at 0, and when running
DO FOR IF = INTEGER, INTEGER; ENDDO the loop will increment INTEGER from 0 to 1. Then we create 2 by adding IF + IF, and 13 by INTEGER*INTEGER*INTEGER*INTEGER-INTEGER-IF (i.e. 2*2*2*2 - 2 - 1).
In principle, we could have created ASCII character codes for the string constants in a COMMMON block, and addressed the block alternately as integer or string. That would require knowledge about how a string is laid out in memory, and the code would have to be split in two files (one file can only interpret the common block in a single way). I believe that Hollerith constants are defined to be a plain octet sequence in memory - no descriptor, no terminator - but Hollerith was left out of F77 (and all later versions), wasn't it?
Today, I have forgotten why we have this no-op subroutine named FUNCTION. It could be for some other strange initialization purpose. All I remember is that it had to be there. If I dig up an F77 compiler and debugger, maybe I could tell. My life does not depend on knowing the answer, so I doubt that I will acquire and install an F77 for the sole purpose of finding out
|
|
|
|
|