I cant figure out how to use %systemroot% rather than C:\ in my custom scripts. Below is code snippet of one of my custom scripts but I'm thinking it would be better practice to have something more dynamic than C:\
Is there a oEnvironment.Item() I can use? I have looked but cant seem to find anything. I have tried:
sTargetFolder = "%systemroot%\System32\" But this gives an invalid path error. I know this is something stupidly simple but cant work it out.oLogging.CreateEntry sSName & ": PCAP Copy pthreadVC.dll",LogTypeInfo
sSourceFile = oEnvironment.Item("DeployRoot") & "\Applications\WinPcap\files\SYSDIR\pthreadVC.dll"
sTargetFolder = "C:\Windows\System32\"
oFSO.CopyFile sSourceFile, sTargetFolder, True
If Err<>0 Then
oLogging.CreateEntry sSName & ": PCAP Failed to Copy pthreadVC.dll",LogTypeError