在Visual Studio安装程序中创建动态注册表值 [英] Create dynamic Registry value in Visual studio Setup
问题描述
大家好,
在创建Visual Studio部署安装程序时,我正在使用一些默认值("test")创建名为currentdate的注册表值.它的工作正常.但是我必须创建一个注册表值作为安装程序的当前日期(今天).该值应为安装程序的安装日期.
如何在VS安装程序注册表编辑器中动态传递值.
任何想法,请建议我.
谢谢,
Sheik
Hi all,
While creating Visual studio deployment setup, I''m creating registry value named as currentdate with some default value("test") . Its working fine. But i have to create a registry value as setup''s current date(today date). The value should be setup installed date.
How to pass the value dynamically in the VS setup registry editor.
Any idea, please suggest me.
Thanks,
Sheik
推荐答案
也许尝试在值字段中使用
Hi,
perhaps try to use in the value field
String.Format("{0:dddd, d MMMM yyyy}", DateTime.Now);
或
程序第一次打开时,让它读取应用程序exe的创建日期并将其添加到注册表中吗?
OR
when the program opens the first time, let it read the date created of your application''s exe and add it into the registry?
这篇关于在Visual Studio安装程序中创建动态注册表值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!