finding the windows directory in batch script
Posted on 2004-11-16
I am writing a batch logon script for my windows 2000 server and windows 98 clients that will automatically copy a .lnk (shortcut) into the users startup directory. On my windows 2000/xp based systems this should be a simple task.
i.e.: copy \\server\cbldata\business\WPI529process.lnk C:\Documents and Settings\All Users\Start Menu\Programs\Startup
On the windows 98 systems the startup directory is located under the windows directory. Some of my systems windows directories are named differently. i.e. c:\win or c:\win98 or even c:\windows. I am kind of familiar with canonalization and I was wondering is there is a way that i could use a copy command similiar to the one above to perform this same proceedure in windows 98 regardless of what the windows directory is called.
i.e.: copy \\server\cbldata\business\WPI529process.lnk c:\%SYSTEM%\Start Menu\Programs\StartUp
Any insight is appreciated,