Re: [WiX-users] Problems in running vbscript during install

2007-11-23 Thread Daryn Mitchell
Your CustomAction needs to be defined differently.
Instead of ExeCommand, use VBScriptCall='' (value = blank to just run the
script, or put the name of the VBScript function). ExeCommand attribute
tries to execute an EXE, not run VBScript.

Also I'm pretty sure that deferred custom actions have to be scheduled
between InstallInitialize and InstallFinalize, which would mean you need to
schedule yours earlier or make it an immediate action.
(As found in Deferred CA description,
http://msdn2.microsoft.com/en-us/library/aa368268.aspx)

Daryn.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of chandan
Koushik
Sent: Friday, November 23, 2007 12:03 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Problems in running vbscript during install



I am unable to ... call a vbscript file 






NOT Installed



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Problems in running vbscript during install

2007-11-23 Thread Szentpali Janos
chandan Koushik wrote:
> Hi All,
> I apologize for posting this if it has been answered several times but I am
> unable to get this working.I am using wixV3 .I just want to call a vbscript
> file which sets permission for user.It takes folder name as argument.
> when i run it from the command line using cscript 
> c:\>cscript setdirpermissions.vbs "c:\fonts"   the permissions to fonts
> folder gets changed.
> But when i try this in wix .this does not happen.
> 
> 
> 
>   ExeCommand=""C:\fonts"" 
> Return="check" />
> 
> NOT Installed
>
> And even the Other approach also fails
> 
>  Value=""SetDirectoryPermissions.vbs"" />
> cscript
>  ExeCommand="[MNANONPERMSCRIPT]" Return="ignore" />
> 
> NOT
> Installed
> NOT
> Installed
>
> The Script does not get executed .Please Help and suggest me the correct way
> to call the vb script at the end of installation.
>
> Regards,
> Chandan
>   
I don't know if this will help you (I only did a few setup projects in
my like so I'm very new to this), but I have several cases where I used
VBScript custom actions. I needed it to extract the installation path
from some path to a file, stored somewhere in the registry. Basically I
defined a  property in the wix project and than set it's value in the
VBScript. I included the vbscript file as binary resource.

Perhaps if you modify the VBScript so that it reads the parameter as a
property of the installation (through the Session object) instead of
passing it as a command line argument you could use my approach:

I included the script as binary resource:



I defined the custom action:



I set it to run before anything happens :D... obviously you should
change this to suit your needs:

*


*
In the VBScript file I set the property INSTALLDIR like this:

Session.TargetPath("INSTALLDIR") = path

Maybe you could get the property by reading instead of writing:

font_path = Session.Property("SOMEPROPERTYDEFINEDINWIX")

Though if the font path is some path set as an installation path, than
you should get the property through the TargetPath and not Property (but
I am not sure, this is just an idea):

font_path = Session.TargetPath("SOMEPROPERTYDEFINEDINWIX")

The details of defineing the property depend on where do you set the
value of the fonts folder. Is it some directory that the user chooses;
is it a directory hard coded?

Hope this helps :D

-- 
Szentpáli János


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


[WiX-users] Problems in running vbscript during install

2007-11-23 Thread chandan Koushik

Hi All,
I apologize for posting this if it has been answered several times but I am
unable to get this working.I am using wixV3 .I just want to call a vbscript
file which sets permission for user.It takes folder name as argument.
when i run it from the command line using cscript 
c:\>cscript setdirpermissions.vbs "c:\fonts"   the permissions to fonts
folder gets changed.
But when i try this in wix .this does not happen.





NOT Installed

And even the Other approach also fails


cscript


NOT
Installed
NOT
Installed

The Script does not get executed .Please Help and suggest me the correct way
to call the vb script at the end of installation.

Regards,
Chandan

-- 
View this message in context: 
http://www.nabble.com/Problems-in-running-vbscript-during-install-tf4860207.html#a13908275
Sent from the wix-users mailing list archive at Nabble.com.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users