I am trying to use VBScript as a Custom Action DLL in .net setup.
The basic idea is to validate the Serial no.key.
For this I have written VBScript with Session Variables to check the Serial No.
But it gives the error :
There is a problem with Windos Installer Package.A script required for this install to complete could not be run.
Contact your support personal.
Please if anyone know reply...
|
| Shyam Vaidya Monday, September 10, 2007 6:23 AM |
There are two things wrong that I can see.
1) Visual Studio VBScript custom actions must be just VBScript, not a function. There's no support for calling a function in a script.
2) You need to put [PIDKEY] in the CustomActionData of your custom action and retrieve it in the script by getting Property("CustomActionData"). Visual Studio custom actions are all deferred and can't directly see properties, that's what CustomActionData is for.
|
| PhilWilson Friday, September 14, 2007 9:24 PM |
The Visual Studio installers don't supply IDE support for validation during the UI sequence, which is why this was posted:
http://support.microsoft.com/kb/253683/en-us
This is related, a C++ example.
http://www.codeproject.com/install/msicustomaction.asp
|
| PhilWilson Tuesday, September 18, 2007 10:56 PM |
Hi, Shyam Vaidya,
Based on my understanding, your vbs in the Setup Project doesn't work in client's computer, does it?
First, could you please try to run the vbs alone on the client's computer?
If it doesn't work, then this problem could be caused by someOSissues of the client's comuter.
Here are some regular solutions for "A script required ..." Error.
1) Disable real-time scanning of anti-virus products or if any other real time software scanning your machine. 2) Ensure that you do not have any software which automatically removes files from the TEMP directory. 3) Log in the machine with the Domain Administrator account. 4) Download and install the latest version of Windows Scripting Host & Windows Installer for your Windows Operating System from http://www.microsoft.com/downloads/ 5) Place the installation file in a temporary directory (Example C:\temp) on the machine where you are installing the product. 6) After doing the above, try to run the installation file again. 7) Check Distributed Component Object Model (DCOM) permissions as explained in http://support.microsoft.com/default.aspx?scid=kb;en-us;295278
Hope this helps,
Regards |
| Yu Guo �MSFT Tuesday, September 11, 2007 6:25 AM |
I recommend posting the script here.
A common error is that people think that a Windows Installer VBScript is a Windows Script Host (WSH) script, but it is not. So if you use things like WScript.Echo or WScript.CreateObject they will not work.
|
| PhilWilson Tuesday, September 11, 2007 11:32 PM |
We are changing the issue type to “Comment�because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question�by editing your initial post and changing the radio button at the top of the post editor window. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions. Thank you!
|
| Yu Guo �MSFT Friday, September 14, 2007 6:47 AM |
Hello Mr.Phil Wilson,
Here is the script,
Function CheckSN Dim SerNum 'SerNum = Session.Property("ISX_SERIALNUM") SerNum=Session.Property("PIDKEY") If (SerNum="") Then MsgBox "Serial number not specified. Stopping Setup." CheckSN=1602 Else CheckSN=0 End if End Function
I am using this during installation.I have followed the tips as per previous message.Please tell me how it will be exeuted.
Thanks & regards,
Shyam Vaidya.
Software Developer.
|
| Shyam Vaidya Friday, September 14, 2007 10:42 AM |
There are two things wrong that I can see.
1) Visual Studio VBScript custom actions must be just VBScript, not a function. There's no support for calling a function in a script.
2) You need to put [PIDKEY] in the CustomActionData of your custom action and retrieve it in the script by getting Property("CustomActionData"). Visual Studio custom actions are all deferred and can't directly see properties, that's what CustomActionData is for.
|
| PhilWilson Friday, September 14, 2007 9:24 PM |
Thanks.
Please tell will it validate after I enter a Serial No.in respective text box?
I have tested all this,it only runs after all setup overs...
Also please assist in following case:
I want to add Register User functonallity in Setup.
Forus, it is necessary that user is not allowed to go next without registering the product.
Is it possible?
For register user , I have used Register User Dialog box and customized register exe,but it support without registration also.
Thanks lot..
Thanks & Regards...
|
| Shyam Vaidya Monday, September 17, 2007 6:40 AM |
The Visual Studio installers don't supply IDE support for validation during the UI sequence, which is why this was posted:
http://support.microsoft.com/kb/253683/en-us
This is related, a C++ example.
http://www.codeproject.com/install/msicustomaction.asp
|
| PhilWilson Tuesday, September 18, 2007 10:56 PM |
Thanks you Sir.
Thats ok...
But , there will be some solution that if the Register User button clicked it will set some property that will
be used to know that button was clicked...
Please tell how it willbe doneby ORCA?
Also I have read about Installer API..will they useful for this purpose...?
|
| Shyam Vaidya Wednesday, September 19, 2007 9:16 AM |