RE: Deploying a batch file
|
Logged in as: Guest
|
|
Users viewing this topic:
none
|
|
Login | |
|
RE: Deploying a batch file - 30.Oct.2003 7:42:00 AM
|
|
|
emooney
Posts: 22
Joined: 17.Feb.2003
From: Dublin
Status: offline
|
hiya,
having the same problem as 2500hd. I run the batch file from the PC and it works nicely. However, should I try and deploy it from languard, nothing appears to happen on the target pc, tho the deployment log reports it as successfull.
I ran it in interactive mode. the batch file runs the command -
msiexec /i "\\pcname\installer\ts1.msi" /qn
Any ideas ?
Eric
|
|
|
|
RE: Deploying a batch file - 30.Oct.2003 9:25:00 AM
|
|
|
xnih
Posts: 2465
Joined: 30.May2001
From: Idaho
Status: offline
|
lets go back to the basics on this, what is LNSS actually doing?
It is taking the command you tell it and scheduling it as a scheduled task, that is all.
So lets try doing the same thing from the command line on one of these machines. You've said the batch file runs fine if executed by hand, what if you go to the command prompt and schedule it as a task.
cmd at 10:40 Some_batchFile.bat
does it run this way? If so what is different when you do a at command and look at it when you do it by hand compared to when LNSS is scheduling it?
eric
|
|
|
|
RE: Deploying a batch file - 31.Oct.2003 9:02:00 AM
|
|
|
emooney
Posts: 22
Joined: 17.Feb.2003
From: Dublin
Status: offline
|
Actually, when i manually schedule it - the command - msiexec /i "\\pcname\installer\ts1.msi" /qn , it works fine.
when i run the batch file (containing - msiexec /i "\\pcname\installer\ts1.msi" /qn ) on the test pc, it adds itself to the task schedule, runs and then says 'the process' could not start..
this leads me to believe its a permissions problem of some sort and not related to languard at all.. I suppose if I got it running on the PC first, and it was still occuring on languard it would be a LG problem. Tho some pointers would help please. Thanks anyway.
Eric [ October 31, 2003, 03:03 PM: Message edited by: emooney ]
|
|
|
|
RE: Deploying a batch file - 31.Oct.2003 3:55:00 PM
|
|
|
xnih
Posts: 2465
Joined: 30.May2001
From: Idaho
Status: offline
|
First, what version are you guys running that are seeing issues, latest build is what I'm playing with, 3.3 20030924.
Ok, back to a batch file that calls notepad.exe
I created a file called startit.bat, only one line in it: notepad.exe
I send it as a custom job, tell windows that it is NOT a normal MS patch, and I leave the switches blank. I go into the advanced options and tell it to run in interactive mode (otherwise it is just going to run in the background and I'll never be prompted for anything or see it. Then I push startit.bat to the remote machine. Here is what I see in deploy_patches.bat
C:\WINNT\system32\Patches>type deploy_patches.bat REM LANguard Network Security Scanner REM Deploying missing patches @echo off setlocal call C:\WINNT\system32\patches\startit.bat C:\WINNT\system32\patches\qchain.exe C:\WINNT\system32\patches\qchain_log.txt
and as a scheduled task: C:\WINNT\system32\Patches>at Status ID Day Time Command Line -------------------------------------------------- 5 Today 1:55 PM C:\WINNT\system32\patches\deploy_patches.bat
Things to verify/check. Startit.bat calls notepad.exe, in my case notepad.exe already resides in the c:\winnt\system32\patches directory (and even if it didn't it resides in the path statement). So make sure that your batch file is has a full directory structure layout of where it is calling the file from.
Run in interactive mode if you want to see anything, in some cases you still may not, but if you do not check 'interactive' you won't see a thing except in the process explorer as it starts/runs.
I've found that scheduling AT commands from the command line don't work well in all cases. Scheduling .exe's as Jim pointed out before, seems to work fine, but if you try to schedule a batch file, even if you tell it interactive, I could get it to work and run notepad.exe
What the difference is between doing it by hand at the cmd prompt, through the scheduled task option, and remotly through the command like LNSS does, I don't know. Ultimately, it is something that MS and the OS are in charge of, not LNSS.
eric
|
|
|
|
RE: Deploying a batch file - 3.Nov.2003 5:45:00 PM
|
|
|
Guest
|
I posted this in another msg, but this is where it looks like it should be
"Is there any way to manually edit deploy_patches.bat before it goes out to the clienet? (i.e. for a custom install, I need to remove the setlocal cmd in the batch file). I have been looking everywhere to find where this bat is being created from, but I can not seem to locate it.
X - can you help?"
The reason being if the batch file I am calling is called by patches_deploy.bat it doesn't work. Even if I goto the remote machine and do it manually; however, if I manually edit the patches_deploy.bat and remove setlocal, and run it manually, it works.
|
|
|
|
RE: Deploying a batch file - 3.Nov.2003 7:08:00 PM
|
|
|
xnih
Posts: 2465
Joined: 30.May2001
From: Idaho
Status: offline
|
what version are you running? I just did this (called another bat file from deploy_patches.bat) fine last week as mentioned in the post right above yours.
eric
|
|
|
|
RE: Deploying a batch file - 4.Nov.2003 8:44:00 AM
|
|
|
Guest
|
I am using 3.3 latest build. Now, I take it back. After reading through the site, it seems that the AT files wont start, but if I do it manually it does work.
I have to deploy this batch file to 200+ machines tonight, and I am starting to freak a little that I am going to have to manually visit each machine.
|
|
|
|
RE: Deploying a batch file - 4.Nov.2003 10:48:00 AM
|
|
|
xnih
Posts: 2465
Joined: 30.May2001
From: Idaho
Status: offline
|
Don't know what to tell you since I can't reproduce this issue of it not working. In the case of my callit.bat file mentioned above I did have to set it in interactive to be able to deal with being able to see notepad running and I have had to make sure that the program I'm running is located in the path or that the batch file has the correct path to the program it needs to launch.
So a bit more info on what exactly your trying to do would help.
eric
|
|
|
|
RE: Deploying a batch file - 4.Nov.2003 3:55:00 PM
|
|
|
Guest
|
Yes, I too got notepad to come up; however, notepad is locally installed on every machine, so its just calling a local file. However, if I try to call a batch file it dont work. The only way I got this to work, is to push the batch files I need via GFI, use Hyena to push a remote registry Run Once script and reboot. Upon reboot it calls c:\winnt\system32\patches\deploy_patches.bat This so far, is the only way I got it to work. Very messy, I wish I could find out the reason why GFI isn't working, but at least its a start.
|
|
|
|
RE: Deploying a batch file - 4.Nov.2003 4:39:00 PM
|
|
|
xnih
Posts: 2465
Joined: 30.May2001
From: Idaho
Status: offline
|
I'm still missing exactly what you are doing that is different than when calling notepad. My batch file, called callit.bat is being called by deploy_patches.bat.
What is your batch file calling?
In the past I've forced registry changes, called multiple programs, etc, through custom batch files. This is how I did Office 2000 SP1 and SP3 a long time ago (http://myweb.cableone.net/xnih under Advanced LNSS stuff).
Push all the files in a self extracting file, so they are all on the machine and have the self extracting exe call the batch file, or have a batch file call another program.
Anyway, you have a workaround for now, let me know though a bit more on the details and I might be able to figure something out.
eric [ November 04, 2003, 10:40 PM: Message edited by: xnih ]
|
|
|
|
RE: Deploying a batch file - 6.Nov.2003 7:01:00 PM
|
|
|
Guest
|
I have used AT a bit. And I think I see what is going on here. If the AT service is running as "LocalSystem" the batch file running as that service can't see any network drive letters as that service isn't logged on to the network. That is why pushing the .exe files to the client works or running notepad.exe.
Bill
|
|
|
|
RE: Deploying a batch file - 6.Nov.2003 7:18:00 PM
|
|
|
Guest
|
I guess I should give the work around that we use. In our batch file we add a line: net use h: \\server\share /user:domain\username password.
Then networkinstallfile.exe and net use /d h:
The drawback here is the password in the batch file. Setup restricted user and you are set.
Bil
|
|
|
|
RE: Deploying a batch file - 10.Nov.2003 4:58:00 AM
|
|
|
uk90104
Posts: 9
Joined: 24.Jun.2003
Status: offline
|
I have used LandGuard to deploy the Citrix client to 100s of PCs. What I had to do was create a self extracting exe file that would uncompress the Citric install files to the patch dir of the local machine. You can get the self extracting exe to automatically run a batch file i.e. install_citrix.bat from within itself.
I basically used the information Eric supplied for doing an Ie6 install.
|
|
|
|
RE: Deploying a batch file - 12.Nov.2003 8:19:00 AM
|
|
|
emooney
Posts: 22
Joined: 17.Feb.2003
From: Dublin
Status: offline
|
Have to agree with Dave Connelly here. I tried the steps that Eric did in the IE6 Roleout and it worked very nicely. Using SFx it does the job.
Thanks for the heads up on that method.
Eric
|
|
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts |
|
|