Skip navigation
3607 Views 8 Replies Latest reply: Mar 12, 2012 9:08 AM by mrspike RSS
Apprentice 56 posts since
Feb 15, 2011

Has received 1 of 9 achievements.
Currently Being Moderated

Jul 12, 2011 10:22 AM

Using sdclient /onreboot - script pathing issue

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.

  • zman Master 3,277 posts since
    Dec 14, 2007

    Has received 9 of 9 achievements.
    Currently Being Moderated
    1. Jul 12, 2011 10:34 AM (in response to David_HDR)
    Re: Using sdclient /onreboot - script pathing issue

    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.

  • Currently Being Moderated
    2. Jul 12, 2011 10:37 AM (in response to zman)
    Re: Using sdclient /onreboot - script pathing issue

    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?

     

    http://community.landesk.com/support/message/64075#64075

  • zman Master 3,277 posts since
    Dec 14, 2007

    Has received 9 of 9 achievements.
    Currently Being Moderated
    4. Jul 13, 2011 5:49 AM (in response to David_HDR)
    Re: Using sdclient /onreboot - script pathing issue

    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. 
  • Mach6 Employee 637 posts since
    May 23, 2008

    Has received 6 of 9 achievements.
    Currently Being Moderated
    6. Jul 20, 2011 9:45 PM (in response to David_HDR)
    Re: Using sdclient /onreboot - script pathing issue

    Hi everyone,

     

    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.

     

    Thanks all!

  • Rookie 18 posts since
    Jan 22, 2008

    Has received 1 of 9 achievements.
    Currently Being Moderated
    7. Mar 12, 2012 6:00 AM (in response to David_HDR)
    Re: Using sdclient /onreboot - script pathing issue

    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.

  • mrspike SSMMVPGroup 1,319 posts since
    Dec 19, 2007

    Has received 9 of 9 achievements.
    Currently Being Moderated
    8. Mar 12, 2012 9:08 AM (in response to Paider)
    Re: Using sdclient /onreboot - script pathing issue

    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

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 20 points
  • Helpful Answers - 10 points
LANDESK Community powered by Jive SBS® 4.5.7.1  |  Legal Notices  |  Privacy Policy  |  Icon 

TweeterOn Twitter  |  Icon FacebookOn Facebook © 2007 LANDESK Software