# Windows 7; Can you launch a program and have it open to a sub-directory?

**URL:** https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496
**Category:** Factual Questions
**Created:** [October 23, 2011, 1:42am UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496 "2011-10-23T01:42:18Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![caverject](https://avatars.discourse-cdn.com/v4/letter/c/779978/32.png) [@caverject](https://boards.straightdope.com/u/caverject)
#### Post date: [October 23, 2011, 1:42am UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496/1 "2011-10-23T01:42:18Z")

</div>

Little confusing post, I know, but what I am trying to do is launch a program from the desktop and not open to the standard or default page; specifically, I am using the home media program XBMC, and am trying to get it to boot directly into the “Music” screen, not the default home screen. I also need to have it do the same thing but for “Movies” and “TV Shows”, so I don’t want to change the setting from the program itself. Any ideas?

thanks

---

<div class="post-metadata">

### Author: ![Dog80](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@Dog80](https://boards.straightdope.com/u/Dog80)
#### Post date: [October 23, 2011, 11:57am UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496/2 "2011-10-23T11:57:41Z")

</div>

What you are asking has nothing to do with Windows 7, it depends entirely on the XBMC application.

Maybe there’s some command line parameter that starts XBMC in a specific folder. If the application itself won’t do it then there’s nothing else you can do.

---

<div class="post-metadata">

### Author: ![Antonius\_Block](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@Antonius\_Block](https://boards.straightdope.com/u/Antonius_Block)
#### Post date: [October 23, 2011, 1:27pm UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496/3 "2011-10-23T13:27:23Z")

</div>

You might want to try a macro recorder like [AutoHotkey](http://en.wikipedia.org/wiki/Autohotkey).

For each of the different desired functions (“Music”, “Movies”, TV Shows"), go through the necessary mouseclicks and/or keystrokes to get where you want to go, while recording a macro. Then, assign a clickable icon and/or hotkey combination to launch the desired function in the future.

Repeat for the other functions, and you’ll have three icons/hotkey combinations – one each for Music, Movies, and TV Shows.

---

<div class="post-metadata">

### Author: ![Arnold\_Winkelried](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@Arnold\_Winkelried](https://boards.straightdope.com/u/Arnold_Winkelried)
#### Post date: [October 23, 2011, 1:27pm UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496/4 "2011-10-23T13:27:48Z")

</div>

Similary to Applescript on Macintosh OS X, could you use something like [AutoIt](http://www.autoitscript.com/site/autoit/) on Windows to accomplish what you want?

---

<div class="post-metadata">

### Author: ![Sunspace](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sunspace/32/1250_2.png) [@Sunspace](https://boards.straightdope.com/u/Sunspace)
#### Post date: [October 23, 2011, 1:49pm UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496/5 "2011-10-23T13:49:32Z")

</div>

> [@Arnold\_Winkelried](#):
>
> … [AutoIt](http://www.autoitscript.com/site/autoit/)…

:eek: You may have just solved a problem for me.

---

<div class="post-metadata">

### Author: ![kspharm](https://avatars.discourse-cdn.com/v4/letter/k/ebca7d/32.png) [@kspharm](https://boards.straightdope.com/u/kspharm)
#### Post date: [October 24, 2011, 12:48am UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496/6 "2011-10-24T00:48:00Z")

</div>

Thanks, I think Autohotkey might be exactly what I need. I checked out AutoIt, it looks like that’s what Autohotkey is based on.

thanks

---

<div class="post-metadata">

### Author: ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)
#### Post date: [October 24, 2011, 4:27am UTC](https://boards.straightdope.com/t/windows-7-can-you-launch-a-program-and-have-it-open-to-a-sub-directory/600496/7 "2011-10-24T04:27:26Z")

</div>

> [@Antonius\_Block](#):
>
> You might want to try a macro recorder like [AutoHotkey](http://en.wikipedia.org/wiki/Autohotkey).
> 
> For each of the different desired functions (“Music”, “Movies”, TV Shows"), go through the necessary mouseclicks and/or keystrokes to get where you want to go, while recording a macro. Then, assign a clickable icon and/or hotkey combination to launch the desired function in the future.
> 
> Repeat for the other functions, and you’ll have three icons/hotkey combinations – one each for Music, Movies, and TV Shows.

Pick the shortest way, though. Ideally, choose a keyboard shortcut, as those are the quickest.
