Managed Install not running all VBS syntax

I have a zip file i have uploaded to the k1000 associated with my software. Inside the zip is the VBscript, the MSI, and a dll. In my VBscript i have the install of the MSI and then copying the DLL to certain folder.

This all works fine and dandy running it locally, but when you do it through kace, the MSI installs great, but the DLL does not copy to the directory specified in the VBscript. I've tested this with many different installs i have and it's just not going through my whole script. 

To add, when i go to Program Data\Kace\Installs, i can run the VBscript in there that Kace as put there and it works great too.

Any ideas?

1 Comment   [ + ] Show comment
  • where are trying to copy it to? - SMal.tmcc 7 years ago

Answers (1)

Posted by: joeostrander 7 years ago
Third Degree Blue Belt

When you launch a vbscript manually on a 64bit machine, it will normally be launched using wscript.exe from the System32 directory.  The KACE agent runs as 32bit process and therefore launches wscript.exe as a 32bit process from SysWOW64.

As you probably are aware, when your script runs as 32bit, the environment will be much different. The OS will alias HKLM\Software\Wow6432Node as HKLM\Software... C:\Program Files (x86) as C:\Program Files... and your DLL/COM objects will likely be inaccessible.

You can troubleshoot by launching the script manually as a 32bit process.  Manually launch a CMD prompt by specifying the full path to the 32bit cmd.exe (c:\windows\SysWOW64\cmd.exe).  In that CMD window, type the path to your script.  Or just launch your script like --> c:\windows\SysWOW64\wscript.exe <your script path>

One thing I've had to do a few times is to have the script check if it is running as a 32bit process and if so, relaunch itself as 64bit.

Here's a sample:

Set WshShell = CreateObject("Wscript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")


If fso.FileExists("c:\windows\sysnative\cscript.exe") Then

'32 on 64...relaunch

msgbox "I'm 32bit...relaunching"

WshShell.run "c:\windows\sysnative\cscript.exe //nologo " & Chr(34) & wscript.scriptfullname & Chr(34),,True



msgbox "I'm 64bit!"

End If
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