How to make Midnight Commander open file with default application in Windows - windows-10

I recently started using Midnight Commander on my Windows 10 system, but I can't seem to get it to handle images or pdf files properly. When I select the file and press Enter, nothing happens. I've tried altering the extension file to the following.
default/*
Open=(%f)
After making that change, I get this error.
C:/Users/MyUser/AppData/Local/Temp/mc-MyUser/mcext2509Z1: line 13: C:/Test.txt: Permission denied
I am using the Powershell v7.3.2 in Windows Terminal v1.15.3465.0 on Windows 10 v.19044.2486

Try
default/*
Open=start %f
Try start C:\Test.txt from the cmd command line to test.
See https://superuser.com/q/550138. Try
start "" %f
For Powershell try
Start-Process %f

Related

running SALOME in windows 10 gives "Can't find a free port" error

I'm trying to run SALOME GUI using run_salome.bat. GUI doesn't start and gives "Can't find a free port to launch omniNamesTry to kill the running servers and then launch SALOME again." error.
SALOME version 9.4
Windows 10
I have searched the files in C:\Users<username>\AppData\Roaming that contain "omniORB_PortManager" in their name and deleted them.
Here the issue can be resolved be removing several files generated by SALOME.
start a Windows file browser
in the search bar, type: %userprofile%\.config\salome
delete all files present in that directory
in the search bar, type: %APPDATA%\salome
remove all files present in that directory
in the search bar, type: %APPDATA%
delete all files wich name starts with: .omni
delete file: .salome_PortManager.cfg
Finally, I strongly suggest to raise such questions directly on SALOME forum at this link

Sybase 16 startserver failed due to missing libsapcrypto.so

We've installed Sybase 16 Express in our Linux box, it was able to startup right after the installation. When we recently try restarting it with the startserver -f RUN_FILE command, it failed to find the libsapcrypto.so file.
~/sap/ASE-16_0/bin> ../sap/ASE-16_0/bin/dataserver: error while loading shared libraries: libsapcrypto.so: cannot open shared object file: No such file or directory
We searched this file, multiple matches presented in the following paths:
./DM/OCS-16_0/lib3p/libsapcrypto.so
./DM/OCS-16_0/lib3p64/libsapcrypto.so
./DM/OCS-16_0/devlib3p64/libsapcrypto.so
./DM/OCS-16_0/devlib3p/libsapcrypto.so
./DM/REP-16_0/lib64/libsapcrypto.so
./DataAccess/ODBC/lib/libsapcrypto.so
./DataAccess64/ODBC/lib/libsapcrypto.so
./OCS-16_0/lib3p/libsapcrypto.so
./OCS-16_0/lib3p64/libsapcrypto.so
./OCS-16_0/devlib3p64/libsapcrypto.so
./OCS-16_0/devlib3p/libsapcrypto.so
Since this hasn't been answered yet, running this command worked for me:
. /opt/sap/SYBASE.sh
Note the different syntax to make sure the environment variables are set in the terminal session, as opposed to using this syntax:
/opt/sap/SYBASE.sh

how to run the admin command prompt using python?

I want to run a script on the admin cmd prompt using python os.system
import os
import sys
import keyboard
import time
os.system('cls')
print('+'* 60)
os.system('netsh wlan set hostednetwork mode=allow ssid=test3 key=987654321')
time.sleep(2)
p = input('')
keyboard.press_and_release('enter')
print('#' * 60)
os.system('netsh wlan start hostednetwork')
time.sleep(2)
keyboard.press_and_release('enter')
v = input('')
How can I call the admin cmd prompt ?
Thank you in advance
I found a way to make this happen
so my idea is to to create script to share wifi using python, and the problem is you have to execute the script using admin command prompt. and to solve that, follow my steps:
1 - create the python script for the commands(copy mine in the original question)
2 - create a simple text file like this one
pause
python name.py
pause
3 - save it under the extension of " .bat " (example.bat)
4 - go to your system directory (mine is "C:\Windows\System32")
5 - copy the the batch file there
6 - create a shortcut for this batch file (it will ask to be in your desktop, click OK)
7 - go to the properties of this shortcuted file click on advanced and give it the admin
access - click OK
8- copy or cut your script.py file to the same directory (mine is "C:\Windows\System32")
and that's it, just launch your batch file in the desktop and here you go everything works fine.

WScript.shell is not working with IIS 7.5 and Windows 7

I have to run .vbs through classic asp. From past quite a few days, I am working on this, but still can't find a solution.
My code is as follows:
Set oWshShell = Server.CreateObject("WScript.Shell")
'sCmd = "%systemroot%\sysnative\cmd.exe"
'oWshShell.run "c:\windows\system32\cmd.exe", 1, TRUE
'oWshShell.run("%comspec% /c "C:\inetpub\wwwroot\sharedagents\print.vbs",1,TRUE)
'owshshell.run sCmd
Set oWshShell=Nothing
I tried all the methods that are commented out, but while executing the page, Browser/IIS hangs indefinitely. I have tried all sorts of variation to put in oWshShell, but still I am being able to put it through. I have checked permissions, Registry and all sorts other tweaks that can be possible.
Is it due 32-bit/64-bit issue or something else?
If you are running it on Windows 7 64-bit, your following code must be changed:
from:
'oWshShell.run "c:\windows\system32\cmd.exe", 1, TRUE
to:
'oWshShell.run "c:\windows\SysWOW64\cmd.exe", 1, TRUE
Also, verify if the cmd is running under administrator rules
Windows 7 x64: Execute a 64bit exe/script from a 32bit command prompt? may help you.

pdf2swf.exe Error on IIS

I am trying to convert PDF files to SWF using pdf2swf on windows 2008 server via Process proc = new Process().
When running from Visual Studio, everything works fine. But when running from IIS, I get this on most files:
ERROR Internal error: No current splash fontinfo
ERROR Internal error: No current splash fontinfo
ERROR Invalid charid 3 for font 00f896d8 (0 characters)
ERROR Invalid charid 615 for font 00f896d8 (0 characters)
ERROR Invalid charid 602 for font 00f896d8 (0 characters)
I believe the reason is permissions but I don't know what I have to change.
Can anyone help me?
I've found solution right now. Im using windows service to convert from pdf to swf and I noticed wrong working directory. For me it was syswow64. PDF2SWF had no permissions to create temporary files. I set working directory property in ProcessStartInfo and now it works great.

Resources