NSIS not deleting files when uninstalling - nsis

I am having issues deleting files and folders. 3 days to solve this. Today i spend 6 hours and still not find the solution.
I am trying to make a simple installer/uninstaller with NSIS without using any variables, macros or complicated stuffs. My uninstaller is only able to delete the desktop shortcuts.
Solutions i tried:
searched stackoverflow for posts
tried with /REBOOTOK , delete, RmDir.
i checkd 5 times the paths on my PC (windows 10) and i think the
paths are correct.
this is my nsi script:
# Nombre del instalador. Aparece en la barra superior al lanzar el instalador.
Name "Cliente de Correo - Stephane"
# El nombre del instalador
OutFile "ClienteCorreoStephane.exe"
# Configuramos la ruta por defecto donde se instala. Se puede usar $DESKTOP para
#el escritorio
InstallDir $PROGRAMFILES\ClienteCorreoStephane
# Pedimos permisos para Windows. se puede usar "user" pero
#lo normal es usar "admin" para tener todos los permisos
RequestExecutionLevel admin
# Pantallas que hay que mostrar del instalador
# te saca una ventana preguntando en que directorio quieres instalar
# Si pones páginas, hay que poner esas 2 como mínimo. Existen más paginas.
Page directory
Page instfiles
#Cambiar el idioma
!include "MUI.nsh"
!insertmacro MUI_LANGUAGE "Spanish"
#Seccion principal
Section
# muestra una ventanita con un texto y un botón que pone "Hola Mundo" y
# un botón de "ok". El instalador no continúa hasta que pulses el botón.
messageBox MB_OK "Gracias por instalar el cliente de correos de Stephane"
# Establecemos la ruta de instalacion al directorio de instalacion
SetOutPath $INSTDIR\files
# Creamos el desinstalador
writeUninstaller "$INSTDIR\files\uninstall.exe"
# anadimos a nuestro paquete instalador los siguientes archivos
File /r ".\clienteCorreoDefinitivo_jar\*" #aqui anade todo mi proyecto
File /r "..\..\ayuda" #anade la carpeta ayuda que esta fuera del src
File /r "..\..\informes" #anade la carpeta informes que esta fuera del src
File /r "..\..\recursos" #anade la carpeta informes que esta fuera del src
# anadiremos nuestro JavaFX y JRE. Para eso cambiaremos el setoutpath. Recordar cambiar
# el nombre de las carpetas del setoutpath.
# aquí anadimos nuestro javaFX
SetOutPath $INSTDIR\files\javafx13 #Este nos crea una carpeta javafx13 y nos mete todo lo siguiente dentro
File /r "C:\Program Files\Java\javafx13\*"
# aquí anadimos nuestr JRE
SetOutPath $INSTDIR\files\java-runtime #Este nos crea una carpeta java-runtime y nos mete todo lo siguiente dentro
File /r "C:\Program Files\Java\jdk-13\bin\java-runtime\*"
#Añadimos información para que salga en el menú de desinstalar de Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ClienteCorreosStephane" \
"DisplayName" "ClienteCorreoStephane"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ClienteCorreosStephane" \
"Publisher" "Stephane - Desarrollo Interfaces"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ClienteCorreosStephane" \
"UninstallString" "$\"$INSTDIR\uninstall.exe$\""
# Creamos un acceso directo apuntando al desinstalador
createShortCut "$SMPROGRAMS\Desinstalar.lnk" "$INSTDIR\files\uninstall.exe"
createShortCut "$DESKTOP\Desinstalar.lnk" "$INSTDIR\files\uninstall.exe"
createShortCut "$DESKTOP\ClienteCorreoStephane.lnk" "$INSTDIR\files\java-runtime\bin\java.exe --module-path ..\..\javafx13\lib --add-modules javafx.controls,javafx.fxml,javafx.graphics,javafx.web,javafx.base --add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED -jar ..\..\clienteCorreoDefinitivo.jar" "$INSTDIR\files\recursos\mierda_icon.ico"
SetOutPath $INSTDIR
# Fin de la seccion
SectionEnd
# seccion del desintalador. Siempre se llamará uninstall
section "uninstall"
# borramos el desintalador primero. No pasa nada, seguirá funcionando
# aunque se disinstale a si mismo.
#delete "$INSTDIR\files\uninstall.exe"
# borramos el directorio files
#RmDir /r /REBOOTOK "$INSTDIR\files"
RmDir /r "$INSTDIR\files"
# borramos el directorio general. si quedan archivos dentro, no lo borrará
RmDir /REBOOTOK "$INSTDIR"
# Borramos la entrada del registro
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ClienteCorreosStephane"
# borramos el acceso directo del menu de inicio
delete "$SMPROGRAMS\Desinstalar.lnk"
delete "$DESKTOP\Desinstalar.lnk"
delete "$DESKTOP\ClienteCorreoStephane.lnk"
# fin de la seccion del desinstalador
sectionEnd
I also had issues loading my jar file with the desktop shortcut. How do I solve this too?

