简体   繁体   English

退出使用NSIS安装程序创建的exe时如何获取当前日期时间?

[英]How to Get the current date time while exexuing the exe which is created Using NSIS Installer?

My requirement is to create an installer that should print the current date and time... In my NSIS script I have used the following code to get the current date and time 我的要求是创建一个应该打印当前日期和时间的安装程序...在我的NSIS脚本中,我使用以下代码来获取当前日期和时间。

 !define /date CUR_DATE "%m-%d-%Y %H-%M"
 MessageBox MB_OK "${CUR_DATE}"

I have compiled using NSIS complier and the out file is created. 我已经使用NSIS编译器进行了编译,并且创建了out文件。 While I am executing the installer it displays the current date time as at what time the script file is compiled.. Not the current time of executing.... Whenever executes it print the same time.... But I want to get the current date time.. How to achieve this? 当我执行安装程序时,它将显示当前日期时间以及脚本文件的编译时间。.不是当前执行时间。...每当执行时,它都会打印相同的时间....但是我想获取当前日期时间..如何实现?

I have found the solution.... The following in built command will help you to get the current time date time... 我找到了解决方法。...以下内置命令将帮助您获取当前时间日期时间...

${GetTime} "" "L" $0 $1 $2 $3 $4 $5 $6

$0 - Date $1 - Month $2 - Year $3 - Day $4 - Hour $5 - Minute $6 - Secs $ 0-日期$ 1-月$ 2-年$ 3-天$ 4-小时$ 5-分钟$ 6-秒

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 NSIS 创建安装程序时,如何为 exe 文件指定一个不同于标题栏图标的图标? - How to specify an icon for exe file which is different from the title bar icon when using NSIS to create an installer? 如何在不覆盖寄存器的情况下为 NSIS exe 生成的日志条目添加当前日期和时间的前缀? - How to prefix log entries generated from NSIS exe with current date and time without overwriting registers? NSIS获取正在运行的当前安装程序文件的路径 - NSIS get path of current installer file that is running 在NSIS中使用“ ExecWait”时如何设置整个安装程序不可见? - How to set the whole installer invisible while using 'ExecWait' in NSIS? 如何使用 NSIS 将注册表值从先前版本的安装程序导出和导入到当前版本的安装程序 - How to export and import the registry values form the previous version of the installer to current version of the installer using NSIS 使用NSIS将当前日期和时间写为文件名 - writing current date & time as file name using NSIS 是否可以将exe打包到首先运行的NSIS生成的安装程序中? - Is it possible to package an exe into an NSIS generated installer which runs first? NSIS-重建安装程序exe文件 - NSIS - rebuilding the installer exe file 如何获得NSIS中的当前时间(当地时间)? - How do I get the current time (local time) in NSIS? 如何使用 NSIS 安装程序重新启动 explorer.exe? - How do I restart explorer.exe with an NSIS installer?
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM