Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

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?
Avatar of Christopher Jay Wolff
Christopher Jay Wolff
Flag of United States of America image

Hmmm.

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?
Avatar of Mark
Mark

ASKER

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.
properties.jpg
advanced.jpg
owner.jpg
effPermissions.jpg
Avatar of David Johnson, CD
js-handler.reg
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.js]
@="JSFile"

[HKEY_CLASSES_ROOT\.js\OpenWithProgids]
"Notepad"=""

[HKEY_CLASSES_ROOT\.js\OpenWithProgids\Shared]
@="Shared key to keep this from being removed with install/uninstall of side-by-side components."

[HKEY_CLASSES_ROOT\.js\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

Open in new window

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.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724873(v=vs.85).aspx

and

https://support.microsoft.com/en-us/kb/310516


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.

http://compnetworking.about.com/od/windowsnetworking/g/unc-name.htm
Avatar of Mark

ASKER

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.
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.

http://www.digitalcitizen.life/how-view-list-all-shared-network-folders?page=1



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.

https://technet.microsoft.com/en-us/library/bb490712.aspx




Also, if you enter...

net use

it will show connections.  There are parameters you could look into for net use here.

https://technet.microsoft.com/en-us/library/bb490717.aspx?f=255&MSPPError=-2147217396
Avatar of Mark

ASKER

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:
User generated imageHowever, 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.

Ideas?
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.
https://support.microsoft.com/en-us/kb/2669244

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.
http://answers.microsoft.com/en-us/protect/forum/mse-protect_scanning/how-do-i-find-and-remove-a-javascript-virus/698c2f2c-1fa3-4011-8674-aca04cf2cb79

Here is an explanation about problems with Windows UAC causing permissions errors.
http://www.think-like-a-computer.com/2011/05/11/windows-access-denied-folder-administrator/

Tomorrow I'll see if I can help round up a more appropriate expert.
Avatar of Mark

ASKER

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?
jsProperties.jpg
does this video on putting in the security tab do it?

https://www.youtube.com/watch?v=T4ehnK6ZjFs
I think you should investigate this huge amount of material on UAC also.

https://www.youtube.com/watch?v=9t7HtG_wmkE




Also, I typed in "UAC and security" into the EE search box and had a bunch of results.  For instance...

https://www.experts-exchange.com/questions/28907419/Strict-Volume-Permissions-on-Windows-When-UAC-is-Enabled.html
Please click on and read McKnife's reference.
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
http://www.technipages.com/internet-explorer-enabledisable-javascript
Avatar of Mark

ASKER

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: https://www.experts-exchange.com/questions/28962441/How-to-get-folder-redirection-working.html.

Merete:
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.
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.
ASKER CERTIFIED SOLUTION
Avatar of Mark
Mark

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

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.