Possible bug or config issue under Windows 7 x64 -- Permissi

Things you’d like to miss in the future...
Post Reply
eurytos
Posts: 200
Joined: 29 Jan 2008 15:53

Possible bug or config issue under Windows 7 x64 -- Permissi

Post by eurytos »

This may have come up before, I tried searching the forums but 7 and 64 are 'to short' and get ignored which leads to million pages of 'windows' results. So this could be documented somewhere but I cannot find it.

Ok,
Here is my situation. I will be specific in case this is a new issue..
If I launch powershell from 'start --> run' or 'programs --> accessories --> powershell' it behaves differently then if I click on the shortcut under xy. The version I launch under xy does not have the same permissions. This holds true even if I 'right-click --> run as --> administrator' inside of xy. But, if I right click on the running powershell window on the taskbar and select run as administrator I now get the correct permissions. I have also used windows explorer to browse to the same shortcut and launch it and it runs correctly.

Is there a config or command line option I should be adding to XY when I run it? It's possible this problem has something to do with my powershell config and not XY but it is weird that the application behaves differently depending on if I launch it from under xy or outside of it.

If I use powershell to browse the registry to: Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds

under the shortcut outside of xy I get:

Name : Microsoft.PowerShell
ValueCount : 2
Property : {Path, ExecutionPolicy}
SubKeyCount : 0

Name : Microsoft.SqlServer.Management.PowerShell.sqlps
ValueCount : 2
Property : {Path, ExecutionPolicy}
SubKeyCount : 0

Name : ScriptedDiagnostics
ValueCount : 1
Property : {ExecutionPolicy}
SubKeyCount : 0

under the shortcut inside xy I get:

Name : Microsoft.PowerShell
ValueCount : 2
Property : {Path, ExecutionPolicy}
SubKeyCount : 0

Name : ScriptedDiagnostics
ValueCount : 1
Property : {ExecutionPolicy}
SubKeyCount : 0


That missing Microsoft.SqlServer.Management.PowerShell.sqlps is killing me. This issue isn't life threatening or anything now that I know what is going on (or at least think I do). But I wonder if any of my other applications will have this same issue?

Thanks,
Steve

edit: wanted to add that I have replaced windows explorer with xy as default file manager, I dont know if that would have any bearing on this? The laptop is new so xy has only been installed 2 weeks and I didn't bring any config settings over from prior pc.

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Possible bug or config issue under Windows 7 x64 -- Permissi

Post by nas8e9 »

eurytos wrote:This may have come up before, I tried searching the forums but 7 and 64 are 'to short' and get ignored which leads to million pages of 'windows' results. So this could be documented somewhere but I cannot find it.

Ok,
Here is my situation. I will be specific in case this is a new issue..
If I launch powershell from 'start --> run' or 'programs --> accessories --> powershell' it behaves differently then if I click on the shortcut under xy. The version I launch under xy does not have the same permissions. This holds true even if I 'right-click --> run as --> administrator' inside of xy. But, if I right click on the running powershell window on the taskbar and select run as administrator I now get the correct permissions. I have also used windows explorer to browse to the same shortcut and launch it and it runs correctly.

Is there a config or command line option I should be adding to XY when I run it? It's possible this problem has something to do with my powershell config and not XY but it is weird that the application behaves differently depending on if I launch it from under xy or outside of it.

If I use powershell to browse the registry to: Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds

under the shortcut outside of xy I get:

Name : Microsoft.PowerShell
ValueCount : 2
Property : {Path, ExecutionPolicy}
SubKeyCount : 0

Name : Microsoft.SqlServer.Management.PowerShell.sqlps
ValueCount : 2
Property : {Path, ExecutionPolicy}
SubKeyCount : 0

Name : ScriptedDiagnostics
ValueCount : 1
Property : {ExecutionPolicy}
SubKeyCount : 0

under the shortcut inside xy I get:

Name : Microsoft.PowerShell
ValueCount : 2
Property : {Path, ExecutionPolicy}
SubKeyCount : 0

Name : ScriptedDiagnostics
ValueCount : 1
Property : {ExecutionPolicy}
SubKeyCount : 0


That missing Microsoft.SqlServer.Management.PowerShell.sqlps is killing me. This issue isn't life threatening or anything now that I know what is going on (or at least think I do). But I wonder if any of my other applications will have this same issue?

