[Wing, P4350 ROM development] ace10134:
How to Create a Shortcut using the Extended ROM

How to Create a Shortcut using the Extended ROM

It's fairly simple...and useful, if you want to make a program automatically boot up after your ROM customizes the phone.

Download WinImage, Dutty's, and HTC Tools.zip

Unzip it to the location of your choice. Open the WinImage, Dutty's, & HTC Tools folder. You should find three files in there, winimage, duttys tool nbhtool, and Htc Rom Tool, as you can see below...

Run winimage from within that folder. Click OK to the Trial Registration screen (you have a 30 day trial, and the days only count when you use the program).

Now you should see this screen...

On that screen, go to File -> Open, and then navigate to your kitchen's folders. Now navigate to your kitchen's Build folder. Locate a file that has "ExtROM" in it's filename and make sure that the extention is a .NB file. (For users of Holly's Kitchen, the file is called WingDev_ExtROM.nb) Double click on the file, and then you should see something like this...

Double click on the __TFAT_HIDDEN_ROOT_DIR__ folder. Now you should see something like this...

Drag and drop the Config.txt file from that window to your Desktop (or any other location of your choice)

Now open your Config.txt file from your Desktop (or wherever you placed it). You should see something similar to this in the notepad window...

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
LOCK:Disabled
RST: Reset

Now, to create the shortcut, first you must have a pre-existing shortcut .lnk file. If you're trying to automatically start a program upon boot that you cooked in, then you will most likely find the location of the .lnk file by navigating to the OEM\ folder within your kitchen. Find your program's folder, open it, and then open the initflashfiles.txt file within there. Try to find a string of code that looks similar to this...

Directory("\Windows"):-Directory("Start Menu")
Directory("[B]\Windows\Start Menu[/B]"):-File("[B]Pointui Home.lnk[/B]","\Windows\Pointui Home.lnk")

Once you find a code that looks similar to that, write down the final directory (for me, it would be \Windows\Start Menu) for later use in step 13. Also write down the link's file name (Pointui Home.lnk) for step 14, too.​

Go back to the other notepad window (Config.txt). Remember that the notepad window should have something like this in it still...

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
LOCK:Disabled
RST: Reset

Just before the LOCK:Disabled line, create an empty line, as such...

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml

LOCK:Disabled
RST: Reset

Now fill that line in with CPY1:

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
CPY1:
LOCK:Disabled
RST: Reset

Remember back in step 9 where you wrote down a folder path? Well put that folder path right after the CPY1: command, as such...

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
CPY1:\Windows\Start Menu
LOCK:Disabled
RST: Reset

From step 9, you also wrote down the file name of the shortcut (the second thing you wrote down). First place a "\" after step 13, and then copy/paste in your file name, like so...

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
CPY1:\Windows\Start Menu\Pointui Home.lnk
LOCK:Disabled
RST: Reset

Then press enter after that line to create another empty line, and fill that one in with CPY2:

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
CPY1:\Windows\Start Menu\Pointui Home.lnk
CPY2:
LOCK:Disabled
RST: Reset

Now you can decide where you want to place the shortcut. CPY1: was used to find the inital location of the file (you can move any file you'd like), and CPY2: is used to place the file where you'd like. If you want your program to automatically boot, then you would add \Windows\StartUp after the CPY2: prompt, like below...

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
CPY1:\Windows\Start Menu\Pointui Home.lnk
CPY2:\Windows\StartUp
LOCK:Disabled
RST: Reset

Now, in the line right above where you are currently at in the Notepad window, on CPY1: line, copy the last part of that line (for me, I would copy \Pointui Home.lnk) Then paste that on the end of the CPY2: line. Your code should look like this...

LOCK:Enabled
XML: \Extended_ROM\WingDev_Config.xml
CPY1:\Windows\Start Menu\Pointui Home.lnk
CPY2:\Windows\StartUp\Pointui Home.lnk
LOCK:Disabled
RST: Reset

Save and close that notepad (Config.txt) window. You are now done editing it!

Return to the WinImage program (you should have left it running this whole time).

In WinImage, select your Config.txt file, and press Del on your keyboard.

Now in a File Explorer, navigate to your Config.txt file that you just edited (I told you to place it on your Desktop). Drag and drop that Config.txt file into the WinImage program. It will ask you, "Do you want to inject 1 files occupying xxxxx bytes?" Click Yes.

In WinImage, right click the Config.txt file that you just placed there. Click File properties. Then check the Read-only box and click OK.

Go to File -> Save. Once it saves, (it saves quickly, so you probably don't even notice it saving), close the WinImage window.

Now cook your ROM like usual. The shortcut will be automatically placed! If you have any more questions, or need more clarification, just ask!