> -----Original Message----- > From: Gerhard Hofmann [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 03, 2005 9:13 AM > To: [email protected] > Cc: [EMAIL PROTECTED] > Subject: Re: [Unattended] Created an apps-only-script > > > Urs Rau wrote: > > Hi Gerhard, > > > > Gerhard Hofmann wrote:
<snip> > > You're right, it would be better to put it into \\server\install\bin. In > this case, %scriptdir% would be \\server\install\bin. I need > to find a way to strip off the trailing "\bin" from this string because > I have to map \\server\install to drive z: and not > \\server\install\bin. Because I had no idea how to cut off the trailing "\bin", I simply put > everything in the root of my unattended share. > > Any ideas how to strip off the trailing "\bin"? ====== CODE BEGIN ====== :: Assumption: %scriptdir% = \\server\install\bin :: The next line will set %scriptdir% to original starting dir of the script set scriptdir=%~dp0 :: The next line will strip the last 4 characters from %scriptdir% leaving :: it as \\server\install set %scriptdir:~0,-4% ====== CODE END ======== <snip> Best regards, Kaari ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ unattended-info mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unattended-info