Thanks,
Steve

edit: wanted to add that I have replaced windows explorer with xy as default file manager, I dont know if that would have any bearing on this? The laptop is new so xy has only been installed 2 weeks and I didn't bring any config settings over from prior pc.
I haven't seen this particular issue in this forum before, but it's probably to do with the fact that the 64-bit version of Windows 7 comes with both 32- as well as 64-bit versions of PowerShell. XYplorer, being a 32-bit app, presumably starts the 32-bit version (I'm not clear how exactly you start PowerShell from within XYplorer) whereas Windows Explorer (being 64-bit) starts the 64-bit version.

The above presupposes that the missing Microsoft SQL Server management thing is part of the 64-bit version of SQL Server, of course :).

eurytos
Posts: 200
Joined: 29 Jan 2008 15:53

Re: Possible bug or config issue under Windows 7 x64 -- Permissi

Post by eurytos »

nas8e9 wrote: I haven't seen this particular issue in this forum before, but it's probably to do with the fact that the 64-bit version of Windows 7 comes with both 32- as well as 64-bit versions of PowerShell. XYplorer, being a 32-bit app, presumably starts the 32-bit version (I'm not clear how exactly you start PowerShell from within XYplorer) whereas Windows Explorer (being 64-bit) starts the 64-bit version.

The above presupposes that the missing Microsoft SQL Server management thing is part of the 64-bit version of SQL Server, of course :).

Wow thanks!!

I thought I had determined that the shortcuts were launching the correct version but I just tried again and you are right!
if I launch the 32 bit powershell outside of xy I get the same errors and this is the path:
C:\Windows\syswow64\Windowspowershell\v1.0\powershell.exe

The 64 and 32 bit shortcuts inside of xy both launch that same version.
64 bit outside of xy runs this:
C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe

Now, how do I go about changing that? Or is it not possible?
I think I read something about installing the both 32 and 64 bit versions where possible to fix context menu type issues. Maybe that will work here as well? Although I would be in the 32 shell, I don't really care if I can work with the snapins.

Thanks for setting me straight.
Steve

nas8e9
Posts: 2232
Joined: 21 Jun 2008 14:50

Re: Possible bug or config issue under Windows 7 x64 -- Permissi

Post by nas8e9 »

eurytos wrote:I thought I had determined that the shortcuts were launching the correct version but I just tried again and you are right!
if I launch the 32 bit powershell outside of xy I get the same errors and this is the path:
C:\Windows\syswow64\Windowspowershell\v1.0\powershell.exe

The 64 and 32 bit shortcuts inside of xy both launch that same version.
64 bit outside of xy runs this:
C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe

Now, how do I go about changing that? Or is it not possible?
I think I read something about installing the both 32 and 64 bit versions where possible to fix context menu type issues. Maybe that will work here as well? Although I would be in the 32 shell, I don't really care if I can work with the snapins.

Thanks for setting me straight.
Steve
Please see the WOW64 Redirection topic in XYplorer's Help.

Some quick Googling suggested two generic workarounds:
1. install the equivalent 32-bit version of the missing objects, if available;
2. if running PowerShell scripts, insert a test in the script for the bitness of the PowerShell version it runs under; if it's the wrong bitness, launch a separate PowerShell instance of the correct bitness to run the script.

Hope this helps.

eurytos
Posts: 200
Joined: 29 Jan 2008 15:53

Re: Possible bug or config issue under Windows 7 x64 -- Permissi

Post by eurytos »

nas8e9 wrote: Please see the WOW64 Redirection topic in XYplorer's Help.

Some quick Googling suggested two generic workarounds:
1. install the equivalent 32-bit version of the missing objects, if available;
2. if running PowerShell scripts, insert a test in the script for the bitness of the PowerShell version it runs under; if it's the wrong bitness, launch a separate PowerShell instance of the correct bitness to run the script.

Hope this helps.

I found this which appears to work like a charm! (sort-of)
I replaced the path in the shortcut from:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
to this:
%WINDIR%\sysnative\WindowsPowerShell\v1.0\powershell.exe

I say sort-of, because it appears to keep working as long as I run it from within xy, but if I launch it from outside of xy it switches it back to the original path.
This should work for me because I will always launch these shortcuts from xy.

Thanks again!

Post Reply