Why does TP keep re-associating TWS files on closing??

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Why does TP keep re-associating TWS files on closing??

Post by webmasta »

http://www.textpad.com/forum/viewtopic. ... 2287#12287

Above is my previous post about opening files in TP... TP does not open the workspace with all files loaded when dbl-clicking on TWS files. I thought I had solved it yesterday by using "" around the path, removing the -s and unchecking DDE in folder options.

Now today I find it happening again ... no files opening when I dbl-clik any TWS file. On checking file associations, I see that TP had put back the same crap that was there yesterday thats causing it not to open the files.

Why is TP insisting on changing my file assiciation strings when the program closes?? That smacks of MS big brother controlling the way you use the software insted of allowing us to make productivity preferences and respecting it.

Any suggestions Helios?? Not a happy camper today!
User avatar
bbadmin
Site Admin
Posts: 879
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

Webmasta,

TextPad determines the path to its executable by calling the Win32 API GetModuleFileName. On Win2K/XP that returns the same case characters as you see in Explorer, but I think that Win9x returns all upper case. However, all versions of MS Windows treat the case of filenames as insignificant, unlike Unix variants. Therefore, the fact that your registry has the path in upper case does not affect the results you are getting.

The "-s" parameter prevents the last used workspace from being automatically reloaded, when the first instance of TextPad is started. It also prevents an initial empty document from being created.

Explorer uses DDE as follows:

1. It broadcasts an initial message to all running applications.
2. If it gets no response, it starts the associated application, using the shell\open\command entry in the registry.
3. It formats a file open command, using the entries in the registry under shell\open\ddeexec, and broadcasts it to all applications.

It broadcasts by sending each application the same message in turn. However, if the current target does not respond before the timeout. Explorer abandons the process. Culprits that misbehave in this way include Outlook 2000, Lotus Notes, and any application that is being debugged. Hence, you should try closing all other applications, and check if TextPad then opens its workspaces. Then try again after starting each other application in turn, until you find the one that's blocking DDE messages.

Keith MacDonald
Helios Software Solutions
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Thnx Keith, but no luck with that... closed everything and tried.

lets take this from the top because the thread got fragmented.

Below is what I have as the path in file associations with DDE checked and message [open("%1")]
this is also in the registry at shell\open\ddeexec
H:\PROGS\TEXTPAD 470\TEXTPAD.EXE -s

Point to note.
In file associations, if I clik ok with that string, windows says path error, and that is the path i find when i open the panel. If i clik cancel, the panel closes ok
If I browse and select the exe I get "H:\Progs\textPad 470\TextPad.exe"
Click ok, path ok.

dbl-clik TWS and workspace opens.
Close TP, dbl-clik TWS again and TP opens blank.
close TP.

Back to folder options and H:\PROGS\TEXTPAD 470\TEXTPAD.EXE -s is back again.
I browse and select the exe again to get back "H:\Progs\textPad 470\TextPad.exe"
I go into the registry and change the string at shell\open\ddeexec which is uppercase & -s
to H:\Progs\textPad 470\TextPad.exe
I search the entire registry because I know windows sometimes have the same entries in different places)

dbl-clik TWS and workspace opens.
Refresh the registry and the string at shell\open\ddeexec is back to
H:\PROGS\TEXTPAD 470\TEXTPAD.EXE -s (which i had just changed)
this happens as soon as TP starts, which at first i thought happened when it closed.

Obviously that path is not working, with or without the -s, only works if the path is
H:\Progs\textPad 470\TextPad.exe

What i see happening here is nothing is blocking the DDE messages, just the stubborn insistance either by TP or windows changing the strings back to uppercase & -s

Why is the path being changed back??
What initiates the call to change it, TP or windows?
What process tells file associations to change the path when TP starts?
Why is shell\open\ddeexec being changed back to uppercase & -s?

