I am trying create installation file for my projects.
I am using command line so I created bat file "create_setup.bat". From this file I am trying to compile Inno Setup script "my_project_setup.iss":
"ISTool.exe" -compile "Subfolder1\Subfolder2\my_project_setup.iss".
Important: "create_setup.bat" - located at the folder "WorkFolder" and Inno Setup script "my_project_setup.iss" located at the folder "WorkFolder\Subfolder1\Subfolder2".
But I don't have any good results, no installation file.
However if I running "create_setup.bat" from the same folder as script "my_project_setup.iss" located it's work correct (of course path at the file create_setup.bat to the script my_project_setup.iss was changed).
At the script "my_project_setup.iss" I have tried to change Inno Setup property "OutputDir" but it's not help.
Inno Setup property "Source" I have not changed.
Can you change your script so that you CD to the subfolders before calling ISTool.exe?
PUSHD "Subfolder1\Subfolder2"
ISTool.exe -compile my_project_setup.iss
POPD
Try that and see if it works better, it could have something to do with any relative paths you might have inside of your .iss file.
Related
I am running a bat file in different users laptops
Some users having this path C:\Users\%USERNAME%\AppData\Local\Google\1.8.0
some users having this path C:\Users\%USERNAME%\AppData\Local\Google\1.9.0
In my bacth file --I used only the path C:\Users\%USERNAME%\AppData\Local\Google\1.8.0
for users which are having 1.9.0 this code is not working.
Please advise
Looks like your script is using user profiles folder structure :
C:\Users\%USERNAME%\AppData\Local
This can be acheived using %localappdata% instead :
so in your script you can do as below :
CD %localappdata%
if exist Google\1.8.0 CD Google\1.8.0
if exist Google\1.8.0 CD Google\1.9.0
And then rest of your script will be same
Above code would first CD to Local folder and then search for required folder structure rest you can play with i beileve
Use a Find-n-Replace-across-files feature from a tool such as Notepad++ and change the path to whichever is the correct path for the laptop you are running from. Or if you want a batch file for that, the Find Replace tool https://findandreplace.codeplex.com/ can help. If you are doing this often, then you might want to consider AutoIT to develop your own additional script. Or, then, Python.
I have zip file containing my installation files. I'm extracting this zip and copying these files into installation directory with the script shown below:
ZipDLL::extractall "$OUTDIR\demo.zip" "C:\myapp\demo\"
if I remove zip file from $OUTDIR than installer is not able to find zip file as expected. What I want to do is embedding this zip or its extracted folders into exe itself. I added
File -r "$OUTDIR/demo"
but this script didn't worked as well.
When you use the ZipDll plugin, you are referring to the file you want to process (demo.zip) by using its place at run time: along the installer.exe.
When you use the File statement to embed some files into the produced installer, you need to refer to the files by using their place at compile time.
Replace the $OUTDIR in the File statement by the path relative to the .nsi script.
BTW, you should take the habit to check at the compilation log, NSIS probably tells you about that kind of problem when paths are incorrect at compile-time.
For a system we are deploying for our customer we need to run the setup executable from %temp% and have it use for the installation, files in another directory.
This cannot be solved at the application level.
So, basically what I need it to somehow "cheat" the setup.exe located at %temp% to think it ran under another directory.
Any ideas?
I tried doing pushd & popd, that doesn't work because the OS tries to call setup.exe from the data files' directory, not setup.exe.
I also tried calling setup.exe by running a bat from the data files directory, that basically calls it by doing:
%temp%\setup.exe
doing:
cd %temp%
setup.exe
also failed
cd %files_dir%
%temp%\setup.exe
But
1) it's up to setup.exe to use current dir or not. So this command sequence can have no effect.
2) current dir can be changed at any moment (e.g. when system Files Open dialog is called).
You can try to create shrtcut of files in %temp% dir and use them instead of files. Maybe you'll need to play around with file extensions.
I am trying to move from a mac environment to a windows one and require rsync.
Found cwrsync # http://www.rsync.net/resources/howto/windows_rsync.html
I have installed the cwrsync program fine, I can call the rsync at cmd but on when in the directory which contains the sync.exe
When in command prompt, if i call rsync when not in the relavent directory it moans and sayS:
"rsync" is not recognised as an internal or external command, operable
program or batch file.
Is there a way to add the rsync.exe to a global list so as rsync is recognised outside of its immediate parent directory?
Thanks,
John
Add the path in the Windows system variables:
- Control Panel -> System -> tab Advanced, button Environment Variables.
- Edit the "Path" system variable and add the full path to the installed rsync:
C:\Program Files\cwRsync\bin or C:\cygwin\bin. or
C:\Program Files (x86)\cwRsync\bin or C:\cygwin\bin.
This way the commands rsync and ssh should run from any directory. Make sure you put in the correct install path to the application else it won't work. See screenshot below:
Environment Variable Setup: Make sure the path you added is under System Variables:
Command: As seen, I am running this directly from root of C: drive
cwRsync distribution contains a batch file example called cwrsync.cmd with correct path settings. You can simply add your rsync command into that file.
Is it possible to run Matlab commands from Mac command line?
The matlab script is in the bin subdirectory of the MATLAB app bundle. On my machine, this means I can run it like so:
/Applications/MATLAB_R2012a_Student.app/bin/matlab
If you want this bin directory on your path (so that you can just run matlab, mex, etc), edit or create a new text file called .bash_profile in the top level of your home directory with the following line:
export PATH=/Applications/MATLAB_R2012a_Student.app/bin:$PATH
Replacing the "MATLAB_R2012a_Student" part with the name of your actual MATLAB app bundle. This will not come into effect for currently open terminals, but newly opened terminals should work properly.
You need the full path to the MATLAB executable, and you can use the -r option to run a command in the MATLAB that you start, as per the doc here.
As already mentioned above you need to first edit your .bash_profile file by adding the following line (replace 'MATLAB_R2020b' with your MATLAB version)
export PATH=/Applications/MATLAB_R2020b.app/bin:$PATH
Then after restarting the terminal you can open MATLAB by inserting the command
/Applications/MATLAB_R2020b.app/bin/matlab
You can also run your .m scripts by defining the working directory folder and the executable scripts and their paths. You just need to add more commands to the above.
/Applications/MATLAB_R2020b.app/bin/matlab -r "addpath(genpath('{Your working directory folder path}')); cd {Your working directory folder path}; {Your script name}; {Your other script name}; quit;"
Please find a more detailed description of MATLAB command line arguments from:
https://www.mathworks.com/help/matlab/ref/matlabmacos.html#d122e801165