diff --git a/build.xml b/build.xml
index bff0114a84..39c2ee63a9 100644
--- a/build.xml
+++ b/build.xml
@@ -225,8 +225,8 @@
-
+
diff --git a/installer/resources/ProcessPanel.Spec.xml b/installer/resources/ProcessPanel.Spec.xml
index b632c33a75..edea06fda3 100644
--- a/installer/resources/ProcessPanel.Spec.xml
+++ b/installer/resources/ProcessPanel.Spec.xml
@@ -7,8 +7,8 @@
-
- postinstall.sh
+
+ $INSTALL_PATH/postinstall.sh$INSTALL_PATH
\ No newline at end of file
diff --git a/installer/resources/postinstall.sh b/installer/resources/postinstall.sh
index 4a6fb5b3bc..e0ebc23f23 100644
--- a/installer/resources/postinstall.sh
+++ b/installer/resources/postinstall.sh
@@ -12,11 +12,14 @@
# Installs the appropriate set of Java Service Wrapper support files for the
# user's OS then launches the I2P router as a background service.
-chmod 744 i2prouter
-chmod 744 i2psvc
-chmod 744 install_i2p_service_unix
-chmod 744 osid
-chmod 744 uninstall_i2p_service_unix
+if [ $1 ]; then
+ cd $1
+fi
+
+chmod 744 ./i2prouter
+chmod 744 ./install_i2p_service_unix
+chmod 744 ./osid
+chmod 744 ./uninstall_i2p_service_unix
ERROR_MSG="Cannot determine operating system type. From the subdirectory in lib/wrapper matching your operating system, please move i2psvc to your base I2P directory, and move the remaining two files to the lib directory."
HOST_OS=`./osid`
@@ -46,6 +49,7 @@ case $HOST_OS in
esac
cp $wrapperpath/i2psvc .
+chmod 744 ./i2psvc
cp $wrapperpath/* ./lib/
./i2prouter start
exit 0