InstallShield support needed

DistillingExperts
DistillingExperts used Ask the Experts™
on
From the ism file:

1. How to generate a script to execute a .bat file before starting the installation?
2. How to check for the existence of a folder if it doesn't exist, create it?
3. How to make the installation give full access to a folder?

Thank you in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try this command in a batch file.

runas /u:machine_name\administrator /p:password /sa "c:\program\program.bat"

This line will kick off the bat file with local administrator rights. - please replace machine_name with the machine name you are running the batch on. For multiple machine create a domain account with the specific rights to the specific folder.

To create the folder use the following command
c:
cd test
mkdir %DATE%
move c:\test\DATA\*.* c:\test\%DATE%

you can substitute the date with any variable you like eg. folder name.. Let me know if this helps?

.Dave

Author

Commented:
I would need to know in InstallShield the steps on how to run the batch files.

Commented:
if exist "c:\foldername" (
dir c:
) else mkdir "c:\newfolder"
This will create the folder if it does not exist.
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Author

Commented:
What would be the step-by-step in InstallShield in order to create this script? I don't know how to create scripts.

Author

Commented:
I created it in Install Script but didn't work:
function OnBegin()
begin
     if exist "c:\foldername" (
            dir c:
       ) else mkdir "c:\newfolder"

end;

Commented:
I don't know installshield, but that will work from the command line.
I am going to try to bump this thread for you

Author

Commented:
I managed to do it through InstallShield. Create a InstallScript (MyFuction). Create a Custom Actions associated with MyFunction. In Sequences/ Execute insert the Custom Action. The code to generate the folder is:
function OnBegin()
begin
      CreateDir("C:\\Folder");
end;

Author

Commented:
Now I need itens 1 and 3:
1. How to generate a script to execute a .bat file before starting the installation?
3. How to make the installation give full access to a folder?

Author

Commented:
Thank you. It helped.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial