I am new to AutoCAD API. I want to use accoreconsole.exe (AutoCAD 2016) to batch convert dwg files to pdf. Does accoreconsole.exe requires AutoCAD to be installed in the target system or I can use accoreconsole.exe(with it's dlls) in computers which does not have AutoCAD installed?
Yes, AutoCAD console is part of AutoCAD (full install).
But you can use the webservice AutoCAD I/O to batch process drawings, check at http://developer.autodesk.com
Related
How would I get a list of EVERY program into a text file for windows 95-windows 10. The uninstall programs in control panel doesn't have the version and publisher for the older operating systems, and wmic does not display every program. Even the uninstall registry, which I thought would be my savior, does not list every program. I can see discrepancies between that and the uninstall programs tab. Powershell and the like are off the table since it is relatively new.
Some combination of the following:
Enumerate registry for HKEY_CURRENT_USER\Software\Microsoft\CurrentVersion\Uninstall and HKEY_LOCAL_MACHINE\Software\Microsoft\CurrentVersion\Uninstall. And probably HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall on 64-bit os (might be duplicated). These are the list of installed programs that appear in the Control Panel's "Program and Features" section. Notice that some of the entries are straight-forward and have most of the data you want. Others are a GUID - this corresponds to an MSI installation.
For all the entries obtained in #1 that reference a GUID, use the MSI API to find the installation information you seek. Start with MsiEnumProducts. From there you can get at version info of installed applications.
Brute force search for EXEs installed in C:\Program Files and C:\Program Files (x86). For each EXE found, you can use this method to get the version information.
You want a list of applications installed from the Windows Store? Ask me for a code sample if that's important too.
The registry uninstall registration requirements in the 90's was just the display name and the command to start the uninstallation. Windows 2000 added support for more values and exposed them in the new UI but they were still optional. In recent years a couple of them became a requirement to pass the Windows Logo tests but they are still optional for non-certified applications so the uninstall key is not guaranteed to contain version/publisher information for every entry. Portable applications are not listed in the registry so if you need a inventory of everything then you need to inspect all exe files and ignore the registry.
Supporting everything back to Win95 RTM is going to be tough since you have nothing except batch files as a scripting option. VBScript is a optional component that normally gets installed with IE 4 and I don't even remember if it is possible to get Powershell on these systems.
I don't think it is possible to extract the version information with a simple batch file, you probably need the help of a 3rd-party tool. The issue with 3rd-party tools is that a lot of them depend on the Microsoft CRT run-time .DLLs and Windows 95 RTM does not have them out of the box, not even msvcrt.dll.
If you can raise your requirement for Win95 to have Windows Scripting Host installed (redistributable or part of IE4) then you could write a VB/Jscript file that uses the FileSystemObject to both walk the entire directory tree on every drive and to get version information from .exe files.
If that is unacceptable then you need to try to find a tool that can extract version information. There is a Microsoft tool named filever.exe listed here but I don't know if it works on Win95 and a NirSoft tool here but I'm not sure if it supports stdout redirection from the commandline (but it is open source so you could fix that if needed). Even if you find a suitable tool you would still need to walk the directory tree looking for .exe files and that is not going to be fun when you are limited to command.com and its DOS compatible batch handling.
My recommendation is to write a new application. I can't recommend writing it in a .NET language because you would be dealing with versions 1-4 and it is not installed on XP and older by default.
The way I see it, you have 3 options if you are writing it yourself: Visual Basic 6, Delphi (something old, v3 or older perhaps) or C/C++.
For C/C++ any version of Microsoft Visual C++ or MinGW/GCC will do but the older the better and you must not link to or use any C run-time library stuff (you might get away with static linking with MinGW but not recent versions of Visual Studio). If I was doing this I would use Visual Studio 6 or 2003 and build with /Zl & /NODEFAULTLIB. There are multiple small standalone CRT libraries if you need them. If you use any recent version of Visual Studio you will manually have to hex-edit the file to make it run on anything older than XP.
The actual implementation needs to call FindFirstFileA (and friends) on Windows 95/98/ME and FindFirstFileW on other systems to walk the directory tree and GetFileVersionInfoA/W (and friends) to get version info.
If you are feeling fancy you could perhaps filter out files in %WinDir% signed by Microsoft. Good luck...
I want to know if there is a specific entry to check in the registry to see if there is a default program associated with a specific file type?
My main example would be a PDF. Documentation in my company is mainly PDF. We want to be able to distribute the latest Adobe Reader because, generally, a lot of the PCs using my company's software will not have access to the internet.
During installation, I want to be able to check if the computer we are installing on already has a program to view PDF files. If yes, carry on. if not, then run the Adobe distribution as part of the install.
I'm focused on Windows 7 PCs, registry entry(ies) I can read programatically to see if, as an example, PDF has a valid program to open it.
No this option not exists. Although HKCR\'PROGID'\shell\open may points to the installed software.
User MC ND have wrong answer. See my screenshot:
During installation, I want to be able to check if the computer we are installing on already has a program to view PDF files. If yes, carry on. if not, then run the Adobe distribution as part of the install.
So I have pdf reader (!!!) with no associations. MC ND you are still thinks, I have no pdf reader?
From console
assoc .pdf to get the "fileType" associated to the extension. Once you have the fileType (ex. AcroExch.Document.11):
ftype AcroExch.Document.11 to get the associated program.
So I have a compliled matlab code, 'Example.exe'...I want to create an installer package that does the following:
My exe file will reside on a network drive.
My installer will first ask the user for the installation path.
It will then copy the exe (along with some other supporting files) in the given path....IF the folder already exists, it will ask the user for overwrite confirmation.
After the copying is done, my installer will ask the user if they want to install the MCR and accordingly install it(or not).
After everything is done, a shortcut to the exe is created on the desktop.
My question is, is there some installer package generator that can do all this ?? I understand matlab can create an installer package, but I want my file to be copied from the network drive. I also don't have Visual Studio so, can't create an msi.
There's a simple way to do this, you'll need a software called IExpress, It can create a self-extracting executable (.EXE) or a compressed Cabinet (.CAB) file using the provided interface (IExpress Wizard). Its included in all versions of windows (I think..). To run the IExpress Wizard, go to your local drive then: Windows\System32, Search for "iexpress" then run the program.
then...
Follow these steps:
1. Run iexpress.exe
2. Create a new 'Self Extraction Directive' file
3. Extract files only
4. Specify the title, promt user options, license, etc
5. Start adding files to your package
7. Specify other options (window, message)
8. Enter the path where you want your package to be.
Then you're almost done, create your package (might take a few mins), distribute it, upload it and all.
For more details visit http://www.makeuseof.com/tag/how-to-make-an-exe-installation-file/
There is no simple way to do that. But if you tightly tied to Windows platform, you definitely can learn Windows Installer technology. It's NOT related to Visual Studio!
Just download WiX toolset (it is free and Open Source!) and learn MSDN docs about Windows Installer.
But it is complex way, remember. You can spent months learning how to make great Windows installers.
Ofcourse, you can use Inno Setup or NSIS, but I don't recommend that, because them re-engineer installer technology instead of native Windows Installer's.
If you want, I can learn you by Skype or something like. :-)
Or (isn't great offer?) I can write the installer for you and send you all code and describe which for what is.
Use iExpress! Available from win xoxo and over (xp)
With windows 8 pro you can make a package with your voice! Only with win 8 or 8.1 pro.
I want to distribute a setup in a self extracting executable form. I want to pack versions for 32 bit and 64 windows. So I have a program which first checks the version of Windows OS running and then launches the correct program. SO I have a directory structure like this
DetermineOS.exe
Win32\Win32Setup.exe
Win32\supporting win32 files
Win64\Win64Setup.exe
Win64\Supporting win64 files
I want to pack them in a bundle called something like install.exe. When the user clicks install.exe it will extract this directory structure to the temp location and launch DetermineOS.exe which will then launch the correct setup.exe
Will NSIS be the easiest way to go? Would this be a compicated NSIS script? Thanks.
It sounds to me that the only thing you want to get out of it is to extract to the %TEMP% location and run a certain exe file. If that's the case, I'm not sure NSIS is the easiest way to go. Most of the archives support self-extraction and running a command on extraction-complete. For instance, WinRAR and 7z have such modules. And my gut feeling is this option seems to be easier than NSIS.
Different bootstrappers also support this scenario. For instance, Visual Studio bootstrapper or dotNetInstaller. I've recently blogged about this simplest case with dotNetInstaller.
Hope this helps.
You could put the different images (executables) in the "root" image and extract and run the appropriate image as needed (many Sysinternals tools do this - e.g. the "root" application embedds the drivers for 32 and 64 bit).
I would like to know if there is a DOS-Command in WinXP to create shortcuts (to an executable). I'm looking for DOS-Command if it is available, not a batch or script file (I'm only finding batch files and vbscipts when I search online).
Just to give you a background on what i'm doing, I would like Visual Studio 2005 to create a shortcut to the executable as part of the post-build event, and I was hoping to use a DOS-Command to do that.
Any help would be greatly appreciated. Thanks!
There is a command line shortcut tool which can create .lnk shortcut files that comes with (the very old) Microsoft Windows NT 4.0 Resource Kit Support Tools.
http://www.microsoft.com/downloads/details.aspx?FamilyID=3E972E9A-E08A-49A2-9D3A-C0519479E85A&displaylang=en
Here is a reference for the shortcut tool itself:
http://ss64.com/nt/shortcut.html
However, if you are doing this as part of an installation, you should probably look into using a standard installer which can create these shortcuts an a fashion that is easily uninstalled as well. Try this question as a start:
Create program installer in Visual Studio 2005?
batch files are files with DOS commands. If you're looking for DOS commands (and it takes more than a single step), then batch files are what you want.
If you want to use it in your post-build event, then a batch file will work just fine. Just type it in and it will work as if it were a DOS command.
You can specify a batch file and vbscript file as the command, and windows will just run the interpreter to execute your command as though it were a "DOS command"
Its not actually "DOS" anymore, it only looks like it.