OUR NETWORK:MediaSmart Home Sansa Community Explore3DTV TechLore RoboCommunity Dijit Community About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 265122.0
November 22, 2008 12:32 PM
Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

jdefranco

Member
Joined: 11/20/2008

Hi.

I was following the document "An HP TouchSmart Application Development Guildelines Primer" and built the HelloTouchSmart application.  It registered successfully but I don't see it anywhere after starting TouchSmart again.

 Not sure if it matters but after the first time I registered it and it didn't work, I updated everthing using the HP Update tile.  Then, I tried to register again, but still no luck.  I tried a couple variations of the app - always registering successful but never showing the app in the Touchsmart interface.

Discussion:    Add a Comment | Comments 1-20 of 22 | Latest Comment | 1 2 Next »

November 22, 2008 12:34 PM

I forgot to mention my application version:

Through control panel: 2.0.210.0
Through Personalize/About: 2.0.3126.29817

November 22, 2008 12:57 PM

Hmm...did you go into Personalize and see if it is in the Add a Tile list?

--Andrew

November 22, 2008 6:01 PM

Yes, I looked there and it wasn't there. Does Touchsmart have any kind of log files or is there any way to debug what's going on during the load process?

November 24, 2008 5:17 PM

Any update on a way to debug this? I have the same issue.

November 24, 2008 6:20 PM

No update yet. I was thinking of sending a message to the authors of the article. Do they support it? I suppose it can be one of 3 things:

1. The compiled application doesn't run.
2. The RegisterSmartCenterApp didn't register the app but says it was good
3. There was a problem with TouchSmart loading the app but it didn't like it.

I suppose that even if #1 were the problem, you would see the application as a tile that failed to load?

Who wrote RegisterSmartCenterApp? What does it do?

Maybe if someone created a test app that they know works, zipped it up with the register file and a bat file that does all the right steps, we can run it and if it still fails, it's got to be our Touchsmart app.

November 24, 2008 9:28 PM

RegisterSmartCenterApp is part of the HP TouchSmart software update that is necessary for third party applications to be added in. It adds new applications into HP TouchSmart by copying the XML file that describes the application in HP TouchSmart terms into a known location. HP TouchSmart monitors that location and keeps track of which applications have been added.

Perhaps the issue is that the application you're trying to register has the same AppID as one of the already existing applications.

November 24, 2008 11:46 PM

How do I find the appID? It's not in the Register.xml:


true
true
false

C:\temp\TouchSmartTile.exe

chromeless
true
Top
InfoView
TouchSmartTile
true
false
false




http://www.touchsmartcommunity.com/article/95/An-HP-TouchSmart-Application-De...

Errata in document?

Thanks,
Ben

November 24, 2008 11:54 PM

Crap, the XML is stripped out. Look at the link above in the developers guide, and the only changes I made were to HelloTouchSmart, became TouchSmartTile (and the .exe)

Thanks,
Ben

November 25, 2008 1:50 AM

By AppID, is it that GUID thing that got generated by SmartCenterApp? It could be that I have multiple XML for the samle executable? I've tried registering so many times using different conditions to try to make it work, maybe that's the problem?

I also tried to change the name of the compiled app and of course, changed the AppPath tag in the Register.xml file to match (but not the DisplayName).

Does anyone know where can I find this "location that TouchSmart monitors"? Maybe I can try to clear out any of my Register.xmls there and try again?

November 25, 2008 10:23 AM

Actually, I may have gotten confused on the AppID. I don't have all the information here right now, but it may be that the AppID is something that will be used in an upcoming version of the HP TouchSmart RegisterSmartCenterApp.exe. The one that's out as an update now may generate AppIDs internally but not require them to be present in the XML file you use to register. Let me double-check and post again later.

TouchSmart keeps track of which files in the monitored location have already been processed, so clearing out that folder won't help. What you'd need to look at is the user.config file in %userprofile%\AppData\Local\Hewlett-Packard\SmartCenter.exe_Url_*\[Version]\user.config I'm pretty sure you'll recognize most of the data in there.

November 25, 2008 6:55 PM

Well, partial success. Looking into the user.config in the directory listed above, it sure looked like what's in the Register.xml is copied into the XML of user.config. I changed the XML to include my AppManagementSetting tag but it didn't work. However, I was able to see the app by doing the following:

1. Close down TouchSmart
2. Find Clock.exe (as per the path in the user.config file).
3. Make a backup Copy it.
4. Copy your app into the directory and rename it clock.exe
5. Startup TouchSmart
6. In Preferences, disable the app by clicking on the tile and Accept.
7. The clock tile should disappear from the main view.
8. Go back to Preferences and enable Clock again and Accept.
9. The HelloTouchSmart app ran (with the title and icon of Clock, of course).

So it's not the HelloTouchSmart application, and it doesn't look like it's Touchsmart. Probably, the Register app ran into some difficulty but still wrote out "success" to the console.

I'll keep digging. Here are some observations, which may or may not be relavant.

A) I compiled my app with Visual Studio 2008, .Net 3.5 but on a different computer running XP. I then copied the .exe from the debug directory over to the Vista machine.

