Link to home
Create AccountLog in
Avatar of hbpub
hbpub

asked on

Running a batch file to install apllication for a bunch of user


I running a batch file to install cognos 7.4 for 1500 hundred users.
I  have written the batch file below. However whenever I run it on a test computer, I receive an error stating that the C:\ contain invalid path. My automatic installation would be aborted.
any ideas on how to fix this, or create an MSI package for GPO installation?




Echo Off
"\\Mangos\apples\Cognos\Cognos 7.4MR2 Installers\IMPUSER74MR2\setup.exe" /s "\\fifile\flatiron\Cognos\Cognos 7.4MR2 Installers\IMPUSER74MR2\response.ats"
Pause..
"c:\program files\cognos\cer5\bin\configcp.exe" -t "\\Mangos\apples\Cognos\Cognos 7.4MR2 Installers\Cognos 7.4MR2 Installers\IMPUSER74MR2\Cognosinstall.ccp"

 Echo on
Exit

Thanks
Hbpub
Avatar of GMurad
GMurad

use 'CALL' before each of your commands executing a program. this May solve your problem.
please post the error
Avatar of hbpub

ASKER

The error says Cognos auto run has encountered a problem and would close. C or D invalid path.

Here is the script which I am running.

Echo off
\\Moon\Sky\Rollout\Cognos\IMPUSER74MR2\setup.exe /s "\\Moon\Sky\rollout\cognos\IMPUSER74MR2\response.ats"

Pause..

"c:\program files\cognos\cer5\bin\configcp.exe" -t "\\Moon\Sky\rollout\cognos\IMPUSER74MR2\Cognosinstall.ccp"

 Echo off.


Hbpub.
ASKER CERTIFIED SOLUTION
Avatar of GMurad
GMurad

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
can you please post the exact error?
Avatar of hbpub

ASKER

I have been able to get the file to work.
No I need to do the following,
1) to write a script or batch file to copy a folder  and the batch file to users C drive.
2) To run this batch file when the users logon

3) to reboot the computer when the installation is done.

Thanks
hbpub
Avatar of hbpub

ASKER

good
- To copy a folder use the following command
     xcopy /E /Y "[FolderPath]\*.*" c:\

- To launch an executable at the startup, you can add an entry under
     HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

and you can add a Domain Group Policy to achieve this as well.

- To reboot the computer use the following command ...
    shutdown -r