Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Take Ownership procedure
#4
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
Code:
Copy      Help
;; 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?


Messages In This Thread
Take Ownership procedure - by InterestedNewbie - 05-29-2018, 03:37 PM
RE: Take Ownership procedure - by r0n - 05-29-2018, 04:39 PM
RE: Take Ownership procedure - by r0n - 05-30-2018, 04:06 AM
RE: Take Ownership procedure - by Kevin - 05-30-2018, 03:28 PM
RE: Take Ownership procedure - by Kevin - 05-30-2018, 08:08 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)