/build/static/layout/Breadcrumb_cap_w.png

Script not working in stubpath

Hi,

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]
"Version"="1.0.0"
"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)
Const OVERWRITE_EXISTING = True

if ofso.folderexists(strpath1) then

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

Set oSubFolder = oFolder.SubFolders

Else

WScript.Quit

End if

For each i in oSubFolder

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

Next

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   [ + ] Show comments

Answers (2)

Posted by: PackageExpert 15 years ago
Blue Belt
0
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.
Posted by: anonymous_9363 15 years ago
Red Belt
0
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
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