/build/static/layout/Breadcrumb_cap_w.png

CA or setting my property?

Hey guys,

I'm having problems with a package. Now, this is a minor problem, but a problem nonetheless. I have packaged an application via setup capture under Windows XP environment, and now I have it working A1. Just for the heck of it, I tried it under Windows 2000. Probably because I did a capture, but my MSI is creating a folder under C:\Windows\All Users\Documents. Now, I would of tought that this was a Wise "generic" variable for this sort of thing, but going even deeper into it, I'm now pretty sure it's just my software's custom created "My Documents" folder.

I would ideally like to move this folder into my InstallDir folder, that way avoiding to create a C:\Windows under Windows 2000. Now, the properties that I believe are in fault here would be these:

All_Users=C:\Windows\All Users\
Documents=C:\Windows\Documents
IRESS2=C:\Windows\All Users\Documents\IRESS

What I tried to do is replace C:\Windows by %PROGRAMFILES%\BlaBla, but when I run my MSI, here's the error I get:

Error 1606. Could not access network location %PROGRAMFILES%.

You guys will probably tell me it's normal? My guess would be that Wise can't handle system variables as a property? Is that it? If it's the case, is there a way to use Windows Environment Variables as a property other than setting them via Custom Action? I suppose I *could* hardcode that path as well to C:\Program Files, but I just prefer using variables for some reason.

Anyway, I'll wait for your usual usefull insight! :-)

Thanks!

Stephane

0 Comments   [ + ] Show comments

Answers (8)

Posted by: anonymous_9363 16 years ago
Red Belt
0
Stephane, see this post http://itninja.com/question/how-do-you-roll-out-new-machines?5630&mpage=1&key=ALLUSERSPROFILE摢
Posted by: Fau 16 years ago
Senior Purple Belt
0
ORIGINAL: VBScab

Stephane, see this post http://itninja.com/question/how-do-you-roll-out-new-machines?5630&mpage=1&key=ALLUSERSPROFILE摢


Heya Ian!

Thanks again for your reply.

Ok, so I'm guessing your talking about this part?



[CODE]
If VersionNT Then
Set Property USERPROFILE to [%USERPROFILE]
End
If VersionNT = 400 Then
Set Property ALLUSERSPROFILE to [%SystemRoot]\Profiles\All Users
End
If VersionNT >=500 Then
Set Property ALLUSERSPROFILE to [%ALLUSERSPROFILE]
End

Once you've done that, using 'Installation Expert' put your folder beneath C:\Windows\Profiles. When the MSI runs, the folder will be put beneath 'All Users' or '[username]' depending on whether you install per-machine or per-user.



Maybe a few questions I have:

1) Do I just need to copy these few lines below InstallInitialize, under Execute Immediate I'm guessing?
2) I'm not sure what you mean by putting the folder beneath Windows\Profiles?

Thanks again!
Posted by: anonymous_9363 16 years ago
Red Belt
0
Well, WPS being WPS, you can't just paste in that text and expect it to translate it. What I did many moons ago was to copy those entries from an InstallShield-authored MSI and pasted them into our 'Windows Application' template. Igf you can't locate a suitable "donor", just type the text into the relevant 'Action' boxes. Thus, to get the line 'If VersionNT', click 'If Statement' in the 'MSI Script' view, type 'VersionNT', then press Enter.

And yes, anywhere after InstallInitialize in the EI sequence is fine.

Lastly, the folders question...that only applies if you're using WPS's UI. Any user files need to be placed beneath 'Windows/Profiles' in the 'Installation Expert/Files' view.
Posted by: Fau 16 years ago
Senior Purple Belt
0
Hmmm,

I think I just realised where my problem is. I inserted the custom actions, as specified. But still, we was creating the folder under C:\Windows\ even under Windows 2000.

Wise doesn't seem to have a generic "My Documents" folder under Installation Expert, Profiles...? My package is creating a folder named Documents under All Users. Since by default, All Users don't have a My Documents, that's why he's creating the folder there.

That's my guess.... I still don't understand why it isn't created under Winnt nonetheless... ????
Posted by: anonymous_9363 16 years ago
Red Belt
0
ORIGINAL: Fau
Wise doesn't seem to have a generic "My Documents" folder under Installation Expert, Profiles...?
Yes it does! :)
It's called PersonalFolder which you'll find in the Directory table.
Posted by: Fau 16 years ago
Senior Purple Belt
0
Thanks!

I solved my problem by just putting the files elsewhere. But I'm curious. Since I don't use tables all that often, how could I put a given file, say in Personal Folder?

I usually use Installation Expert, but this could be good to know. Thanks for your answers again!
Posted by: anonymous_9363 16 years ago
Red Belt
0
You'd need a combination of the File, Component and Directory tables, possibly with MSIFileHash thrown in if your file does not contain version information. Best to stick to the UI: much easier!
Posted by: AngelD 16 years ago
Red Belt
0
In the Component table you set the Directory_ column value to PersonalFolder.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