How to use System Environment Values like %Path% or %Computername% in Form Fields?

  • Thread starter Thread starter Christoph Sbach
  • Start date Start date
C

Christoph Sbach

Example:

Set objCurrentFolder = Application.ActiveExplorer.CurrentFolder
set CurrentItem = objCurrentFolder.Items.Item(1)
CurrentItem.UserProperties.item("Computername").Value=
CurrentItem.UserProperties.item("Username").Value=

Y:\>set
COMPUTERNAME=PC-F110-1
ComSpec=C:\WINNT\system32\cmd.exe
OS=Windows_NT
USERNAME=HannibalL
:
 
This resolve my problem:

in vba i create a sub MyShell with shell command inside.

in vbs run this macro with Application.MyShell.



OL2000: Calling a VBA Procedure from VBScript

Anwendbar auf

This article was previously published under Q221827
 
Back
Top