Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I'm trying to create a silent installer for ghostscript. I have gs863w64.exe. I unzipped it so I now have the setupgs.exe. (I wasn't able to uzip the latest version)
It is supposed to work like this:
setupgs.exe "c:\program files\gs"
I get this error:
Source Directory=c:\ptc\gs
Target Directory=c:\program files\gs
Target Shell Folder=Ghostscript
All users
Installing Program...
Copying files listed in filelist.txt
Creating temporary file c:\users\windows7\appdata\local\temp\gsa01816
c:\program files\gs\gs8.63\bin\gsdll32.dll
Failed to copy file c:\ptc\gs\gs8.63\bin\gsdll32.dll to c:\program files\gs\gs8.63\bin\gsdll32.dll
Program install failed
If I run gs863w64.exe and press the install button it installs
Obviously the self extracting installer is doing something that the command line isn't doing.
Solved! Go to Solution.
So after some digging on the web I came up with an alternative solution. AutoIT.
I installed it and the editor. Both can be acquired here:
https://www.autoitscript.com/site/autoit/downloads/
This excellent video shows how to create a self-installer script
https://www.youtube.com/watch?v=MuOq6AOQ_gI
My script looks like this:
Even better yet, you can then compile the script to run on client machines without having to install AutoIT on them.
https://www.autoitscript.com/autoit3/docs/intro/compiler.htm
So in your install script you copy the original installer to the client and the new compiled AutoIT script.
Change to the directory containing both files and then just enter the name of your compiled script. And finally delete the files.
Like this:
if not exist "c:\ptc\ghostscript" "(mkdir c:\ptc\ghostscript)"
copy "L:\bin\ghostscript\*.*" "c:\ptc\ghostscript\."
cd "c:\ptc\ghostscript"
install-gs-863-64.exe
cd %USERPROFILE%
rmdir c:\ptc\ghostscript /s /q
So after some digging on the web I came up with an alternative solution. AutoIT.
I installed it and the editor. Both can be acquired here:
https://www.autoitscript.com/site/autoit/downloads/
This excellent video shows how to create a self-installer script
https://www.youtube.com/watch?v=MuOq6AOQ_gI
My script looks like this:
Even better yet, you can then compile the script to run on client machines without having to install AutoIT on them.
https://www.autoitscript.com/autoit3/docs/intro/compiler.htm
So in your install script you copy the original installer to the client and the new compiled AutoIT script.
Change to the directory containing both files and then just enter the name of your compiled script. And finally delete the files.
Like this:
if not exist "c:\ptc\ghostscript" "(mkdir c:\ptc\ghostscript)"
copy "L:\bin\ghostscript\*.*" "c:\ptc\ghostscript\."
cd "c:\ptc\ghostscript"
install-gs-863-64.exe
cd %USERPROFILE%
rmdir c:\ptc\ghostscript /s /q