cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
beginner009
Level 2

Preventing Temporary Extraction of EXE Files to %Temp% Directory in InstallShield 2023 InstallScript Projects

Jump to solution

I am currently using InstallShield 2023. From a security perspective, I want to prevent the exe files created with the InstallScript project from being extracted to the %Temp% directory when executed.

I considered using FeatureMoveData or FeatureTransferData to achieve this. However, the files are temporarily extracted to the %Temp% directory before they are moved. Is there any way to avoid this?

Labels (1)
0 Kudos
(2) Solutions
varul
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @beginner009 ,

 By default installshield created installer will extract files to temp path which is an expected behavior as per our design, User wont be able to change it using FeatureMoveData or FeatureTransferData

However you can change the extract path at runtime using below command line switch for Installscript Project type projects.

setup.exe /tempdisk1extractpath"c:\Test"

You can use tempextractpath for Basic MSI project type and Installscript MSI.

Setup.exe /tempextractpath"C:\IS_temp\"

https://docs.revenera.com/installshield/rn/Content/helplibrary/InstallShield_2023_R2.htm?Highlight=%20tempextractpath

View solution in original post

varul
Revenera Moderator Revenera Moderator
Revenera Moderator

@beginner009 , It wont work, currently this specific option /tempdisk1extractpath"c:\Test" will only work on commandline, 

passing it in setup.exe commandline wont work. 

View solution in original post

(6) Replies
varul
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @beginner009 ,

 By default installshield created installer will extract files to temp path which is an expected behavior as per our design, User wont be able to change it using FeatureMoveData or FeatureTransferData

However you can change the extract path at runtime using below command line switch for Installscript Project type projects.

setup.exe /tempdisk1extractpath"c:\Test"

You can use tempextractpath for Basic MSI project type and Installscript MSI.

Setup.exe /tempextractpath"C:\IS_temp\"

https://docs.revenera.com/installshield/rn/Content/helplibrary/InstallShield_2023_R2.htm?Highlight=%20tempextractpath

Thank you for your response.

I have a couple of additional questions:

  1. Can the /tempextractpath command line switch be used with InstallScript projects as well?
  2. If I want to specify the 'ProgramFiles' or 'ProgramFiles(x86)' directory, what would the command look like?
0 Kudos

After trying, I was able to utilize the “tempdisk1extractpath”

I applied the suggested command line option, “tempdisk1extractpath”, when executing the .exe file from the prompt, and it worked as expected. However, when I set up the command line option within the InstallShield installation wizard, “tempdisk1extractpath” did not function as intended. What could be the potential reason for this issue?

0 Kudos
varul
Revenera Moderator Revenera Moderator
Revenera Moderator

As mentioned earlier,  installshield created installer will extract files to custom secure temp path, User wont be able to change it in dialog or script

Except at runtime, by using the switch in command line installation User can check the extract path. So if you are trying to change it script or dialog option, it wont work, because its by design.

If my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO".

Thank you for your response. Your reply has been very helpful.

I realize I may have used the wrong wording in my previous question.

I understand that it is possible to set command-line options for the exe file before it is built, so that these options are always applied. I understand this can be done from the Setup.exe tab or the General Options Panel in the Release Wizard.

For example, I was able to set options like /hide_progress successfully. However, when I set /tempextractpath "C:\Program Files", the built exe file does not work as expected.

Can you provide guidance on how to correctly set the /tempextractpath option in this context?

varul
Revenera Moderator Revenera Moderator
Revenera Moderator

@beginner009 , It wont work, currently this specific option /tempdisk1extractpath"c:\Test" will only work on commandline, 

passing it in setup.exe commandline wont work.