the BEST time...
Hi....[:D]
Need your advise how to do this to the best way...
i made a package in wise to install a program. before the install package start installing the program the workstation DNS entries must be ok. so i made a batch file to check the DNs entries. where should i place the batch file in my package. any suggestion ....
Thanks.[8|]
Need your advise how to do this to the best way...
i made a package in wise to install a program. before the install package start installing the program the workstation DNS entries must be ok. so i made a batch file to check the DNs entries. where should i place the batch file in my package. any suggestion ....
Thanks.[8|]
0 Comments
[ + ] Show comments
Answers (10)
Please log in to answer
Posted by:
Netrock
13 years ago
Posted by:
Rheuvel
13 years ago
Posted by:
Netrock
13 years ago
Posted by:
Netrock
13 years ago
i did follow the steps below:
To execute a .BAT file in a Windows Installer installation, you will have to use a custom action. Do the following:
In the .WSI file, select View > MSI Script..
In the Installation Sequence list, click the location in the sequence where you want to place the custom action.
Double-click the Execute Program from Path custom action on the Custom tab. The Execute Program from Path dialog displays.
Populate the Details tab as follows:
Name: Enter a name for the custom action.
Property: Enter %COMSPEC. This is the environment variable that holds the location of the cmd.exe program.
Command Line: Enter "/c <path to .BAT>\<batchfile.BAT>" (replacing the text in <> with the path and name of your batch file. Enclose the path and batch file name in double quotes. The /c switch closes the cmd.exe window after the batch file executes. To execute the batch file and keep the cmd.exe window open, enter /k instead. (This can be useful for debugging batch files.)
Click OK.
but in the Batch file i have two messages, if the DNS entry for that workstation is not good, first it is resolving the hostname 2nd) resolving the IP
how can i show the errors in wise package as a pop windows.
same as if there is not enough disk space will inform the user.
Thank you for your help.[:)]
To execute a .BAT file in a Windows Installer installation, you will have to use a custom action. Do the following:
In the .WSI file, select View > MSI Script..
In the Installation Sequence list, click the location in the sequence where you want to place the custom action.
Double-click the Execute Program from Path custom action on the Custom tab. The Execute Program from Path dialog displays.
Populate the Details tab as follows:
Name: Enter a name for the custom action.
Property: Enter %COMSPEC. This is the environment variable that holds the location of the cmd.exe program.
Command Line: Enter "/c <path to .BAT>\<batchfile.BAT>" (replacing the text in <> with the path and name of your batch file. Enclose the path and batch file name in double quotes. The /c switch closes the cmd.exe window after the batch file executes. To execute the batch file and keep the cmd.exe window open, enter /k instead. (This can be useful for debugging batch files.)
Click OK.
but in the Batch file i have two messages, if the DNS entry for that workstation is not good, first it is resolving the hostname 2nd) resolving the IP
how can i show the errors in wise package as a pop windows.
same as if there is not enough disk space will inform the user.
Thank you for your help.[:)]
Posted by:
anonymous_9363
13 years ago
The User Interface sequence is the best place for communicating with the user. Keep your Execute sequence CA for silent installs, making sure that instead of presenting to the user, you write to the Windows Installer log. Here's a code fragment for that:
Set objMSIRecord = Session.Installer.CreateRecord(0)
objMSIRecord.StringData(0) = "[Your log text goes here - best passed in via a variable, of course]"
Session.Message msiMessageTypeError, objMSIRecord
Set objMSIRecord = Nothing
Posted by:
Netrock
13 years ago
Thanks VBScab for your post.
Originally, i choose Sequence: Normal Execute immediate/Deferred but according to your post i should
choose "Normal User Interface", where should i place my action after "SetPatchMode". please note i am not that Pro with
packaging thank you in advance for your patient..... but i know you are very good.
The code fragment you posted kindly, where should i place it . i know in the MSI Script tab when i select Normal Installation Mode i could see the codes, so that's the place i have to
place the posted codes. please advise.
Have a Nice day!
Originally, i choose Sequence: Normal Execute immediate/Deferred but according to your post i should
choose "Normal User Interface", where should i place my action after "SetPatchMode". please note i am not that Pro with
packaging thank you in advance for your patient..... but i know you are very good.
The code fragment you posted kindly, where should i place it . i know in the MSI Script tab when i select Normal Installation Mode i could see the codes, so that's the place i have to
place the posted codes. please advise.
Have a Nice day!
Posted by:
anonymous_9363
13 years ago
As I intimated, you should have 2 CAs: one in the UI sequence and the other in the EI sequence, the latter to cater for silent installs.
The code fragment is just that: a fragment. You would use it along with other code, not the least of which would include declaring the variables used, etc.
I'm afraid the forum is the wrong place for a tutorial. I have proper work to do and simply don't have the time to walk you through how to do what's necessary.
The code fragment is just that: a fragment. You would use it along with other code, not the least of which would include declaring the variables used, etc.
I'm afraid the forum is the wrong place for a tutorial. I have proper work to do and simply don't have the time to walk you through how to do what's necessary.
Posted by:
Netrock
13 years ago
Posted by:
Netrock
13 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.