Showing posts with label windows-10. Show all posts
Showing posts with label windows-10. Show all posts

Friday, September 21, 2018

Pip --user installs package to Default user directory on Windows 10

Leave a Comment

I have a problem on Windows 10 where both Python 2.6 and 2.7 are installed.

python -m pip install myPack --no-index --find-links=. --user 

When running this command with user AutoUser it installs myPack to Default user directory C:\Users\Default\Python\Python27\site-packages or C:\Users\Default\Appdata\Roaming\Python\site-packages instead C:\Users\Autouser\Appdata\Roaming\Python\site-packages

  • Installation is automatic soon after windows logon, but I can see in logs that "query user" returns a row with AutoUser (before calling pip).
  • Other OS don't have this problem.
  • Reproduction is unstable on Windows 10: maybe 1 time of 100.
  • Truth that python 2.6 is also installed on these machines, but I'm not sure it is meaningful: 2.6 goes later than 2.7 in Path system variable. Here they write it could be a problem, but pip doesn't confuse python versions, it confuses users' directories.

Path:

C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts\;C:\Python26\;C:\Python26\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin; 

Python version:

python --version Python 2.7.13 

Pip version:

python -m pip --version Pip version: pip 9.0.1 from C:\Python27\lib\site-packages (python 2.7)  

1 Answers

Answers 1

You can try setting the install target with the --target option like so:

pip install --target=C:\Users\Autouser\Appdata\Roaming\Python\site-packages package_name 

If that doesn't work, another option is to try using --install-option like this:

pip install --install-option="--prefix=$PREFIX_PATH" package_name 

Finally, if all else fails, here's one more way to do it:

PYTHONUSERBASE=/path/to/install/to pip install --user 

You can specify which python version to install the package for by using python2.x -m pip install ...

Hopefully one of these helps you! :)

Read More

Sunday, July 8, 2018

Fail to pull docker image using LCOW via SSL

Leave a Comment

I use docker engine 18.05.0-ce-win67 (18263). On my macOS I have succeeded in pulling images from my company's private docker registry. then I

  • copied the files client.cert, client.key and ca.crt to my Windows 10 into:

    • C:\ProgramData\Docker\certs.d\docker.company.net\
    • C:\Users\<user>\.docker\certs.d\docker.company.net\
  • imported the certificates into my Windows global certificates store and user certificates store.

Sadly, I still get this:

> docker pull <company.docker.url>/<some image> Error response from daemon: Get https://<company.docker.url>/v2/: remote error: tls: handshake failure 

Two more things to notice:

  • If I switch to Windows Containers, I can successfully login or pull images, only fails with LCOW.
  • My private cert is signed by an intermediate cert, and the intermediate cert is contained in my client.cert.

Some references I have read:

2 Answers

Answers 1

I would try two things:

  • Did you tried: docker login first before to pull the images?
  • Restart the client and repeat.

Answers 2

I had this error on windows, too. In my case, restarting the docker daemon helped.

Read More

Tuesday, June 12, 2018

Windows 10 Pro -version 1803 bluetooth Profiles Access

Leave a Comment

We are looking to access and use Bluetooth profiles in our WPF application using C# in Visual Studio 2017.

Issue details:

Platform: Windows 10 Pro - version 1803.