Note however that I made my own right clik entry in the registry at HKEY_CLASSES_ROOT/*/shell/
with value "H:\Progs\textPad 470\TextPad.exe %1" which works perfectly for any file I want to open in TP
including TWS
User avatar
helios
Posts: 710
Joined: Sun Mar 02, 2003 5:52 pm
Location: Helios Software Solutions
Contact:

Post by helios »

Please download and install the file, which you can obtain from the location below, and then let us know if it fixes the problem:

http://www.textpad.com/download/beta/textpad470b.zip

This file only contains TextPad.exe, which should be installed as follows:

1. Open My Computer and browse to your TextPad installation folder.
2. Right click TextPad.exe and choose Copy.
3. Right click again and choose Paste, creating "Copy of TextPad.exe".
4. Extract TextPad.exe from textpad470b.zip into your installation folder.
5. Double click TextPad.exe to start it.
6. From the Help menu, choose About and check the version is "TextPad 4.7.0 (invalid param fix 2)".


Stephen MacDonald
Helios Software Solutions
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Nope, same result.

I first dbl-cliked on the tws and it opened blank. This was expected because the uppercasePath -s was already in file assoc from previous.

So when it didnt work as expected, i went into folder options and did the correct case path with "" and left out the -s with DDE on.

I also made sure shell/open/ddeexec was lowercase without the -s which automatically changed when i changed it in file assoc.

I dbl-clicked tws and it opened the workspace.
I closed TP.
Dbl-clicked tws again... TP opened blank and the file assoc and registry is back to uppercae-s.

we dont know if this is affecting anyone else on win98SE or if its just a problem peculiar to my station ?/

Mind you, I am able to right clik and open the tws with workspace loaded from a shell command I made in the registry with the lowercase path.

Dont get too bogged down in this Stephen, seeing that no one else has reported it to my knowledge. TP still rocks, theres more important enhancements I hope you guys are looking into, like saving the workspace when the file is closed instead of when TP is closed. :wink:
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

I think I nailed it...Fixed (it seems)

See this
http://textpad.com/forum/viewtopic.php?p=12381#12381
Erland Sommarskog
Posts: 22
Joined: Wed May 14, 2003 7:28 pm
Location: Stockholm

Post by Erland Sommarskog »

>[quote="helios"]Please download and install the file, which you can obtain >from the location below, and then let us know if it fixes the problem:
>
>http://www.textpad.com/download/beta/textpad470b.zip


I tried this file, but the problem with files not opening when double-
clicking in Explorer persists. I should add that at this point there
plenty of activity on my machine. I might try later on another
partition which is less busy.
Erland Sommarskog, Stockholm
User avatar
Web1X
Posts: 27
Joined: Thu Jul 24, 2003 12:28 am

Is your H: drive local?

Post by Web1X »

Webmasta,

Where is your H: drive? Is it local? Or perhaps it is on a Unix server? That could be why the uppercase doesn't work. AFAIK, Windows always ignores case.

Another possiblility: How about renaming TP and it's path with uppercase names? May not be pretty, but could be a good workaround.

HTH
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Good one Web .. it got me excited I stopped scripting right away and tried it but rename didnt work ..

H drive is a local partition.

The problem is coming not from the path but from the -s that TP insists on putting behind the path.. I cant seem to shake it, I changed all registry entries bla bla, deleted the file association and redid it.. u anme it i tried it (except for the uppercase path)..

Seeme like that -s is hardcoded probly in some dll that some (bright spark) on the TP team though it would be "nice" to have.. :lol:
User avatar
Web1X
Posts: 27
Joined: Thu Jul 24, 2003 12:28 am

Post by Web1X »

Hmmm, strange! So, leaving the program and path in uppercase, just deleting the -s makes it work? Sounds like the -s is the culprit.

I suppose when you renamed the program and path, you had windows explorer set to allow all uppercase names?

Also, H: drive is an actual physical partition and you are not using subst or similar to set up a virtual drive? I know using subst can cause some strange things ....
User avatar
webmasta
Posts: 168
Joined: Mon Jul 28, 2003 8:16 pm
Location: Toronto

Post by webmasta »

Sounds like the -s is the culprit.
thats correct .. and allow uppercase is also corrrect.
H is an actual partition on my secondary HD.

Windows does not recognize the string as a path when the -s is appended even with a lowercase path..

Trouble is even when i delete all that and set the path correct, TP will start with the workspace loaded on dbl-clicking the tws, then immediately reset the path to uppercase with the -s onload.

So now I got accustomed to just using the right/clik open with TP shortcut ... I had set that up in the registry as a shell command.
Post Reply