I am writing some simple scripts for my technicians to use in the field. The primary purpose is to upgrade the code on various devices. I have a working script which prompts them for a filename currently. Works fine, but I would like to take it a step further where they can just browse to the file and the script will use that filename later on in the script when it fires off the download commands. I'm not trying to execute the file, just need the name so I can use it in a variable.
Here is what I tried and it doesn't like this. I can browse and select the file, but the script errors out when it hits the line where I am trying to use the filename variable in a crt.Screen.send line of code. I am not an SME on VBScript, learning as I go.
set objShell = CreateObject("Shell.Application")
fileName = objShell.BrowseForFolder(0, "Pick a file" , 16384, 0)
Here is what I tried and it doesn't like this. I can browse and select the file, but the script errors out when it hits the line where I am trying to use the filename variable in a crt.Screen.send line of code. I am not an SME on VBScript, learning as I go.
set objShell = CreateObject("Shell.Application")
fileName = objShell.BrowseForFolder(0, "Pick a file" , 16384, 0)