類似于 C:\Windows\Users\張三\document 如: %userprofile% C:\>echo %userprofile% C:\Users\User
不明白是什么意思。
这个要第三方程序写出来,然后在OIT脚本中调用。
官方认证第三方服务团队 徐文标(福建-流浪) QQ:340298101 V&P :177-5046-4787 服务介绍:http://www.onlyit.cn/onlyit_service.html
自己写个dll,内部去获取你想要的目录路径,call_user_dll调用这个dll,get_user_dll_result返回对应的值
官方认证第三方服务团队 QQ:187199580 收费教程地址链接:http://www.onlyit.cn/topic_list_detail?subject_id=7&topic_id=102140&topic_page_id=1 手机收费版本地址链接:http://www.onlyit.cn/topic_list_detail?subject_id=3&topic_id=103479&topic_page_id=1
C:\>echo %userprofile% C:\Users\User
第一步:先建一个批处理文件,保存到某个目录中。我这里是保存为dir.bat文件,秕处理中的管道输出文件是user.txt需要预先存在,也保存在软件运行目录之下。 @echo %userprofile%>E:\OIT\oit_setup_20230604\oit_setup\user.txt remark 将获取的相关信息写入到指定的文件。 第二步:创建OIT的脚本 int main() { shell(get_home_path()+"\dir.bat")//执行批处理文件 db_read_txt_file(get_home_path()+"\user.txt");//读取批定文件的值 db_show(); return 1; };
登录后方可发贴