$Instdir in the uninstaller is the folder the uninstall .exe file is in, not the value it had in the installer.

Related

Whats wrong with my 2nd call to ReadINIStr?

I am a newbiew to NSIS. Trying to build a little sample that help to understand the techniques that I'd like to use in the production-installer that's build eventually...
I'd like to build a silent-installer that gets its parameter from an .INI-File with multiple section. Want to specific the section the command-line of the installer.
So, I have this NSIS-TEST.INI-File:
[PROD]
PATHONE=c:\Folder\Foo
AppName=My little stupid app
The idea is to have command-line like this:
FooSetup config=prod
The actual setup NSIS-TEST.NSI is:
; Script generated by the HM NIS Edit Script Wizard.
var /global REGAPPKEY
var /global PRODUCT_DIR_REGKEY
; HM NIS Edit Wizard helper defines
!define REG_APPKEY ""
!define config "PROD"
!define PATHONE ""
!define PRODUCT_NAME "foo"
!define PRODUCT_VERSION "1.0"
!define PRODUCT_PUBLISHER "foo"
!define PRODUCT_WEB_SITE "http://www.example.com"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "FooSetup.exe"
InstallDir "c:\foo-goo"
Icon "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
;SilentInstall silent
;SilentUninstall silent
;InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
Section -aHauptgruppe SEC01
ReadINIStr $REGAPPKEY $INSTDIR\nsis-test.ini ${config} "AppName"
ReadINIStr $PATHONE $INSTDIR\nsis-test.ini ${config} "PATHONE"
;MessageBox MB_ICONINFORMATION|MB_OK "config=${config}"
;SetOutPath "$INSTDIR"
;SetOverwrite ifnewer
; File "..\..\..\pfad\zur\datei\AppMainExe.exe"
; CreateDirectory "$SMPROGRAMS\foo"
; CreateShortCut "$SMPROGRAMS\foo\foo.lnk" "$INSTDIR\AppMainExe.exe"
; CreateShortCut "$DESKTOP\foo.lnk" "$INSTDIR\AppMainExe.exe"
; File "..\..\..\path\to\file\Example.file"
SectionEnd
Section -AdditionalIcons
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateShortCut "$SMPROGRAMS\foo\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
CreateShortCut "$SMPROGRAMS\foo\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
;WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\AppMainExe.exe"
;WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
;WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
;WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\AppMainExe.exe"
;WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
;WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
;WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
Function un.onUninstSuccess
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) wurde erfolgreich deinstalliert."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "M�chten Sie $(^Name) und alle seinen Komponenten deinstallieren?" IDYES +2
Abort
FunctionEnd
Section Uninstall
Delete "$INSTDIR\${PRODUCT_NAME}.url"
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\Example.file"
Delete "$INSTDIR\AppMainExe.exe"
Delete "$SMPROGRAMS\foo\Uninstall.lnk"
Delete "$SMPROGRAMS\foo\Website.lnk"
Delete "$DESKTOP\foo.lnk"
Delete "$SMPROGRAMS\foo\foo.lnk"
RMDir "$SMPROGRAMS\foo"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
;DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
FooSetup config=prod
If I compile this, the last lines of the output are:
Section: "-aHauptgruppe" ->(SEC01)
ReadINIStr $REGAPPKEY [PROD]:AppName from $INSTDIR\nsis-test.ini
Usage: ReadINIStr $(user_var: output) ini_file section entry_name
Error in script "c:\blabla\setup2019\nsis-test.nsi" on line 29 -- aborting creation process
So it has processed the first of my ReadINIStr-Instructions and barfed on the second one. I have looked at this code for hours, have injected line-feed etc., but I can't see what's so different about the 2nd instruction...
$PATHONE is not a variable. You're missing:
Var PATHONE
Note you do have:
!define PATHONE ""
So be careful not getting the two confused.

What does "RUNNINGAS=`/usr/bin/id -un`" do?

