oweathersby
asked on
Create a batch file to search for folder and launch or not lauch another batch file
I need to create a batch file that performs the following:
1. Check that Cisco Systems VPN is installed
a. If no Install VPN and them Go to B
b. If Yes Check to see if the Client Access Agent is installed
· IF YES = Done
· If NO =
o Copy the .ini file
o Copy a FOLDER(Profiles with the LanganASA.pcf file inside) to c:\program files\Cisco Systems\VPN Client\
o Copy mswinck.ocx to C:\windows\system32
o Run Clean Access Agent
I have the files, folders and copy procedures. I am having trouble with the search and if then parts. Also, the installation of the VPN client requires a reboot. How do I make the process continue after a reboot?
This batch file will be used to kick of the process in SCCM if that makes a difference.
Thanks
1. Check that Cisco Systems VPN is installed
a. If no Install VPN and them Go to B
b. If Yes Check to see if the Client Access Agent is installed
· IF YES = Done
· If NO =
o Copy the .ini file
o Copy a FOLDER(Profiles with the LanganASA.pcf file inside) to c:\program files\Cisco Systems\VPN Client\
o Copy mswinck.ocx to C:\windows\system32
o Run Clean Access Agent
I have the files, folders and copy procedures. I am having trouble with the search and if then parts. Also, the installation of the VPN client requires a reboot. How do I make the process continue after a reboot?
This batch file will be used to kick of the process in SCCM if that makes a difference.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes when the call command is complete it will return control to the original batch file.
And good job on the VPN installer.
And good job on the VPN installer.
ASKER
Hi Tenaj,
The batch file is working great. There were other requirements that were added and I took care of all but two. I am closing this question to assign you the points, but what do you think about the following:
First:
I used xcopy to put a folder and its contents in the desktop folder of all users. I changed the icon of the folder form the standars folder image to a star. WHen xcopy moves the folder, it does keep the custom folder icon of the star. Is there a way to do that?
Second:
There is a registry key, computer state I believe, that has the OU the computer belongs to. There is other information in that key also. How can I query the registry for that key and that one entry to use that as a variable on my batch file?
Thanks,
Omar W
The batch file is working great. There were other requirements that were added and I took care of all but two. I am closing this question to assign you the points, but what do you think about the following:
First:
I used xcopy to put a folder and its contents in the desktop folder of all users. I changed the icon of the folder form the standars folder image to a star. WHen xcopy moves the folder, it does keep the custom folder icon of the star. Is there a way to do that?
Second:
There is a registry key, computer state I believe, that has the OU the computer belongs to. There is other information in that key also. How can I query the registry for that key and that one entry to use that as a variable on my batch file?
Thanks,
Omar W
ASKER
Thanks. I did have other comments/question in the main message.
And for my knowledge, what are ther differences between batch files and scripts, besides script language is more "involved"?
And for my knowledge, what are ther differences between batch files and scripts, besides script language is more "involved"?
First
Xcopy to my knowledge won't let you change the folder icon type.
Second
I'm not sure if you can query a registry key. I know you can add, change, and delete them, but that's not what you need.
However, someone else here may know some additional information about both of the above questions. If it's important then post another question about it.
Sorry I wasn't more help on that,
tenaj
Xcopy to my knowledge won't let you change the folder icon type.
Second
I'm not sure if you can query a registry key. I know you can add, change, and delete them, but that's not what you need.
However, someone else here may know some additional information about both of the above questions. If it's important then post another question about it.
Sorry I wasn't more help on that,
tenaj
ASKER
So far so good. And I even found the away to make the VPN instllaer silent by creating setup.iss file :)
At the first check, if the designated VPN client file is not found, I am currently calling the next batch file to install teh VPN client. The call command shoudl return control to this batch file once the called batch is doen running, correct?