I need to create a script that runs setup.exe /configure Install.xml from the folder the script is located.
When I run the script below, it does find the
Thanks guys! I mixed it up and made this that works for me. (Not sure if something could be made cleaner, but it works!)
Dim WshShell
Set WshShell = Wscript.CreateObject("Wscript.Shell")
Set objShell = CreateObject("Wscript.Shell")
Set WshEnv = WshShell.Environment("PROCESS")
Set objShell = CreateObject("Wscript.Shell")
strPath = Wscript.ScriptFullName
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPath)
strFolder = objFSO.GetParentFolderName(objFile)
objShell.CurrentDirectory = strFolder
WshEnv("SEE_MASK_NOZONECHECKS") = 1
WshShell.Run("setup.exe /Configure Install.xml"), 0, true
WshEnv.Remove("SEE_MASK_NOZONECHECKS")
wscript.quit(RetVal)