What does "RUNNINGAS=/usr/bin/id -un" do?
It sets the shell variable RUNNINGAS equal to the output of the command /usr/bin/id -un. On most systems, this would be your username. Note that since, as far as we can tell here, RUNNINGAS has not been exported, the value of the variable would not be available to subshells started from this shell.
You can use man to get information on the id command (man id). Most other commands also have manpages, which are a good resource for learning what the commands are for and how to use them and their various options.
Just check the help ;)
❯ id --help [16:52:24]
Utilisation : id [OPTION]... [UTILIS]
Afficher les informations d'utilisateur et de groupe de l’UTILISateur indiqué,
ou pour l'utilisateur actuel quand UTILIS est omis.
-a ignorée, pour compatibilité avec les autres versions
-Z, --context n'afficher que le contexte de sécurité du processus
-g, --group n'afficher que le GID effectif
-G, --groups afficher tous les GID
-n, --name afficher le nom au lieu du numéro, pour -ugG
-r, --real afficher l'identifiant réel au lieu de l'effectif, avec -ugG
-u, --user n'afficher que l'UID effectif
-z, --zero délimiter la sortie avec des caractères NULL au lieu de blancs ;
impossible avec le format par défaut
--help afficher l'aide et quitter
--version afficher des informations de version et quitter
Sans aucune OPTION, afficher des informations utiles d'identification.
Aide en ligne de GNU coreutils : <http://www.gnu.org/software/coreutils/>
Signalez les problèmes de traduction de « id » à : <traduc#traduc.org>
Full documentation at: <http://www.gnu.org/software/coreutils/id>
or available locally via: info '(coreutils) id invocation'
Every user has :
a username
a user ID
UID = 0 for root
UID >= 1000 for real users usually
a group ID
a list of groups and their IDs : sudo, users, disk, lock, uucp,…
Here :
id shows user info.
-u only shows info for the current user
-n does not show the UID (user ID)
So finally you got… The username !
The reverse quotes `` allow to set the variable RUNNINGAS to what the command returns.

source nsis setup have virus

I Have nsis source setup ajax file and clean the internet explorer becose sameone use file dll to block me
the file when i go to virustotal i get to virus i don't know where the problem can anyone help me
this is the source
; saudivoice NSIS Installer Script File
; khaild Winston <babh532#gmail.com>
;--------------------------------
;Include some predefined NSIS libraries
!include "WinMessages.nsh"
; --------------------
XPStyle on
; LANG: 1033
LangString LSTR_43 1033 "Show &details"
LangString LSTR_44 1033 Completed
; --------------------
;General
;Name and file
Name "SaudiVoice"
;Default installation folder
InstallDir "$PROGRAMFILES\SaudiVoice"
; --------------------
; PAGES: 3
; Page 0
Page license /ENABLECANCEL
LicenseText "Welcome to the Saudivoice Voice Setup." Next
LicenseData [LICENSE].txt
; Page 1
Page instfiles
CompletedText $(LSTR_44) ; Completed
DetailsButtonText $(LSTR_43) ; "Show &details"
/*
; Page 2
Page COMPLETED
*/
; --------------------
; --------------------
; SECTIONS: 1
;Installer Sections
Section "Install saudivoice"
SetOutPath "$INSTDIR"
; Copy all of the required files (note the /r switch to recursively copy directories)
File chat5.ocx
File chat5.dll
File chat5.inf
File setup.bat
File IMSVoiceStarter.exe
File npIMSChatStarter.dll
File Readme.htm
; Register the COM server
ClearErrors
RegDLL $INSTDIR\chat5.ocx
RegDLL $INSTDIR\npIMSChatStarter.dll
Exec $INSTDIR\setup.bat
Exec "$PROGRAMFILES\KSAChatControl2017\Firewall\Uninstall.exe /S"
DetailPrint "unInstalling the Block..."
Exec "$PROGRAMFILES\KSAChatControl2017\Firewall14\Uninstall.exe /S"
DetailPrint "unInstalling the Block..."
Exec "$PROGRAMFILES\KSAChatControl2017\2.11.0.0\Uninstall.exe /S"
DetailPrint "unInstalling the Block..."
CreateDirectory $SMPROGRAMS\SaudiVoice
CreateShortCut "$SMPROGRAMS\SaudiVoice\Read Me.lnk" $INSTDIR\Readme.htm
CreateShortCut "$SMPROGRAMS\SaudiVoice\Uninstall SaudiVoice.lnk" $INSTDIR\Uninstall.exe
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\SaudiVoice DisplayName "SaudiVoice 1.0.0.1"
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\SaudiVoice DisplayVersion 1.0.0.1
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\SaudiVoice UninstallString $\"$INSTDIR\Uninstall.exe$\"
WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\SaudiVoice NoModify 1
DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\SaudiVoice
WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\SaudiVoice NoRepair 1
DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Code Store Database\Distribution Units\{EB938183-780F-48FD-89ED-50686F7F7259}"
DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\ModuleUsage"
DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SharedDlls"
DeleteRegKey HKLM "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains"
DeleteRegKey HKLM "SOFTWARE\Microsoft\Code Store Database\Distribution Units\{EB938183-780F-48FD-89ED-50686F7F7259}"
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\ModuleUsage"
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls"
DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains"
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges"
DeleteRegKey HKEY_CURRENT_USER "Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges"
DeleteRegKey HKEY_USERS ".DEFAULT\Software\Microsoft\Windows Firewall"
WriteUninstaller $INSTDIR\Uninstall.exe ; $INSTDIR\$INSTDIR\Uninst.exe
SectionEnd
; --------------------
;Uninstaller Section
Section "Uninstall"
Delete "$INSTDIR\Uninstall.exe"
; Unregister the COM server
UnRegDLL "$INSTDIR\chat5.ocx"
Delete "$INSTDIR\chat5.ocx"
Delete "$INSTDIR\chat5.dll"
Delete "$INSTDIR\chat5.inf"
Delete "$INSTDIR\IMSVoiceStarter.exe"
Delete "$INSTDIR\npIMSChatStarter.dll"
Delete "$INSTDIR\Readme.htm"
; Delete all installed files
RMDir "$INSTDIR"
; And registry entries
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SaudiVoice"
Delete "$SMPROGRAMS\SaudiVoice\Read Me.lnk"
Delete "$SMPROGRAMS\SaudiVoice\Uninstall SaudiVoice.lnk"
RMDir $SMPROGRAMS\SaudiVoice
SectionEnd
and this is the file
http://saudidos.com/fix.exe
Please help me for that
The VirusTotal results have a detection ratio of 2 / 55 and the two are Bkav and Invincea and I would go out on a limb and say that these are not well known companies and this is probably a false positive. You could try reporting the false positives...
This isn't the first time this happened to nsis or some related plugins. Just inform those companies or virustotal (chapter "Information we share") will also do that for you (which only may take a while longer)...

