I did a script to make an installer for a 64bits driver, so it needs to place the .dll in the real system32.
So, I uses sysnative that is suppose to jump the redirector.
but tried it in Win7 64bits, and all that it does is to create a folder at\named c:\Windows\Sysnative** and actually placing the .dll here!. **What is wrong?.
delete "$WINDIR\sysnative\flulpypt64.dll"
CopyFiles "$INSTDIR\flulpypt64.dll" "$WINDIR\sysnative\flulpypt64.dll"
the other solution, exists a way to tell NSIS to compile 64bits .exe installer?.
Sysnative does not exist on WinXP-64. If you take a look in x64.nsh you will find some macros that turn off filesystem redirection, you can then extract the file directly to the real system directory...
Related
I need to create an easy to use method for users to install .ocx files in their system folder, be it System32 or SysWOW64, and then register the file.
I was able to follow directions and register the file after manually moving it to the system folder, but I need to make all of it occur automatically. How can i make it work for both 32 bit and 64 bit versions of windows?
Thanks!
I just finished coding my c program in visual studio (VS) and what I had done is just drag the compiled .exe file out of the folder to run it on other computers, except on other computers for that to work I guess I need VS since it says the MSVCR110D.dll is missing which is from VS. So how can I run my program on other computers that don't have VS?
You can use IExpress which is used for distributing self-contained installation packages. It is there in every windows machine preinstalled. Using this utility you can make the executable .exe which will be incorporated with dependent dlls. You can see Step by step guide, to see how to use it.
Follow these steps
https://msdn.microsoft.com/en-us/library/3w7axy17.aspx
In your output window it will show you where you can find the exe file, usually something like "ProjectName/Debug/Release/"
If you have added any external libraries you will have to copy any DLL files in that folder with the exe (You can combine them with some applications if needed)
You will also have to make sure that you have the correct version of the .NET Framework on the PC that you are trying to run your program on
I have two files, both of them are exe. One for 32bit, and one for 64bit. I'd like to create a small program(a third exe) in C, which contains these two files. When i start my third exe, it should do some work, and execute one of them. Is this somehow possible?
Thanks in advance!
Doing it yourself in C
There are ways to implement this kind of thing in C/C++ described here and here. Basically you do the following:
Add your 32-bit and 64-bit executables as binary PE resources to a 32-bit bootstrapper executable. You can do this using any PE resource editor including Visual Studio if that's what you're using.
The bootstrapper uses the IsWow64Process API to decide whether it is running on a 64bit system or not.
The bootstrapper extracts the correct executable file from its resources using the resource APIs
The bootstrapper writes the executable file to a temporary file and executes it.
This is pretty much what I had to do for an old project, and offers you the most control and flexibility. But if you just want quick and dirty...
Making AutoIT do it for you!
I also found this guide to compiling an AutoIT script which basically does all of the above for you! Neat, eh?
I will reproduce the AutoIT script here in case the link disappears:
; Check if we’re on 64-bit OS…
If EnvGet(“PROCESSOR_ARCHITEW6432″)=”” Then
; No we’re not – run x86 version…
FileInstall(“D:\Support\ETrustCheck_x86.exe”,#TempDir & “\ETrustCheck_x86.exe”)
RunWait(“D:\Support\ETrustCheck_x86.exe”,#TempDir & “\ETrustCheck_x86.exe”)
FileDelete(#TempDir & “\ETrustCheck_x86.exe”)
Else
; Yes we are – run x64 version..
FileInstall(“D:\Support\ETrustCheck_x64.exe”,#TempDir & “\ETrustCheck_x64.exe”)
RunWait(“D:\Support\ETrustCheck_x86.exe”,#TempDir & “\ETrustCheck_x64.exe”)
FileDelete(#TempDir & “\ETrustCheck_x64.exe”)
EndIf
; The END
This script can be wrapped by the AutoIT script editor into 32bit launcher with your two executables packed into it.
I have created a WPF application. I want to make installer file (exe) for this application.
This application also uses some other 3rd party files (bat files); which i have zipped.
I want to unzip this file while installing and set the path of unzipped dir in Path variable also.
I got a link http://www.msdotnet.co.in/2012/06/how-to-create-setup-fileexe-file-from.html#.U3GT7YGSzxp
which tells how to create a installer file.
How to achieve unzipped part and setting environment vairable while making installer?
Thanks
Take a look at wix from Microsoft.
It can be run standalone, but is great run from within visual studio. You write a small xml file detailing what you want installed, and it does the rest.
To run a zip command, use a CustomAction.
Search for Install-shield. It is old tool but having good scripting capability like what you are expecting (i.e) Unzipping the folder and dealing with path environment variable
Use Inno Setup (http://jrsoftware.org/isinfo.php) or NSIS (http://nsis.sourceforge.net/Main_Page).
Both are free (open source) installation systems with many possibilities and huge community around (even here on SO).
They are really easy to use (especially Inno) and they are powerful so it is easy to achieve your required functionality.
Take a look at Stall:
https://github.com/jamesqo/Stall
It's an OSS project that lets you install your app from the command line, no configuration required.
Example Usage:
stall path/to/YourApp -e YourApp.exe -i YourApp.exe
This installs your app straight to the user's computer without having to make an intermediary MSI.
If you have to unzip files as well, you may want to just consider a simple batch files that downloads the binaries + unzips the contents + runs Stall.
I have a script (a.bat) that calls 2 executables (b.exe and c.exe) and I would like to create a single exe that would call a.bat automatically.
Is it possible?
Any simple program to do this?
Ps.: Info: The Exe's do make other files that are deleted in the end
Not directly, no.
The simplest way to accomplish this with off-the-shelf tools is to use an archiver that can create self-extracting archives and allows to specify a file to run after extraction. For example, free Info-Zip tools support an autorun command. WinRAR (commercial) allows to define complex scripts with GUI.
An install engine can be used for the same purpose. For a couple of examples, there are NSIS and Inno Setup (both free).
A (relatively) more complex solution is to write a third executable that will extract payload from its resources and run the batch file. This way you have full control over what happens.
This One:Bat To Exe Converter
It has the "Include" option that can include the exe file
when the compiled exe file run
it will release it
and you can run it!