File Association Not Working in Windows 8.1

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 10 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jeremyg
Posts: 23
Last visit: Mon Mar 18, 2024 6:07 am

File Association Not Working in Windows 8.1

Post by jeremyg »

I think this happens with Windows 8.0 too, but I don't have a machine around to test it on.

If you go into options and associate file types with PrimalScript the message says that the association worked fine, however the association is not actually made.

Additionally if I right click a file and select:
Open With --> Choose Default Program

Primal Script does not show up on that list. I browse to the PrimalScript EXE and select it, and the following error pops up:

[Window Title]
Cannot associate file type with this program

[Content]
The program you have selected cannot be associated with this file type. Please choose another program.

[OK]
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

Re: File Association Not Working in Windows 8.1

Post by Alexander Riedel »

What PrimalScript version and what file type are we talking about?

The association function will only work if you started PrimalScript in administrator mode. Since Windows Vista Microsoft fails writes to the registry in "positive mode", meaning the write fails but the calling program gets a return code indicating it worked.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
dr_maddog
Posts: 9
Last visit: Mon Nov 29, 2021 8:34 am

Re: File Association Not Working in Windows 8.1

Post by dr_maddog »

I am having the exact same problem with a clean install of Windows 8.1 x64 Enterprise. I cannot get PrimalScript to associate with VBS files and open in PrimalScript by default

I have tried the following versions of PrimalScript 2012

6.5.144
6.5.155
6.5.156

I tried both executing PrimalScript normal and as Administrator but with no luck.

Anyone else get this to work properly?
User avatar
dr_maddog
Posts: 9
Last visit: Mon Nov 29, 2021 8:34 am

Re: File Association Not Working in Windows 8.1

Post by dr_maddog »

I looked at the registry and found a workaround. It is not ideal but it works.

Instead of using PrimalScript.exe use the "SendtoPS.exe" as the default program for VBS files. That works and sends the file to PrimalScript.

It is located here:
"C:\Program Files\SAPIEN Technologies, Inc\PrimalScript 2012\sendtops.exe"
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 20
Been upvoted: 37 times

Re: File Association Not Working in Windows 8.1

Post by Alexander Riedel »

You should already have an "Edit with PrimalScript" entry on the File Explorer context menu. Do you not?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
dr_maddog
Posts: 9
Last visit: Mon Nov 29, 2021 8:34 am

Re: File Association Not Working in Windows 8.1

Post by dr_maddog »

Yes, "Edit with PrimalScript" is there and working.

However it is preferable to be able to open in an editor by default. Similar to how PowerShell scripts natively open in Notepad instead of executing.
This topic is 10 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.