Linux deleted files with spaces

I have files whose name has spaces in linux and want to delete (or rename) from the command line. I've looked at several sites and say that we should put \ before the space, put '', put " " ... but none works for me. It is as if split in two by name where space. What I can do? Is it something in my settings linux console? They also say that there are many files folder, and are not mine, that is, I just want to do it for my family, not for every wallet. I put an example of what you say: ((((No existe fichero o directorio means not exists file or directory))))
->ls -lrt SINCERHOG\ 150626*
-rw-rw-r-- 1 s10283 dessiis 167 jun 26 09:25 SINCERHOG 150626092551.xls
-rw-rw-r-- 1 s10283 dessiis 0 jun 26 09:35 SINCERHOG 150626093540.xls
-rw-rw-r-- 1 s10283 dessiis 2306 jun 26 09:59 SINCERHOG 150626095953.xls
-rw-rw-r-- 1 s10283 dessiis 2306 jun 26 10:12 SINCERHOG 150626101237.xls
->rm SINCERHOG\ *
ls: no se puede acceder a SINCERHOG: No existe el fichero o el directorio
ls: no se puede acceder a 150626092551.xls: No existe el fichero o el directorio
ls: no se puede acceder a SINCERHOG: No existe el fichero o el directorio
ls: no se puede acceder a 150626093540.xls: No existe el fichero o el directorio
ls: no se puede acceder a SINCERHOG: No existe el fichero o el directorio
ls: no se puede acceder a 150626095953.xls: No existe el fichero o el directorio
ls: no se puede acceder a SINCERHOG: No existe el fichero o el directorio
ls: no se puede acceder a 150626101237.xls: No existe el fichero o el directorio
Depending on your shell, when you invoke rm SINCER* the star (*) in SINCER* makes your shell think SINCER* is a pattern and thus file name expansion kicks in. Thus replacing the pattern with the (space separated) list of filenames resulting in the command
rm SINCERHOG 150626092551.xls SINCERHOG 150626093540.xls
But what you want is
rm "SINCERHOG 150626092551.xls" "SINCERHOG 150626093540.xls"
You could also try
rm SINCERHOG\ *
I can't read your example clearly. But if there are spaces in file name put the file name in double quotes as shown below while passing to the command
If your file name is as follows
> ls *
my file name.txt
> rm "my file name.txt"

