Click here to Skip to main content
15,888,109 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

I am trying to set product name, product version number, File description via powershell script.

Could you please share any code snippet which can set a given version number to given EXE file.

Thanks,
Srinivas.

What I have tried:

I tried with RegEx replace option, but that doesn't help me out.
Posted
Updated 3-Dec-18 8:12am
Comments
Richard MacCutchan 3-Dec-18 7:33am    
So show us the code you used with Regex and explain what happened when you ran it.
nsvrao 3-Dec-18 7:41am    
That is in remote machine which I can't post it... Could you please share any powershell code snippet which will set product version number to the given exe file.
Dave Kreskowiak 3-Dec-18 12:26pm    
Why would ever want to do this?

There is no API to set this stuff and it's set into the executable when the app is compiled.

1 solution

With this tool you can set the version info: Simple Version Resource Tool for Windows[^]
Example:
verpatch foo.dll "1.2.3.4 my special build"
 
Share this answer
 

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