B) I noticed that when Touchsmart runs the other apps (Weather, Clock, I see their names in the Process list under TaskManager with a *32 at the end. The *32 is not there for the sample app.

C) I noticed that Clock has a very similar directory structure as shown above for user.config. It also has a user.config file, which looks a lot like what the Clock.exe.config would have looked like if it was a stand-alone app. Maybe the registration process builds this .._Url*\[Version]\ directory hierarchy? There was no such hierarchy for HelloTouchSmart when I register it.

D) My app doesn't have a HelloTouchSmart.exe.config file. Maybe I need one?

November 25, 2008 7:52 PM

Neither A) B) C) or D) should have much to do with the problem. Compiling somewhere else shouldn't matter. The *32 indicates that the app is a 32 bit app running on a 64 bit OS, I believe. The user.config file for Clock is there because it's a .NET app and it uses per-user configuration settings. The HelloTouchSmart app may not be using configuration settings. Your app only gets an .exe.config file if you use per-machine configuration settings in it. Again, that's a .NET thing you may not be using.

I'd need to see your XML file and the exe to dig into this more. Not sure if this site lets you attach files to private messages, but you could try that.

November 25, 2008 9:42 PM

The RegisterSmartCenterApp.exe doesn't do anything special that you can't do manually. All it does is copy your config file into the following directory:

with updateconfig
Windows XP: C:\Documents and Settings\All Users\Application Data\Hewlett-Packard\TouchSmart\SmartCenter 2.0\UpdateAppSettings
Windows Vista: C:\ProgramData\Hewlett-Packard\TouchSmart\SmartCenter 2.0\UpdateAppSettings

with defaultconfig
Windows XP: C:\Documents and Settings\All Users\Application Data\Hewlett-Packard\TouchSmart\SmartCenter 2.0\DefaultAppSettings
Windows Vista: C:\ProgramData\Hewlett-Packard\TouchSmart\SmartCenter 2.0\DefaultAppSettings

Thats all it does. I assume the SmartCenter application attaches a file watcher to those directories to look for changes, or, it looks there on startup. I haven't looked into that particular part. As with any .NET user config file, the file is usually loaded when the app loads, and, unless the developers add some way to refresh the config and expose that to the users, you will only see changes in the config once the application restarts.

November 25, 2008 10:24 PM

For the current version of the HP TouchSmart update on the support site that's correct. However, future versions of RegisterSmartCenterApp.exe may do more than that. I strongly recommend you use the tool provided, since manual copying may not be enough in the future.

If you're doing this for debugging and during development, no problem. Just be aware of the above.

You are correct in that the SmartCenter application watches those locations during runtime and reads them during startup. SmartCenter will update its user config file and refresh the UI during runtime, so a restart should not be necessary.

November 25, 2008 10:25 PM

Regarding AppID, I was confused. That's a future feature of RegisterSmartCenterApp.exe.

November 25, 2008 11:39 PM

jdefranco:

Check out my reply to the Primer. I believe I've reproduced the issue you may have run into using RegisterSmartCenterApp.exe.

The essence is: although you get a success message when registering, if your AppPath element contains carriage return/line feed characters, registration won't work properly.

Sorry for the inconvenience this has caused.

November 25, 2008 11:56 PM

Yes, I think you're correct on the CRLF. I got mine to work, as well, after removing the CRLF.

However, there seems to be a bug in the "smartcenter deleteconfig".
1) It deletes the configuration file if you're not in the directory, no error if you are.
2) Sometimes when Touchsmart regenerates the user.config file, it recreates the file with previously registered tiles (i.e. not the default as stated in a separate post), and if there's an error in the register.xml which was put into user.config, it's still present.

It seems to me the most reliable way is to modify the user.config file by text editor.

Thanks,
Ben

November 26, 2008 12:18 AM

Not sure I understand 1). Can you elaborate, please?

When no user.config file is found at startup, both "defaultconfig"- and "updateconfig"-registered XML files will get processed as far as I remember.

You may be right that, during development, hand editing the user.config is best and most reliable, but for release to users, RegisterSmartCenterApp.exe is the only practical way to get new apps into the user's HP TouchSmart shell.

November 26, 2008 11:19 AM

#1 say I've opened up a cmd shell, and I'm in the directory %userprofile%\AppData\Local\Hewlett-Packard\SmartCenter.exe_Url_*\[Version]\, I'm assuming smartcenter deleteconfig, is just trying to remove the SmartCenter.exe* directory and it can't because I'm currently in that directory. An error would be nice.

#2 I thought the problem which "smartcenter deleteconfig" was supposed to solve was restoring the smartcenter back to the factory original settings. Such that registered tiles which are in a bad state (i.e. bad register.xml) could be reregistered.

Is that not the function of deleteconfig?

November 26, 2008 12:03 PM

#1: I understand. And I agree that an error message would be nice. Unfortunately I can't commit to creating one within any timeframe that would be meaningful to your situation. But I'll keep it in mind for future versions.

#2: Not quite, deleteconfig just deletes the user config file. We may consider adding some more developer capabilities to the RegisterSmartCenterApp.exe, but again, I can't make a commitment.

Like JoeS said above, the main thing RegisterSmartCenterApp.exe does is copy XML files, but in addition it assigns GUIDs it uses to track apps that have been added. During development I recommend that you look through the locations that JoeS pointed out and work with those files. For delivering your app to a user, make sure you use the RegisterSmartCenterApp.exe during installation.

Discussion:    Add a Comment | Back to Top | Comments 1-20 of 22 | Latest Comment | 1 2 Next »

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window