Login | |
|
 |
RE: objFSO with Alternate Credentials ? - 10/2/2006 11:10:39 PM
|
|
 |
|
| |
ebgreen
Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
|
I don't believe that you can instantiate a FileSystemObject with alternate credentials. You can however use WMI with alternate credentials to get file versions.
_____________________________
"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: objFSO with Alternate Credentials ? - 10/3/2006 12:01:30 AM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
how about this (oops: note the change to office 11 as I was testing this against office2003) Machine = "remotePC" Set oFSO = CreateObject("Scripting.FileSystemObject") FileVer = oFSO.GetFileVersion("\\" & Machine & "\\c$\\Program Files\\Microsoft Office\\Office11\\Excel.exe") Wscript.Echo FileVer
< Message edited by gdewrance -- 10/3/2006 12:10:12 AM >
|
|
| |
|
|
|
 |
RE: objFSO with Alternate Credentials ? - 10/3/2006 11:21:55 PM
|
|
 |
|
| |
mbouchard
Posts: 1924
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
You can always use Psexec from Sysinternals (now Microsoft) Something like this WshShell.Run "Psexec wscript c:\path\to\script.vbs domain/user password" Just read the help file and you will get the exact syntax.
_____________________________
Mike For useful Scripting links see the Read Me First stickey! Always remember Search is your friend.
|
|
| |
|
|
|
|
|