Click here to Skip to main content
15,894,720 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey,

I'm creating a setup file and I would like to run a .cmd file \ .bat file after the installation process done (from the installed folder).
I basically want to refresh my desktop because from some reason after the installation is done the shortcut that being created stay blank, and if I refresh my desktop the icon is updated and can be seen.
So I built small .cmd file to refresh my desktop, because I could not do that through NSIS scripting. But now I also don't how to run my .cmd file using it.

I'm using window 10 by the way.

Appreciate your help please.

What I have tried:

I really get lost with NSIS documentation.

I tried edit Modern.nsh file and execute different commands like:

nsExec::Exec

But all fail to work.
Posted
Updated 9-Aug-20 21:03pm
v2
Comments
Sandeep Mewara 10-Aug-20 1:30am    
Just sharing, a probable option if you don't fine other ways: https://www.codeproject.com/Answers/612214/NSIS-Setup-project-for-NET-application
glbtech 10-Aug-20 5:03am    
do you have any clue why it doesn't work?

Section
nsExec::ExecToStack '"$INSTDIR\reic\refresh.bat"'
SectionEnd


or this...


Section
SetOutPath $INSTDIR
ExpandEnvStrings $0 %COMSPEC%
nsExec::ExecToStack '"$INSTDIR\reic\refresh.bat"'
SectionEnd

1 solution

This is the same issue as How to create setup file + desktop shortcut with NSIS (modern interface)[^]. Please do not repost.
 
Share this answer
 
Comments
glbtech 10-Aug-20 3:26am    
I didn't ask how to create setup file - it's not the same issue. You didn't read my question. In addition I do't want any help from you the next time. Please don't evn reply because you simply don't have any knowledge to help.
Richard MacCutchan 10-Aug-20 3:56am    
In both questions you state that you do not understand the documentation. So essentially they are the same issue.
glbtech 10-Aug-20 5:01am    
I suggest you to go to the beach to watch the waves, You're too old for programming.
Richard MacCutchan 10-Aug-20 5:11am    
Adding insults will not help your case.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900