which file can install a program on windows 7? - windows

Which of these files( in setup folder), if execute can install a program on windows 7 ?
1- setup.com
2-setup.ini
3-setup.inf

COM files are executable in Windows. You should be able to run setup.com from the CMD prompt by cding to the directory setup.com is in, and running setup or setup.com.
Keep in mind, COM files cannot be executed on 64-bit versions of Windows, since these editions lack NTVDM, the MS-DOS-emulating subsystem that handles COM file execution. You would instead need to emulate the 32-bit environment using an emulator like DOSBox.

setup.inf can be used to file copy and installation. I cannot remember setup.com installers for Windows programs.
msdn inf description

Related

Compiled Visual Basic Application gets Runtime Error 52 in Windows 8

The application that I compiled via Visual Basic 6 can run on my Windows XP computer. But when I execute the same executable on my other computer that runs Windows 8, I always get Runtime Error 52-Bad File name or number as soon as I launch it. I can't run the program even if there is no "Shell command" in that program which leads to a "Bad file name" error.
I used "Package and Deployment wizard" for the packaging process.
And also I registered the needed DLL's on the Windows 8 PC manually via the regsvr32 command line utility.
I also cleaned the whole registry via a registry cleaner (Wise Registry Cleaner). I used compatibility mode for Windows XP but nothing solved the problem.
Additional informations:
XP Version - SP 2
Windows 8 Version-8.1
VB - VB 6.0
Assuming that your code is
If Dir("C:/file.txt") = "" Then...
Change it to a backslash ("\")
After some research I found the answer for the problem. That was not a problem in the coding; it was ALL about windows 8 compatibility.
Go to the “Compatibility” tab of the properties window of the file and select “Windows XP SP2” under the “Compatibility mode”. That’s all
Windows 8 no longer allows you to write programmatically in the root of drive C:\ (and in many others 'system' folders like Program Files, Windows, System32, ...).
Try to use a sub-folder.

Bash on Windows - debug a python file with Visual Code or Visual Studio

I have a python file in my Bash on Windows environment.
Is it possible to debug it with Visual Code or Visual Studio?
Can a debugger be attached to the Linux python version that exists in the Bash on Windows environment?
I think you've got a few options for this. If you're attempting to debug a python file that's saved on your home directory in Bash on Windows, you can navigate to your home directory in Windows by going to "C:\Users\[windows username]\AppData\Local\lxss\home\[ubuntu username]\". Then you can open any of your projects or files saved on your home folder in Ubuntu. You can even make a shortcut on your desktop or something to make it easier to access this folder.
However, if you need the environment that you have on Bash for dependencies or python modules, your other option is to install a GUI and Linux-compatible IDE of your preference on Ubuntu, and use Xming on Windows to run the IDE on your screen. A tutorial on how to do this can be found here.
If you need to debug a linux python program from Visual Studio, a simple Google search yielded this. I haven't tried it but this seems to be the solution you are looking for. For connecting over the network to Bash on Windows from Windows, use localhost for the host.
Your best bet might be to just move the file. Your normal windows system is mounted under /mnt/c.
You can just copy it to your desktop by doing
cp (path to your file) /mnt/c/(your username)/Desktop
When you need to access or edit it from bash, just cd to that location (or wherever else you choose to store it).
Interesting other idea: you could mount cloud storage (e.g. google drive) via fuse in linux then set it up in windows. Copy the python to it and you can edit in windows and access in linux as needed. (Google is your friend here; look into google-drive-ocamlfuse or gdrivefs).
Hope this helps!
jBit
I would suggest making use of the Remote - WSL extension for Visual Studio code. It allows you to easily access your Windows Subsystem for Linux (WSL) and use it as a full-time dev environment.
Here is an article on how to set up Visual Studio Code Remote-WSL.
After that is set up, you can quickly load your python file in the VS Code editor using a command like: code path/to/python_file.py

How to enable bash commands in Windows CMD?

I've two Windows machines and both have bash installed. However, they differ in the way bash starts up:
Machine 1:
Typing "bash" starts the bash. Then I can type commands like ls.
Machine 2:
It seems like it starts bash and directly runs ls in it, by only typing "ls". After that it switches back to CMD automatically, like this:
Does anyone know which setting enables the behavior of machine 2? Everything looks the same for me. It's a nice feature and I want to enable it on machine 1 as well.
Bash on Ubuntu on Windows executables (binaries) cannot run from Windows applications such as cmd.exe or PowerShell.exe - Windows doesn't even see them as executable.
The likeliest explanation is that you've installed a separate Unix emulation environment such as GnuWin, which comes with native Windows binaries.
To see the location of your - by definition Windows-native - ls executable, run where ls, which will probably tell you what product it came with, such as
C:\Program Files (x86)\GnuWin32\bin\ls.EXE.
Note that the Ubuntu on Windows binaries are stored in a user-specific manner in
%LOCALAPPDATA%\lxss\rootfs\bin, but that is a moot point, given that you cannot invoke them from Windows.
In Windows 10, there is a built-in Linux subsystem (one of the greatest features of Windows 10). It gives you almost a complete Linux shell for various distributions, and you can almost do anything with it (user mode).
I bet it is installed on your first computer, and you are using that subsystem. In the latest version of this subsystem, you can run both Linux executables and Windows exe files.

Run "armasm.exe" failed: "The application was unable to start correctly (0xc000007b)

I installed both VS2013 and VS2015 Professional (full install), and both have a "armasm.exe" under the bin folder. I set the bin folder into "path" environment variable. When I tried "armasm /?" under cmd, it prompts out a dialog box with a red cross sign, saying that:
The application was unable to start correctly (0x000007b). Click OK to close the application.
I wonder if this program is for ARM CPU's assembly language. Does this program only run on ARM machine that installed VS?
How can I get it to run?
I assume you're talking about the armasm.exe file in the \VC\bin\x86_arm folder? If so, then no, that is an x86 binary, not an ARM binary. It will run on your machine.
It is actually an ARM cross-assembler for x86. That means it allows you to assemble ARM binaries on an x86 host. Think of it like the x64 cross-compiler for x86 (in the x86_amd64) folder. That can compile 64-bit binaries on a 32-bit x86 host.
The reason you can't get it to start is because the environment has not been set up correctly, and required dependencies cannot be located. When I try to start it, I get a more descriptive message than you do:
System Error:
The program can't start because msvcdis140.dll is missing from your computer. Try reinstalling the program to fix this problem.
You are meant to use the vcvarsx86_arm.bat batch file (in the same folder) to get your environment set up correctly, before trying to run any of the tools. Step-by-step:
Open a new Command Prompt.
Drag in vcvarsx86_arm.bat, and press Enter to run it. This sets up your environment to run the x86/ARM tools.
Drag in armasm.exe (or simply type armasm.exe into the prompt, unqualified). It will now run because the environment has been correctly set up (including the path, so that it can be found without requiring the full path to be entered).
There is also a \VC\bin\amd64_arm folder. This contains tools for ARM executables that run on x64 hosts. You use those in exactly the same way, except you launch the vcvarsamd64_arm.bat file in that folder first.
It is worth noting that I also see a \VC\bin\arm folder, but (at least in my install of VS 2015) that contains only one EXE: pgosweep.exe. Microsoft does not appear to provide an ARM assembler that runs on ARM platforms. Which makes sense—I don't think ARM is a supported host for development. Visual Studio certainly hasn't been ported to ARM. Just use the ARM tools on x86 or x64.

VB6 Legacy Code can't "Call Shell"

I am working on some legacy VB6 code and I am having my program break with this message:
and it then highlights this code:
I know that the specified locations exist per these screenshots:
I am running this Visual Studio 6.0 on a 64-bit Windows 7 machine. How can I make the program see shell?
command.com does not exist on 64 bit windows.
Try using C:\Windows\SysWOW64\cmd.exe instead. C:\Windows\SysWOW64 is a folder giving you backwards compatibility stuff for 32 bit.
But see the comment below (taken from Euro Micelli).
Really you should use %SYSTEMROOT\System32\cmd.exe instead. First, Windows is not always installed in C:\Windows; you should let the system figure that out. Second, using System32 is always correct for a 32-bit application: when running on Win32, it is the correct folder; when running on Win64, Windows will map %SYSTEMROOT%\System32 to %SYSTEMROOT%\SysWOW64
I use vb6 and windows 7.
I've done the same thing as you but I put the dos command in a bat file.
Login.bat
NET USE W: \\10.48.10.8\e$
Then in the code
Shell ("c:\login.bat")
The vb command is not correct for the OS that you are running. You need to check that that drive is not already mapped, and remove the command.com /c from the command that you are trying to execute.

Resources