1

I have an application that runs as a service. This application allows the user to connect and starts a subprocess under the user's windows account. In other words, mydomain\john connects to the service via TCP and says "launch" which starts a process on windows running under mydomain\john account.

Next, this subprocess is able to map drive T: using net use command. Then the process can run a VB script living on the mapped drive T:. No trouble so far. the problem arises when this VB script tries to run Excel using "createObject".

After setting DCOM launch settings with DCOMCNFG and creating the missing "Desktop" folder in the systemprofile folder, I still cannot get this to work. Oddly, if run my vb script and feed Excel a UNC path \fileserver\share1 rather than T:\ the script works.

Does anyone know why Excel would fail to access the T:\ mapping but have no issue with the UNC path?

John Leveille
  • 279
  • 1
  • 8
  • I'm confused, why did you had to edit the System profile? didn't you say the script runs under a specific domain user? – EliadTech Apr 01 '15 at 07:48
  • Check this question: [Map a network drive to be used by a service](http://stackoverflow.com/questions/182750/map-a-network-drive-to-be-used-by-a-service). One of the answers shows a way to map network drive for all users. – beatcracker Apr 03 '15 at 16:30
  • Running VBscript to call Excel or Word when VB script is started by a windows service leads you into a slew of challenges tying to the fact that you are not running as interactive desktop user. Running scheduled tasks hits the same set of issues. I discovered that starting in one of the newer versions windows, microsoft opted to seed the default user profile folders without the "desktop" folder. Creating this folder under systemprofile was a partial fix for some vbscript-office interaction. Now I can run Excel but cannot see the drives. Before I could not even run excel from my script. – John Leveille Apr 04 '15 at 17:57
  • I had the similar issue while using createObject I got H Drive could not be found while opening Excell xlsm.. IT must be due to previous incorrect UNC path/Mapped drive data in excel... By clearing XLSTART content I could get it fixed.. Here is the full document http://www.windowstechinfo.com/2016/01/solved-excell-xlsm-drive-could-not-be-found-mapped-network-drives-cannot-be-loaded-unc-path-works.html – Aravinda Jan 29 '16 at 07:25

0 Answers0