cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Silent install for Ghostscript?

davehaigh
11-Garnet

Silent install for Ghostscript?

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.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 ACCEPTED SOLUTION

Accepted Solutions

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:

12-10-2015 2-42-17 PM.jpg

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

View solution in original post

1 REPLY 1

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:

12-10-2015 2-42-17 PM.jpg

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

Top Tags