05-30-2018, 04:06 AM
Oh, then I am afraid I can not be of much assistance.
You might try to add an executable that does the finalizing work.
This means if possible, install forge needs to copy the executable that finalizes the installation in the windows temp dir AND execute it.
The executable could look like this:
Macro Macro33
I do not know if you can instruct install forge to run the the exe after installation? If possible then the final executable should be run as admin and you might pull it off?
Or maybe a bit simpler if install forge accepts .bat, you could put the commands in a .bat file and then the .bat file needs to be run at the end of the installation?
You might try to add an executable that does the finalizing work.
This means if possible, install forge needs to copy the executable that finalizes the installation in the windows temp dir AND execute it.
The executable could look like this:
Macro Macro33
;; Install forge passes install path to this .exe
str usermodified_path=_command
usermodified_path.trim
str folder_path
;; If install forge somehow did not pass a path to this .exe then use a default path
if(empty(usermodified_path))
,folder_path="C:\Program Files (x86)\App2" ;; Default path
else
,folder_path=usermodified_path ;; The path that is supposed to be passed from install forge
;; Stop if install path could not be detected.
if(!FileExists(folder_path 1))
,mes-(F"Could not detect installtion path:[]{folder_path}[][]Has the application been installed correctly?" F"APPLICATION NAME" "!")
;; With this command, the logged on user will take ownership of the specified directory
;; http://shabaztech.com/assigning-ownership-files-folders-takeown-exe/
run "takeown" F"/f ''{folder_path}'' /r /d y" ;; double quoted the ''folder_path'', because of paths with spaces
I do not know if you can instruct install forge to run the the exe after installation? If possible then the final executable should be run as admin and you might pull it off?
Or maybe a bit simpler if install forge accepts .bat, you could put the commands in a .bat file and then the .bat file needs to be run at the end of the installation?