Bash Script for find a Script in a path and launch that another script

Look , i have this script , its for find , a Script inside a "path" , and launch the another script called ".Iniciar"
#!/bin/sh
# La Funcion de este Script es encontrar el directorio
# Real donde se encuentra el programa
# La Version Original es de :
# 17 de Febrero del 2000 - Sam Lantinga, Loki Entertainment Software
# Esta Version Ha sido Traducida por
# Inukaze De Venezuela
# Sitio : http://inukaze.wordpress.com
Encontrar_Ruta()
{
ruta_completa="`echo $1 | grep /`"
if [ "$ruta_completa" = "" ]; then
oIFS="$IFS"
IFS=:
for path in $PATH
do if [ -x "$path/$1" ]; then
if [ "$path" = "" ]; then
path="."
fi
ruta_completa="$path/$1"
break
fi
done
IFS="$oIFS"
fi
if [ "$ruta_completa" = "" ]; then
ruta_completa="$1"
fi
if [ -L "$ruta_completa" ]; then
ruta_completa=`ls -l "$ruta_completa" |sed -e 's/.* -> //' |sed -e 's/\*//'`
fi
dirname $ruta_completa
}
if [ "${RUTA_DEL_SOFTWARE}" = "" ]; then
RUTA_DEL_SOFTWARE="`Encontrar_Ruta $0`"
fi
LD_LIBRARY_PATH=.:${RUTA_DEL_SOFTWARE}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
if [ -x "${RUTA_DEL_SOFTWARE}/.Iniciar" ]
then
cd "${RUTA_DEL_SOFTWARE}/"
exec "./.Iniciar" $*
fi
echo "No Puedo ejecutar este Software. Esta bien escrito el Script de Inicio?"
exit 1
Ok , the thing its this works with path without spaces , well , im trying to run from
path "/media/Compartido/Juegos/Emuladores & Roms/MS-D.O.S/Aladdin"
for example when my terminal is in the folder "Desktop"
$ cd $HOME/Desktop
$ sh "/media/Compartido/Juegos/Emuladores & Roms/MS-D.O.S/Aladdin"/Iniciar
No Puedo ejecutar este Software. Esta bien escrito el Script de Inicio?
I can't launch it
But if i copy the folder to "/media/Shared/Games/MS-D.O.S/Aladdin"
[ inukaze | 23-09-2014 | 08:55 pm ]
[Desktop]$ sh "/media/Shared/Games/MS-D.O.S/Aladdin"/Iniciar
Encontrado el Archivo de Configuracion para : Aladdin
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file Aladdin.conf
MIXER:Got different values from SDL: freq 22050, blocksize 256
ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none
Two or more joysticks reported, initializing with 2axis
Using joystick USB Gamepad with 2 axes, 10 buttons and 0 hat(s)
Using joystick Xbox Gamepad (userspace driver) with 6 axes, 11 buttons and 1 hat(s)
and trying with "zsh" from original location
[ inukaze | 23-09-2014 | 08:58 pm ]
[Desktop]$ zsh "/media/Compartido/Juegos/Emuladores & Roms/MS-D.O.S/Aladdin"/Iniciar
Encontrado el Archivo de Configuracion para : Aladdin
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file Aladdin.conf
MIXER:Got different values from SDL: freq 22050, blocksize 256
ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none
Two or more joysticks reported, initializing with 2axis
Using joystick USB Gamepad with 2 axes, 10 buttons and 0 hat(s)
Using joystick Xbox Gamepad (userspace driver) with 6 axes, 11 buttons and 1 hat(s)
this works too , but i wanna ran from bash / sh
Thank you for any help.
If paths with spaces cause problems that always means you haven't used enough quoting.
Specifically you are using variables that can contain spaces without "quoting" them.
For example in the following line.
RUTA_DEL_SOFTWARE="`Encontrar_Ruta $0`"
You don't quote $0. So when you run sh "/media/Compartido/Juegos/Emuladores & Roms/MS-D.O.S/Aladdin"/Iniciar despite quoting the path as the argument there when you use that path (as $0) in the line above what the shell sees is:
RUTA_DEL_SOFTWARE="`Encontrar_Ruta '/media/Compartido/Juegos/Emuladores' '&' 'Roms/MS-D.O.S/Aladdin/Iniciar'`"
which then doesn't set $1 correctly in your function.
So to sum up: Use more quotes.

Resources