View forum topic
List of forum topicsSubject: What is the replacement for strf_getpathowner()?
Hi
I used the strf_getpathowner() function to get the path owner in an older version of CreateInstall but I cannot find the equivalent function in the newest version of CreateInstall. How do I get the path owner in the new version of create install?
Thanks,
Simon
You can open Gentee Help file by clicking Help menu - Gentee help item.
There is a method str.fgetdir( str )
For example,
str mydir
mydir.fgetdir( macrox_do( "#setuppath#" ))
Hi
I had found that function in the Gentee documentation but missed the idea that it would remove the final directory. I thought it would simply return the directory portion of a fully qualified file name.
Thanks,
Hi
Am I correct in assuming this has to be done in the Source Code section of the install script. I tried it in the "Set variable" section and the value of the variable was "tmp.fgetdir(macrox_do(#setuppath#))" instead of the result of evaluating this code. I was expecting the value to be something like "c:\temp\level1\".
The problem I am trying to solve is the following. I had this code in the UnpackFiles script of an old version of CreateInstall.
MacroSetStr( "setuppathparent", strf_getpathowner(strf_getpathowner(strf_getpathowner( MacroDone("#setuppath#") ))))
I was then able to use #setuppathparent# in defining a custom path for unpacking certain files. So I would like to be able to accomplish the same thing in the newest CreateInstall. Can you tell me correct way to do this?
Thanks,
Simon
>I thought it would simply return the directory portion of a fully qualified file name.
If you specified the full filename then fgetdir method returns the directory.
>MacroSetStr( "setuppathparent", strf_getpathowner(strf_getpathowner(strf_getpathowner( MacroDone("#setuppath#") ))))
Use 'Source Code' command like this
str stemp sdir
sdir.fgetdir( macrox_do("#setuppath#"))
stemp.fgetdir( sdir )
macrox_setstr( "setuppathparent", sdir.fgetdir( stemp ))
You can send us (info@createinstall.com) your .ci project file with 'CreateInstall' subject if something is wrong.
My problem was because I tried the following:
str setuppathparent
setuppathparent.fgetdir(macrox_do(#setuppath#))
setuppathparent = setuppathparent.fgetdir(setuppathparent)
The previous post had an error so here is what I was doing:
str setuppathparent
setuppathparent = setuppathparent.fgetdir(macrox_do(#setuppath#))
setuppathparent = setuppathparent.fgetdir(setuppathparent)
setuppathparent = setuppathparent.fgetdir(setuppathparent)
The first problem: macrox_do(#setuppath#) must be as macrox_do("#setuppath#"). A line must be quoted.
The second one: you don't need to assign
setuppathparent = setuppathparent.fgetdir(setuppathparent)
in this example, setuppathparent is assigned to itself.
and I am not sure but main parameter and the parameter in fgetdir must be different.
January 16, 2025 Installer CreateInstall 8.11.1 was released.
June 19, 2024 Installer CreateInstall 8.11.0 was released. read more
November 13, 2022 Installer CreateInstall 8.10.1 was released.
May 21, 2022 Installer CreateInstall 8.10.0 was released.
September 25, 2021 Installer CreateInstall 8.9.0 was released.
July 15, 2021 Installer CreateInstall 8.8.1 was released.