Net Use Command in KACE Deployment isn't working
I've got a weird issue that I haven't been able to find much help on. I'm working on a package for Microsoft Dynamics SL 2011 (Which supposing I get it working I will be putting into the Software section here). But I'm having a strange problem. When I run the install from the computer, it's perfect, no problems. However, when I run it from the KACE Deployment the .bat file uses a net use command, and while it maps the letter drive, it appears as disconnected and even though you have full access to it, it doesn't act like it's there. Oh, and to make it even stranger, it only happens on Windows 7 64bit! The 32bit install works like a champ!
This causes issues with the rest of the install. I've tried changing the line to Net use S: \\<Server>\ /user:%username% but that just results in the script running with the computer name instead of the current logged in user. My former co-worker I talked to said he ran into this as well, but he couldn't quite remember what he did to fix it. I was hoping I wasn't alone out there with this problem and that somebody else had had this issue.
Thanks for reading!
Basically we have to trick the program into running as the current user rather than the one that the KACE Deployment uses. First I had to download the "RunAsCurrentUser.exe" utility located HERE: http://support.bigfix.com/download/bes/util/RunAsCurrentUser.exe. Then I took part of my script from my install.bat that mapped the drive and created a file called netmap.bat. I turned that into an executable using iexpress.exe (default on windows 7). and then in my install.bat file I started with "RunAsCurrentUser.exe --w "netmap.exe"" which ran the program and successfully mapped the network drive even through deployment with KACE.