error message when using $MYAPPDATA$

Got a problem you cannot solve? Try here.
Post Reply
rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

error message when using $MYAPPDATA$

Post by rosstrusler »

I am a WISE user who is considering switching to InstallAware, as I already have the Codegear Edition. My first test was with a simple app, but I've hit a snag.

The app is a single dependency-free Win32 EXE, and goes in the user's profile to avoid the need for admin privileges when it self-updates (somewhat like ClickOnce).

In InstallAware, on the Project Properties page, I have the Target Folder set to $MYAPPDATA$\$TITLE$ . At install time, I get a weird message dialog:

Code: Select all

Error
Could not access network location $MYAPPDATA$\xxxxxx
....where xxxx is my app title.

My understanding is that $MYAPPDATA$ resolves to C:\users\<username>\AppData\Roaming , which on the test machine, is local, not on the network.

Am I missing some clue?
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: error message when using $MYAPPDATA$

Post by giaviv »

Please try and either debug the installer and then watch the MYAPPDATA variable (ctrl + F5), or just display a messagebox that shows the value of that variable. Let me know what you come up with.
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

Re: error message when using $MYAPPDATA$

Post by rosstrusler »

Any tips on how I run with debugging?

I've turned on 'Debug' in the Project Options, and rebuilt the installer (single file), but the run arrow only gives me 'Run without Debugging' as an option. Alternatively, I don't know how to add a message box, although I assume it requires msiCode.

Selecting 'msiCode' indicates it isn't available. Debugging might not be available either in the CodeGear Edition.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: error message when using $MYAPPDATA$

Post by giaviv »

I see - I apologize. I didn't realize that is the version you have.

There is no such pre-defined variable as MYAPPDATA, so it has to be defined in your MSIcode. Can you see how IA defines it?

When I use the Get Folder Location command for System->Application Data Directory (which I am assuming is what InstallAware does), I get C:\ProgramData..
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

Re: error message when using $MYAPPDATA$

Post by rosstrusler »

I cannot see how IA defines $MYAPPDATA$, or anything else for that matter. As for GetFolderLocation, I don't think I can use because that would require msiCode, and I don't have msiCode. If I am mistaken, please let me know.

Based on several other posts in the forums, such as this one: http://www.installaware.com/forum/viewt ... f=2&t=5402 , it appears that $MYAPPDATA$ is defined by IA, at least in whatever versions of IA those other users have.

Forget $MYAPPDATA$. What I really need to know is what value I must set Target Folder to in the IA IDE to install my app to the user's roaming profile, which is typically at C:\Users\<user>\AppData\Roaming in Win7, and C:\Docs and Settings\user\Application Data in WinXP. Like all folders in Windows, the actual location is determined in the registry, and IA clearly has some means of discovering where these folders are, whether through a variable or some other method. There must be some way, or else it's hard to believe that my version of IA could be used to install an app.

FYI, C:\ProgramData is a machine location, a junction or alias for C:\Users\AllUsers. IA must be using something else to populate $MYAPPDATA$.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: error message when using $MYAPPDATA$

Post by giaviv »

Could you please send your project over to support at installaware.com so I could examine it?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

Re: error message when using $MYAPPDATA$

Post by rosstrusler »

giaviv wrote:Could you please send your project over to support at installaware.com so I could examine it?
I'm not sure how to send the project to installaware.com. The contact page here http://www.installaware.com/contact-us.htm doesn't support attachments.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: error message when using $MYAPPDATA$

Post by giaviv »

Just zip it up and attach to an email sent to support at installaware.com.

Thanks!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
rosstrusler
Posts: 35
Joined: Fri May 13, 2011 1:24 am

Re: error message when using $MYAPPDATA$

Post by rosstrusler »

That would be too easy, of course.

Thanks. Will do immediately.
Post Reply