Tuesday, June 21, 2011

Retrieving Path to the Start-Up Folder

Sometimes you need to place something in Windows start-up folder. Well, it is not hard to do it, but first of all you need to know where this folder is situated. Fortunately, it's not hard, either. Here is the script that lets you retrieve path to the start-up folder:
for /f "tokens=2*" %%i in ('reg query "hkcu\software\microsoft\windows\currentversion\explorer\shell folders" /v ;Startup ^|find /i "startup"') do @set "startfolder=%%j"
echo %startfolder%
You can use this example to create scripts with the help of our powerful batch files editor. Hope you'll find this post useful.

No comments:

Post a Comment

Translate