How to enable "Open With" on file?

I am trying to block .js files from being run on a workstation. Following some web instructions I found, I have created a dummy .js file. The instructions say to right-click on the file, select "open with" and select notepad.

I've done this on a couple of workstations so far, but on this one, I can create/save the .js, I can run the .js (no warning about dangerous file like on the other workstations), but when I try "open with" I get the message, "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item." The location in this case is the desktop. I've also tried moving it to C:\. The user is a local Administrator.

How can I fix this?
Who is Participating?
jmarkfoleyConnect With a Mentor Author Commented:
Davis McCarn:
So now her login screen specifically has her logging into mail.hprs.local\doris or clearly says she is logging into the domain?
Yes, actually she was always logging into the domain, only her Desktop was not redirected (Documents, Videos, etc. were). The problem was that redirection/sync was broken as explained here: I was able to fix her Desktop redirection by resetting the CSC database as explained in that link, and in the EE question I referenced in my previous post.

Having said all that, I still cannot right-click > Open WIth > Choose Default Program, on this .js file, although the Security Tab is back.

Furthermore, I can do the "Choose Default Program" with NONE of the files on her desktop, including Word, Excel and PDF. As with the .js file of this topic, I can do right-click > Properties > General > "Opens with" Change button, for all these files. On other workstations' desktops none of this is a problem.

Since I have a workaround, unless someone can offer a relatively painless way to fix the "Choose Default Program" issue I'm have on this workstation alone, I'm going to not lavish more time on this issue and call it resolved.
Christopher Jay WolffWiggle My Legs, OwnerCommented:

did you compare permissions for the file on this station versus the other stations?

right-click file, properties, security tab, advanced brings up window...

"Advanced Security Settings for filename"

Check everything there for differences.  See if owner makes sense.

You might also check owner in this same window for the Desktop folder you're in.

Any use of virtual machines there?
jmarkfoleyAuthor Commented:
Some rather interesting results. The 1st image (properties) shows the Properties > Security for the user that does not work (left) and user that does (right).

2nd image shows the Advanced button for each user. Of note, the not-working user shows 'Inherited From' set to "<not inherited>", and shows "C:\Users\doris.HPRS\" for other in the list. The working user shows 'Inherited From', "Parent Object".

3rd image (owner) show the respective owners of these files.

4th image (effPermissions) show the Effective Permissions Tab. Both users show full control.

One very interesting bit is that the working user's Object name is \\mail.hprs.local\Users\renee\Desktop\disableme.js whereas the non-working user's Obhect name is C:\Users\doris.HPRS\Desktop\disableme.js.

This is telling me that the non-working user's desktop is NOT in redirected folders, so I have bigger problems than just file permission issues.
Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

David Johnson, CD, MVPOwnerCommented:
Windows Registry Editor Version 5.00



@="Shared key to keep this from being removed with install/uninstall of side-by-side components."


Open in new window

Christopher Jay WolffWiggle My Legs, OwnerCommented:
That's cool Dave!!  Didn't know we could do that.

For rookies like me I looked it up and wanted to include this example stuff since I had no clue about creating and using .reg files on as as-needed basis.


And wanted to mention about the path in Renee's object name.  It appears it is merely a UNC path for the net as described here.
jmarkfoleyAuthor Commented:
I created an ran that .reg file and rebooted, but it didn't work. It still tried to open my .js file with jscript.

As to the UNC path, yes -- I didn't complete my thought in my post. All computers should be \\mail.hprs.local\Users\user\Desktop\. The fact that the troublesome workstation is C:\ indicates that this one is not using redirected folders. No sure what to do about that. Perhaps un-join and re-join the domain? My problem would likely go away if the Desktop was properly redirected.
Christopher Jay WolffWiggle My Legs, OwnerCommented:
I think you're probably right.
Maybe it will be evident if you look at more info.  Maybe there is no share on the server for Doris, or maybe it is customized.

Computer Management, shared folders, shares, properties

If using File Explorer, you can go to network and right click on any shared folder and properties will show the UNC network path.

All this described here.

Command prompt helpful too.  enter

net share

 and it will show if share is assigned to a folder on the server.  Here is the details of net share.

Also, if you enter...

net use

it will show connections.  There are parameters you could look into for net use here.
jmarkfoleyAuthor Commented:
I've fiddled around with the AD settings and now I can save the file to \\mail.hprs.local\Users\doris\Desktop\disable.js. However, this did not solve my problem. when I try to "open with" I still get the message:
Windows cannot accessHowever, if I rename this file to disableme.txt (same content), I can do open with. So, there must be something about the .js file type itself that is preventing me from doing "open with" on this file.

