- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Preventing Temporary Extraction of EXE Files to %Temp% Directory in InstallShield 2023 InstallScript...
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
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?
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\"
@beginner009 , It wont work, currently this specific option /tempdisk1extractpath"c:\Test" will only work on commandline,
passing it in setup.exe commandline wont work.
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\"
Thank you for your response.
I have a couple of additional questions:
- Can the /tempextractpath command line switch be used with InstallScript projects as well?
- If I want to specify the 'ProgramFiles' or 'ProgramFiles(x86)' directory, what would the command look like?
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?
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?
@beginner009 , It wont work, currently this specific option /tempdisk1extractpath"c:\Test" will only work on commandline,
passing it in setup.exe commandline wont work.