Hi guys, I've currently been tasked with writing a VBscript that we can run as part of a users login script or distribute via a NAL object through Zenworks.
Basically I'm looking for a simple script that will determine what the Windows Directory is (e.g C:\WINDOWS, C:\WINNT) using the %windir% variable and IF C:\WINNT export the results to a text file.
So far, Ive come up with the following,
Which displays the result in a popup window, instead I'd like the result to be saved as a text file IF the answer is C:\WINNT.
Any help would be greatly appreciated.
Thanks.
Basically I'm looking for a simple script that will determine what the Windows Directory is (e.g C:\WINDOWS, C:\WINNT) using the %windir% variable and IF C:\WINNT export the results to a text file.
So far, Ive come up with the following,
Code:
set shell = WScript.CreateObject("WScript.Shell")
windowsdir = shell.ExpandEnvironmentStrings("%windir%")
MsgBox(windowsdir)
Which displays the result in a popup window, instead I'd like the result to be saved as a text file IF the answer is C:\WINNT.
Any help would be greatly appreciated.
Thanks.