cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[HELP] Running VBScript code or file

Hi Everybody,
Here is my little problem today,
I have to create an icon on the desktop of users
I create a little VBScript to do that because, out of network, the way to copy
an existing icon, crash the msi installation

So to resume :
We have to create an icon with a shortcut to "Forms6" installed localy
But it has to start in a network location !
My script works fine, but i didn't succeed to integrate it in MSI (ISM)
Like code or like file !

Here is my code : ____________________________________________________________

Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
Dim strDesktop
strDesktop = objShell.SpecialFolders("Desktop")
Dim objShortcut
Set objShortcut= objShell.CreateShortcut(strDesktop & "\Galilee.lnk")
with objShortcut
.TargetPath = "C:\Program Files\Oracle\Forms6\BIN\ifdbg60.EXE MODULE=GFSGAL00 TERM=galilee:galilee userid=galirec/galirec@GALI"
.WindowStyle = 1
.Hotkey = "CTRL+SHIFT+I"
.Description = "Galilée"
.WorkingDirectory = "\\FR2N\Data\Commun\MG\Galilee6\EXE"
.Save
End with

____________________________________________________________

I create a vbs file cold : GalileeCreator.vbs

What do i try :
A go to the Custom Action to create a custom action :
for my fisrt example : launching the vBScript code

I think i didn't choose the good option

If someone can guide me with using thoose options, like sequence !!

This script must be executed a the end i think

If you have some questions iam ready to answer you

Many thanks
Regards
(1) Reply
You will need to

Change:
WHATEVERVARIABLE = WScript.CreateObject("WScript.Shell")

To:
WHATEVERVARIABLE = CreateObject("WScript.Shell")

Due to:
The installer runs script custom actions directly and does not use the Windows Script Host. The WScript object cannot be used inside a script custom action because this object is provided by the Windows Script Host.