Christopher Jay WolffWiggle My Legs, OwnerCommented:
Hmm.  Your box says "Network Error" and clearly that it is a permissions problem.  Please look again at security tab, owners, and effective permissions for Renee and Doris.  And are you doing this as Doris or admin?  Now with AD changes, do renee and doris appear the same?  Does doris now have domain admin user?

Here is a good starting point from Microsoft.  Various causes of this type of error and the associated steps to remedy for each situation.

Sometimes my permissions problems are due to inherited permissions.  Inherited from folders higher in the tree structure.  In your earlier posts renee's was inherited and doris' was not.  Maybe java needs to be updated or uninstalled and installed again for doris' workstation or for the server in how it deals with doris.  Maybe a java component needs to be available and isn't due to corruption, missing browser add-on, or add-on update, etc.  But we have to focus on the fact it's a network error.  If everyone's desktop is on the server, maybe the java component on the server needs to include doris?

Here is a thread about someone trying to get rid of what appeared to be java malware.  It was a root kit taken care of by TDSS Killer from Kaspersky.  Links are there.

Here is an explanation about problems with Windows UAC causing permissions errors.

Tomorrow I'll see if I can help round up a more appropriate expert.
jmarkfoleyAuthor Commented:
Microsoft keeps me in a constant state of confusion. Indeed, I get the error shown in my previous message if I right-click and select Open With > Choose Default program. However, when right-clicking and selecting 'Properties', in order to investigate based on your latest message, I notices an "Opens with" Change button. So I clicked it and, lo and behold, I was able to select Notepad! (see image). Now, even as a .txt file, I still get the error with "Open With > Choose Default program", but can change it at will via the properties > Change button. Is there an explanation?

Notice (in the image) that I am still on the AD redirected folder: \\mail.hprs.local\Users\doris\Desktop.

Notice (in the image) that there is no Security tab -- as there are in the images I posted in ID: 41740160. It there an explanation?
Christopher Jay WolffWiggle My Legs, OwnerCommented:
does this video on putting in the security tab do it?
Christopher Jay WolffWiggle My Legs, OwnerCommented:
I think you should investigate this huge amount of material on UAC also.

Also, I typed in "UAC and security" into the EE search box and had a bunch of results.  For instance...
Please click on and read McKnife's reference.
Davis McCarnOwnerCommented:
You guys are way down this path; but, did anyone notice that Doris is not joined to the domain?  The first image posted shows radically different characteristics with Doris getting her permissions from her own local PC and Renee getting hers from the domain controller.
java scripts can also be controlled by internet explorer with windows.
try disabling it there as well.
Enable or Disable JavaScript in Internet Explorer 11
jmarkfoleyAuthor Commented:
Christopher Jay Wolff: I haven't looked at the video yet, but will do so tomorrow as that may resolve my question on why the Security tab is missing. I have been exploring the UAC thing. I haven't messed with UAC on Doris' computer because her setting is the same as all the other workstations that had no problem with the "Open with" mechanism -- still trying to determine what is different.

Davis McCarn:
did anyone notice that Doris is not joined to the domain?
Initially true, but if you look at the image in my posting ID: 41749848, her desktop now shows \\mail.hprs.local\Users\doris\Desktop, so I think I have that one partial fixed (still some issues which I am dealing with in a separate question:

java scripts can also be controlled by internet explorer with windows.
These workstations are using Firefox, but in any case I'm not sure about disabling javascript per se. Our local web applications pretty much all have javascript and javascript in the actual webpages I don't think is a problem. The problem is with downloaded .js files run by Windows Jscript which, as I understand it, has javascript extension that permit updating of the file system -- normal webpage embedded javascript cannot do that.
Davis McCarnOwnerCommented:
So now her login screen specifically has her logging into mail.hprs.local\doris or clearly says she is logging into the domain?
If it doesn't, none of the GPO's (like folder redirection and permissions) are being applied.
Davis McCarnConnect With a Mentor OwnerCommented:
Save this as Add-Open-With-Back.reg and then merge it:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Open With]

[HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\Open With EncryptionMenu]

You'd need to reboot afterwards; but, if that doesn't put the Open With context menu back, the PC or her login has permissions issues (period).
Christopher Jay WolffConnect With a Mentor Wiggle My Legs, OwnerCommented:
Here is a Windows 7 step by step and some downloadable default values for different file types.

In this following Windows 8.1 link, the author's main two follow on links are dead but the article reminds us to use the control panel to have defaults associations restored.  We've probably all done this but I had forgotten after not doing it for a couple years.

I would certainly use a registry cleaner when done with all this, like one Davis recommended for me called CCleaner

jmarkfoleyAuthor Commented:
I've not pursued the additional suggested solutions since I was able to get it done via the alternate path described in my accepted solution post.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.