Issue brief: We are trying to access Bluetooth profiles via desktop(c#) of connected phones, however on windows 10 the profile show enable but the profiles are not working eg: HFP connects, however, the voice is not heard

We have tested this on following Bluetooth devices:

1.Bluetooth CSR 4.0 Dongle (CSR8510 A10) (Note: this Bluetooth connects and show HFP and works as expected, however, the Bluetooth does not show on the device list and hence we cannot connect programmatically using c#)

2.IOGEAR's Bluetooth 4.0 (Model GBU521W6) (Shows on device list and our application can detect a device, however, HFP is not working as expected both from the application or from normal device section)

Required Profiles:

1.Hands-Free Profile (HFP) 2.Message Access Profile (MAP) 3.Phone Book Access Profile (PBAP)

We have Already Tried with following:

  1. Updating drivers
  2. Tried uninstall install many times
  3. Used android, ios, and windows phone's

Side note: Our application with same code works on windows 7

1 Answers

Answers 1

MAP abd PBAP is not a problem because both are OBEX based (which is RFCOMM).

However there can be some problems with HandsFree. It works great with BlueSoile drivers. But with standard microsoft may not work.

The first step it to use BluetoothSetServiceState with HFP UUID to tell windows to install drivers for your device's HFP profile. If function succeed you should see 2 audio devices appeared in your system: one is Inout and other is Output. You can find them using any media API (DirectSound, legacy API).

To be able to work with PBAP and MAP you need anyhow connect to your device through RFCOMM. WinSock or any other way is good.

Please note that the method above works only with Microsoft Bluetooth drivers. Other drivers (BlueSoleil, Toshiba) have absolutely different API so you have to add it into your application if need to support them.

Or you can simple take a look on BluetoothFramework

Read More

Friday, June 1, 2018

Chrome on Windows 10 Freezing on Script Execution, Works Perfectly on Mac

Leave a Comment

I have an issue I assumed was related to the Windows 10 April CU with Chrome freezing and BSOD, and may well be, but what I've noticed is that in Windows Chrome (v66 and v67dev) the main thread is blocked and frozen, and won't allow scrolling for example, even though other Windows and other panels of Chrome are functioning without being frozen.

The actual performance in Mac Chrome is comparable in terms of script execution, but scrolling is allowed and the main thread does not appear blocked.

This same code also works perfectly in Windows Edge and Firefox without the freezing behavior.

This particular app is written in Ember CLI, but appears to be Chrome and Windows specific.

Windows 10 Chrome - JS Execution of long running script

1 Answers

Answers 1

Windows 10 is a service, which means it gets better through periodic software updates.

This issue you report has plenty of media coverage and has to do with bugs in W10's April update:

. https://www.theguardian.com/technology/2018/may/04/windows-10-april-2018-update-bug-locks-machines-running-chrome-cortana

. https://www.cnet.com/news/windows-10-april-2018-update-bugs-microsoft-fix-may-8/

. https://www.theverge.com/2018/5/3/17315180/microsoft-windows-10-april-2018-update-chrome-crash-freezing-problems

The great news is you usually don’t have to do anything: If you have enabled automatic updates, new updates will automatically download and install whenever they’re available, so you don’t have to think about it.

Read More

Wednesday, May 23, 2018

Why is this WinForms window rendering artifacts while dragging?

Leave a Comment

I'm supporting a .NET 4 WinForms app written in VB.NET and built w/ Visual Studio 2015. In Windows 7 things are fine, but in our Windows 10 testing there is a rendering problem with a form window in the main application window. Happens on multiple machines (all Dell laptops). Dragging form window quickly, and over the main window’s top or bottom edges (highlighted in yellow in screenshot), causes it to freak out and leave graphical artifacts, like so:

enter image description here

Are there window properties or settings that can be adjusted to prevent this?

thanks!

2 Answers

Answers 1

The repainting issues are generally attributed to the fact that the main thread may be locked doing some process and is not able to repaint. Are you using multithreaded approach in your application. A good starting point would be to check if there is anything locking the main thread.

Answers 2

Each WinForms Control has a property called DoubleBuffered. It is intended to reduce such unwanted effects. When double buffering is enabled, the rendering operations take place in the memory first. Then only the last one is applied to the graphics device. More details here.

Double buffering is disabled by default for forms. So setting the DoubleBuffered property for your form to true will resolve the problem.

UPDATE

I misread the comment stating that the DoubleBuffered is already set. Please, make sure the DoubleBuffered property is set for both your MDI child and MDI parent forms. Also, make sure that the driver for the graphics card is the manufacturer provided as opposed to the default one.

Read More

Friday, April 27, 2018

System freezes when parent and child connectivity

Leave a Comment

I have used Pouchdb with Electron, connected two system through local LAN and using the single database which is a parent and another child system will be using the same pouchdb database.

used express-pouch to make child system to connect parent pouchdb.

There is background sync will be running in parent system from couchDB to pouchDB.

The connection is working as expected, Problem will be after some time of connection system freezes in both parent and child. checked task manager disk 100%, memory 100%.

Both System - windows 10 pro - Ram - 4GB

1 Answers

Answers 1

Try to increase memory allocated for your script with the option --max_old_space_size=<size>.

Try too to monitor number of emitter you have with method emitter.getMaxListeners() and emitter.listenerCount(eventName), and increase the number with emitter.setMaxListener(n)

Read More

Wednesday, March 21, 2018

File basecsp.dll is missing from system32 folder

Leave a Comment

My installation checks for existence of file basecsp.dll (Microsoft Base Smart Card Cryptographic Service Provider) in System32 folder. The check was intended for old Windows XP machines that do not have it installed by default. But now I have a case where it was missing from Windows 10 machine. How can that be? Did they change the name of the file? Is it stripped from some distribution? What should the user do to enable it, or if it is enabled how should I verify that?

2 Answers

Answers 1

it helped me to fix the error associated with Basecsp.dll. Go to here

Answers 2

IT CAN HAPPEN related to missing or corrupt basecsp.dll files. Because basecsp.dll is an external file, it presents a great opportunity for something undesirable to occur.

Can be caused by:

  1. Invalid or corrupt basecsp.dll registry entry,
  2. Virus or malware infection which has corrupted the basecsp.dll file.
  3. Microsoft hardware failure, such as a bad hard drive, which has corrupted the basecsp.dll file.
  4. Another program overwrote the required version of basecsp.dll.
  5. Another program maliciously or mistakenly deleted the basecsp.dll file
  6. Another program uninstalled the basecsp.dll file.

Solution:

  1. Manually Register Basecsp.dll Using Microsoft Register Server

  2. Repair Invalid Basecsp.dll Registry Entries

  3. Remove or Restore Basecsp.dll from the Windows Recycle Bin

  4. Conduct a Full Malware Scan of Your PC

  5. Update Your PC Device Drivers

  6. Utilize Windows System Restore to "Undo" Recent System Changes

  7. Run Windows System File Checker

  8. Install All Available Windows Updates

  9. Perform a Clean Installation of Windows`

Read More

Tuesday, August 22, 2017

MVC 5 - Precompiling views only works from the command prompt

Leave a Comment

I have a strange issue that hopefully someone can help me with. I got a new laptop and I'm trying to publish the same ASP.NET MVC 5 project on the new machine with precompiled views. However, when I do a publish with "Precompile during publishing" option checked, it does not create the precompiled views. Now, if I copy the exact command that it ran and run it in the Command Prompt, the precompiled views are created.

Here's the details. Both machine have Windows 10 Anniversary Update (Version 1607) with Visual Studio 2013 Update 5. Publishing the app on the old machine with the same publish profile generates the precompiled views. On the new machine, publishing from the "Publish Web" dialog runs without errors, but no precompiled views are generated. I then copied this exact command to the Command Prompt that VS used to precompile:

C:\windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe -v / -p C:\MyApp\obj\Release\AspnetCompileMerge\Source -c C:\MyApp\obj\Release\AspnetCompileMerge\TempBuildDir 

When I ran it, it created the precompiled views in the TempBuildDir\bin directory!

The only difference I can think of between the machines are the Windows Updates.

Any ideas? Thanks.

1 Answers

Answers 1

Do you use the x64 verson of Windows?

Also you can try set $(AspnetCompilerPath) manually:

msbuild.exe /p:AspnetCompilerPath="C:\windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe" 

or add it to your project:

<PropertyGroup>   <AspnetCompilerPath Condition=" '$(AspnetCompilerPath)'=='' " >C:\windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe</AspnetCompilerPath> </PropertyGroup> 

I've made this assumption, because the Microsoft.Web.Publishing.AspNetCompileMerge.targets file contains the string:

 We can't use the in-place aspnet_compiler because it will output to the aspnet temp folder which is only suiteable to run on the current machine. 
Read More

Friday, February 17, 2017

Processing LoadLibrary failed with error 1114

Leave a Comment

I am running Processing 3.2.4 on Windows 10, and am trying to run a simple 3D program:

void setup(){    size(1200, 800, P3D); }  void draw(){   } 

Whenever I try running the program, instead of getting my program window, I am getting a popup with the following error:LoadLibrary failed with error 1114: A dynamic link library (DLL) initialization routine failed.

What does this error mean, and how can I fix it? (I already tried reinstalling Processing). I am running Processing 3.2.4 on Windows 10, and am trying to run a simple 3D program:

void setup(){    size(1200, 800, P3D); }  void draw(){   } 

Whenever I try running the program, instead of getting my program window, I am getting a popup with the following error:LoadLibrary failed with error 1114: A dynamic link library (DLL) initialization routine failed.

What does this error mean, and how can I fix it? (I already tried reinstalling Processing).

Edit: After clicking close on the error message, the console prints:

Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting.

The default graphics renderer works. Restarting my computer or moving the installation to another folder hasn't worked either.

1 Answers

Answers 1

I'm not sure why this works, but go to Battery Power plans, and edit the Switchable Dynamic Graphics -> Global Setting inside the advanced power plan settings and set both of the options to Maximize Performance.

Read More

Saturday, April 16, 2016

Extent of Windows UWP Ink Additions

Leave a Comment

From highlights of Microsoft Build 2016, I saw Microsoft was pushing its new Ink API. What exactly are the new additions? Can Ink

-Understand handwriting and digitize it?

-Understand Math/Equations and digitize it (ie Latex)?

Are there any other APIs that can do this for UWP or Unity?

How would I go about creating one myself? Jeans link refers to custom recognition. Is this what I'm looking for? I feel like there should be an option to add symbols to the lookup dictionary.

1 Answers

Answers 1

Yes for the first point, you can convert ink strokes to text using handwriting recognition.

Recognize ink strokes

For math and equations, didn't see any default Recognizer at the moment.

Read More

Monday, April 4, 2016

IExpress.exe on Windows 10 is producing an EXE incompatible with Windows XP

Leave a Comment

Similar to this issue.

I've being using IExpress (included with Windows) for years to package up my bootstrapper EXE and .NET application MSI into a self-extracting installer file. (My app is 32-bit, so I've used the version of iexpress.exe in %windir%/SysWOW64)

I recently moved from Windows 8.1 to Windows 10.

Without changing anything about my code, using IExpress on Windows 10 is resulting in an EXE that won't run on Windows XP (getting "[FileName].exe is not a valid Win32 application").

Using IExpress on Windows 8.1, 8 or 7, it works fine.

Can anyone shed some light or provide a solution??

(I tried copying the iexpress.exe from Windows 8 (file version 11.0.9600.17416) into Windows 10 and using it instead but the same thing happens.)

1 Answers

Answers 1

Yes another reminder that XP is truly over and done with. When I run dumpbin.exe /headers on the EXE file that IExpress generates, I see:

  OPTIONAL HEADER VALUES        ....        10.00 operating system version        10.00 image version         6.00 subsystem version        .... 

The subsystem version number is the first show-stopper, 6.00 is the version number of Vista. That is fixable, you can run Editbin.exe to change it with the /SUBSYSTEM option, XP is 5.01

The operating system and image version is the bigger problem, can't fix that with Editbin.exe. Not actually sure how much attention XP pays to its value, getting 10.00 is very new. I don't have a machine with XP anymore, just try it.

Copying the old version of IExpress.exe is not enough. It uses c:\windows\syswow64\makecab.exe to actually get the job done. I see some cursory evidence that it is the actual source of the EXE header content. Don't just blindly copy that EXE into the windows directory, that's too risky. Keep it separate.

The sane way to go about this is otherwise to keep a bootable copy of XP around, either on its own machine or a VM. You need it anyway to troubleshoot customer problems that are specific to XP. Pay the hassle of still having to support XP forward to the customer and they tend to do the wise and necessary thing a lot quicker. Can't help you with that.

Read More

Saturday, March 12, 2016

How to create an installer for a Windows 10 HWA bundle?

Leave a Comment

I've built a Windows 10 Hosted Web App (HWA) using MS Visual Studio 2015. Now, I've investigated if there is a way to create a standalone installer for it - which bundles the generated .appx and related files into a one-click executable. Sadly, so far, I've only succeded to sideload the HWA bundle by using the provided PowerShell script.

In this context, I've looked at the NSIS (Nullsoft Scriptable Install System) to create an Installer for this HWA. So far there seems to be only "preliminary Windows 10 support" according to the latest changelogs (see section Version F.2 3.0 Beta 2).

So my questions are:

  1. How can I create a standalone installer without the need to invoke PowerShell installation routines?
  2. What does "preliminary Windows 10 support" mean for appxapplications?

Note:

I'm interested in non-Windows-Store based approaches as the app should only be distributed to a group of verified customers by local installation.

EDIT-1:

I'm open to ideas on other (non NSIS-based) installer creation approaches.

1 Answers

Answers 1

NSIS does not support HWA apps out of the box. If you know which Windows APIs to call you could probably use the System plugin or create a custom NSIS plugin. I had a quick look on MSDN but I could not find which API you are supposed to call to sideload apps.

The part about preliminary Windows 10 support has nothing to do with Modern apps. It is mostly about general compatibility and version checking.

Read More