Scripting Question

Question concerning silent install of WS_FTP, and the path for setup.exe

06/24/2015 3935 views

I'm trying to perform a silent install of WS_FTP  They have some documentation on this here: http://docs.ipswitch.com/WS_FTP%20124/ReleaseNotes/English/index.htm?k_id=ipswitch_com_ftp_documents_worldwide_ws_ftppro124releasenotesenglish#link12

During my KACE install and even outside of KACE, the install FAILS unless I specify the full path to setup.exe and setup.iss.  For example, if I run this command outside of KACE from an admin command prompt "c:\wsftp12.4.1.1\wsftp_install.exe" -s -f1"c:\wsftp12.4.1.1\setup.iss" SERIAL="1X4CF7M10W33XS1OVCCW2ST" it works, but if I run the command "wsftp_install.exe" -s -f1"setup.iss" SERIAL="1X4CF7M10W33XS1OVCCW2ST" while in c:\wsftp12.4.1.1 it fails.  

I've done other .exe/.iss installs via KACE, and they all work without having to specify the full path to the .exe and .iss files.  All I have to do with those is "setup.exe" -s -f1 "setup.iss" and it works.  I guess WS_FTP is just special like that.  I have the .exe and .iss files zipped up and at the root of the zip file, just like in the working .exe/.iss install I have in KACE.  I've tried deleting the ", deleting the space after f1 like it mentions in the guide, running it as a .bat file, but nothing seems to work unless I specify the full path to each file.

My question is if I have an install like this, how do I specify the full path to the files from KACE?  I guess could copy the files to the machine first, then run another command pointed at them, then delete them after, but who wants to mess with all of that?

I tried using the script variables here: http://www.itninja.com/blog/view/kace-quick-reference-to-scripts-variables  I entered in $(KACE_INSTALL) for the path but it did not work.  I assume these are for reporting/helpdesk and are no good for scripted installs however.

This is a list of things I've tried:
From KACE via install a software package, with zip file containing .exe and .iss uploaded under inventory, software, wsftp12.4.1.1:
"wsftp12.4.1.1.exe"  WORKS
"wsftp12.4.1.1.exe" -s  FAILS
"wsftp12.4.1.1.exe" -S  FAILS
"wsftp12.4.1.1.exe" /s  FAILS
"wsftp12.4.1.1.exe" /S  FAILS
"wsftp12.4.1.1.exe" -s -f1"setup.iss"  FAILS
"wsftp12.4.1.1.exe" -s -f1"setup.iss" SERIAL="XXXXXXXXXXXX" FAILS
"%~dp0wsftp12.4.1.1.exe" -s -f1"%~dp0setup.iss"  FAILS

From admin command prompt local on the machine while in c:\wsftp12.4.1.1:
wsftp12.4.1.1.exe  WORKS
wsftp12.4.1.1.exe -s  FAILS
"wsftp12.4.1.1.exe" -s  FAILS
wsftp12.4.1.1.exe -s  -f1setup.iss  FAILS
"wsftp12.4.1.1.exe" -s  -f1"setup.iss"  FAILS
c:\wsftp12.4.1.1\wsftp12.4.1.1.exe -s  FAILS
"c:\wsftp12.4.1.1\wsftp12.4.1.1.exe" -s  FAILS
"c:\wsftp12.4.1.1\wsftp12.4.1.1.exe" -s  -f1"setup.iss"  FAILS
"c:\wsftp12.4.1.1\wsftp12.4.1.1.exe" -s  -f1"c:\wsftp12.4.1.1\setup.iss"  WORKS
c:\wsftp12.4.1.1\wsftp12.4.1.1.exe -s  -f1c:\wsftp12.4.1.1\setup.iss  WORKS
%~dp0wsftp12.4.1.1.exe -s  -f1%~dp0setup.iss  FAILS
wsftp12.4.1.1.exe -s  -f1%~dp0setup.iss  FAILS
c:\wsftp12.4.1.1\wsftp12.4.1.1.exe -s  -f1%~dp0setup.iss  FAILS
c:\wsftp12.4.1.1\wsftp12.4.1.1.exe -s  -f1"%~dp0setup.iss"  FAILS
"c:\wsftp12.4.1.1\wsftp12.4.1.1.exe" -s  -f1"%~dp0setup.iss"  FAILS

From admin command prompt local on the machine while in c:\wsftp12.4.1.1, running install.bat file, with this in the install.bat file:
"%~dp0wsftp12.4.1.1.exe" -s -f1"%~dp0setup.iss"  WORKS
%~dp0wsftp12.4.1.1.exe -s -f1%~dp0setup.iss  WORKS

From KACE via run a batch file, with zip file containing .exe and .iss as a dependency:
%~dp0wsftp12.4.1.1.exe -s -f1%~dp0setup.iss  FAILS
"%~dp0wsftp12.4.1.1.exe" -s -f1"%~dp0setup.iss"  FAILS
Answer Summary:
0 Comments   [ + ] Show comments


Answer Chosen by the Author

Finally got this working.

I had to create a install.bat file and zip it up along with the exe and iss file.  I then had to upload the zip file under inventory, software, Ipswitch WS_FTP 12, saving it as an associated file.

I then had to create a script with the install a software package option, select Ipswitch WS_FTP 12, and write install.bat for the install arg.

This is what I put in the install.bat in the zip file:  "%~dp0wsftp12.4.1.1.exe" -s -f1"%~dp0setup.iss"  Serial number was added later and works.

You must have the install.bat zipped up with the other files for this to work.  If you try to add a run a batch file option within KACE using "%~dp0wsftp12.4.1.1.exe" -s -f1"%~dp0setup.iss" as the contents it will fail.
Answered 06/25/2015 by: edwimb
Third Degree Blue Belt

All Answers


Simple: use "%~DP0" as a prefix to your filenames. You don't need a trailing slash, so:

"%~dp0wsftp_install.exe" -s -f1"%~dp0setup.iss" SERIAL="xxxxxxxxxxxxxxxxxxxxxxx"

Thanks for sharing your serial number, too!

Answered 06/25/2015 by: VBScab
Red Belt

  • I actually found some posts talking about that and tried it yesterday. It works if I do it locally from the command prompt but not if I do it from KACE.

    The serial number is a dummy one from the users guide, thanks for playing.
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