簡體   English   中英

UserName = Environ $(“UserName”)在最新版本的Windows中不起作用?

[英]UserName = Environ$(“UserName”) not working in latest versions of Windows?

此代碼似乎不適用於Windows 7/8?

Public Function UserName()
    UserName = Environ$("UserName")
End Function

這有什么黑客攻擊嗎?

問候,

我用:

Username = CreateObject("WScript.Network").Username

這適用於使用Excel 2010的Windows7。

Environ("username")

用戶名而UserName2

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM