LDMS 9.0 SP2. Unfortunately I am using the dreaded 3-24 patch .
Anyway, I am using an autoit script that leverages sdclient /onreboot to continue an installation after a reboot. Following this doc http://community.landesk.com/support/docs/DOC-7751
Attached is my script and a copy of an sdclient log.
The reboot occurs normally, but it doesn't execute the script I'd like it to execute upon reboot. SDClient actually seems to copy the autoit script into a different directory under SDMcache, and executes it from there.
This breaks my deployment because I rely on the directory structure in the original package. I expected, when I passed the path to an exe in sdclient /onreboot, that it would execute the script FROM that location.
Is this expected behavior? In the SDclient log, line 1095 shows the path where the script get's executed from after a reboot. The script actually exists there, but no other resources do so the script fails.
I can hard code the path I would expect the rest of the files to be at, so I can make the the package work, but the behavior is very different from what I was expecting.
Thanks for any assistance.
Quick question is the autoitscript in the same folder as websense? If not it may be easier place all the files in the same folder structure. I've had mixed results with onreboot. I've had better results with using a local scheduled task to kick off scripts after a reboot.
I haven't had a chance to fully test/look at your process, but here is a batch file that I used to deploy SAP and it used the reboot option and it worked well, perhaps you'll see something that you missed?
RE: zman and directory structure.
Sort of. It's all in the same directory structure. As long as the structure is preserved, everything works.
The package as downloaded looks like this on a client. This is correct. Before reboot, the script is executed from the correct location as expected.
After reboot, the script actually get's executed from here. None of the other stuff is in in the right place, so the install breaks
Message was edited by: David_HDR - for some reason quotes didn't work
So some thoughts
runwait($ldclientdir & '\sdclient.exe /onreboot /exe /p="' & @ScriptFullPath & '" /cmds=rebooted','',@SW_HIDE) RunWait($ldclientdir & '\sdclient.exe /reboot','',@SW_HIDE)
@ScriptFullPath maybe change to hard coded location and change the last Runwait to just Run.
Thanks zman. Those really didn't help, unfortunately
As a work around, I just "hard coded" the paths to where the MSI's should be on the client. It should be pretty reliable. I still don't quite understand why the client ends up executing the script from a different directory
I'd like to see exactly what the OnReboot command is putting in there through the @ScriptFullPath variable to know where this is falling apart. Obviously it should be the location of the script location, because that's a built in macro in AutoIt, right? If that's the case then a bug seems like the most likely culprit, and if so I'd like that found, logged, and squashed as quickly as possible.
I don't have the ability to test this in front of a core right now, but doesn't the onreboot command put an XML file in the ldclient directory on the client that contains the information of what to run on the next reboot? If someone who's aware of this thread knows can you put that in here? If not, I'll be back in the office on Friday and can check it out myself.
I know you've got a workaround in place, and I'm glad for that, but if it's at all possible I'd really like to track this down so a workaround isn't needed in the future.
We also ran in that problem today.
After some search in the community I found this post, from last year.
Is that fixed in a patch? We are also still on LDMS 9 SP2 with MCPs from April.
I ran into this issue while using a batch file script with the onreboot... what I found is if I CD (change directory) to the sdmcache\ temp folder where the package downloads to as the last command prior to the /onreboot command(s), it will pick up there after the reboot.
I think what is happening is, sdclient is resuming in the last location the batch file calls