Chetan
Posts: 11
Joined: Fri May 24, 2019 12:12 pm

Possibility of not installing files from installation package

Hi,

Is there a possibility to include files in the installation package, but not install them?

Kind regards,
Chetan.
Chetan
Posts: 11
Joined: Fri May 24, 2019 12:12 pm

Re: Possibility of not installing files from installation package

Hi,

An update on this one.
I'm trying to solve this issue bye creating Post build events.
The events will create a folder in one of the folders which the installer has created and copy files there.
Now i have a problem while creating a folder the command mkdir returns with error.

The configuration of the post build event can be seen in the attached image. I think it's a problem of running mkdir
command. The
Create.png
Create.png (6.79 KiB) Viewed 2451 times
rmdir[/b] command works fine.

Regards,
Chetan.
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Possibility of not installing files from installation package

Hello Chetan,

The post-build event sounds like a good idea, indeed.

However, it is not the "mkdir" command that is not working.

In cases like this, the best thing to do would be to manually test your command and see if it helps. Your command can be tested in the following way:

- open a Run window (WIN+R button) and type in the following:

Code: Select all

cmd.exe /c mkdir /s /q c:\temp
By running the above command, you will see that nothing happens, there is not a "temp" folder created on the "c:\" drive.

However, this does not help much either. The reason of this is because the "/c" command tells the command prompt to run a specific command and then terminate. In this case, we need the command prompt to not terminate, so we can see what is wrong with our code. To do so, we can simply use the "/k" command instead. The /k runs a command and then returns to the command shell. This is really useful for examining variables (mainly for debugging purposes).

By running the same command with the "/k" parameter, you will notice that the whole command is incorrect. In the command shell, you will receive the following:

"The syntax of the command is incorrect."

Long story short, the syntax should look something as it follows:

cmd.exe /s /q /k mkdir c:\temp

With that being said, your build event should look as it follows:
Chetan RUN.PNG
Chetan RUN.PNG (11.18 KiB) Viewed 2444 times
Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Chetan
Posts: 11
Joined: Fri May 24, 2019 12:12 pm

Re: Possibility of not installing files from installation package

Thanks Catalin!

This works fine :-)
Catalin
Posts: 6592
Joined: Wed Jun 13, 2018 7:49 am

Re: Possibility of not installing files from installation package

You're always welcome, Chetan.

I am glad I could help.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”