I am trying to run below vbscript through stubpath:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\mozilla firefox add-ons]
"StubPath"="C:\\Program Files\\mozilla firefox add-ons\\update.vbs"

Dim oFSO, oFolder, oSubFolder, i

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set objshell = Createobject("wscript.shell")
struserprofile = objshell.expandenvironmentstrings("%userprofile%")
strpath1 = struserprofile & "\Application Data\Mozilla\Firefox\Profiles"
strCurrentDir = oFSO.GetParentFolderName(WScript.ScriptFullName)

if ofso.folderexists(strpath1) then

Set oFolder = oFSO.GetFolder(struserprofile & "\Application Data\Mozilla\Firefox\Profiles")

Set oSubFolder = oFolder.SubFolders



End if

For each i in oSubFolder

Path = struserprofile & "\Application Data\Mozilla\Firefox\Profiles\" & i.name


strpath2 = path & "\extensions"

strpath3 = strpath2 & "\{b749fc7c-e949-447f-926c-3f4eed6accfe}"
strpath4 = strpath2 & "\{c4dc572a-3295-40eb-b30f-b54aa4cdc4b7}"
strpath5 = strpath2 & "\{8ea9957e-2953-402f-80e0-bceb5f169d6f}"

strfrom1 = strCurrentDir & "\{b749fc7c-e949-447f-926c-3f4eed6accfe}"
strto1 = strpath2 & "\{b749fc7c-e949-447f-926c-3f4eed6accfe}"
strfrom2 = strCurrentDir & "\{c4dc572a-3295-40eb-b30f-b54aa4cdc4b7}"
strto2 = strpath2 & "\{c4dc572a-3295-40eb-b30f-b54aa4cdc4b7}"
strfrom3 = strCurrentDir & "\{8ea9957e-2953-402f-80e0-bceb5f169d6f}"
strto3 = strpath2 & "\{8ea9957e-2953-402f-80e0-bceb5f169d6f}"

if ofso.folderexists(strpath3) = 0 then
oFSO.Copyfolder strfrom1, strto1, OVERWRITE_EXISTING
end if

if ofso.folderexists(strpath4) = 0 then
oFSO.Copyfolder strfrom2, strto2, OVERWRITE_EXISTING
end if

if ofso.folderexists(strpath5) = 0 then
oFSO.Copyfolder strfrom3, strto3, OVERWRITE_EXISTING
end if

But it is not working. It is opening "c:\programfiles\mozilla", which is not expected behaviour. After login if i run it manually then it is working fine.
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


try replacing the stub path with the following:-

Cscript.exe //B //NOLOGO "C:\\Program Files\\mozilla firefox add-ons\\update.vbs"

As usual, copy the stub path and run it manually first to make sure it works. I tried it before (running a VBS via Stubpath) so it should work.
Answered 09/16/2009 by: PackageExpert
Blue Belt

Please log in to comment
If you're including this in your package, you could always make Windows/Windows Installer work for you, of course, by changing the registry value to use the relevant directory property.

Let's say there's a property called 'add-ons'. Make the entry read Cscript.exe //B //NOLOGO "[add-ons]update.vbs" Now you have catered for installations where the user chooses to install programs to, say, E:\Apps, as well as obviated any issues with paths with spaces in their names.
Answered 09/17/2009 by: VBScab
Red Belt

Please log in to comment