Registered member login:
Register Now
Altirigos » Altiris Administrators » Wise Packaging » Using Variables in an INI File

» Current Poll
Do you leave the Aclient enabled?
YES - 83.05%
196 Votes
NO - 16.95%
40 Votes
Total Votes: 236
You may not vote on this poll.
» Stats
Members: 9,948
Threads: 12,158
Posts: 56,984
Top Poster: Nick (4,991)
Welcome our newest member, rmerrill
» Online Users: 30
0 members and 30 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» July 2010
S M T W T F S
27282930 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Reply
Old 05-05-2008, 03:21 PM   #1 (permalink)
 
Status: Junior Altiris Admin
Join Date: 11-28-2007
Location: San Francisco
Posts: 4


Using Variables in an INI File

Hello, all. I am attempting to push an ancient piece of software called eCopy. Instead of using the registry, it still stores configuration info in an INI file.

The information that must be customized is a file path: \\<server>\<share>\<username>

How do I get the variable represented by <username> to write to the INI file? I have tried putting in the path and using %UserName%, but that doesn't work.


Using Wise's Windows Installer Editor, how can I create a transform that updates this file with the user's ID on installation?

Thanks,
Patrick Burnett
penngos is offline   Reply With Quote
Old 05-05-2008, 08:42 PM   #2 (permalink)
 
jdean's Avatar
 
Status: Super Altiris Admin
Join Date: 02-24-2005
Location: Orange County, California, USA
Posts: 585


I would think that you would need to create a custom action that runs a vbscript to make the modification changes needed.

How adept are you with wise? Custom actions can get a bit tricky if you've never done them before.

appdeploy.com has some really good info about custom actions if you need to do some research.
Quote:
Originally Posted by penngos View Post
Hello, all. I am attempting to push an ancient piece of software called eCopy. Instead of using the registry, it still stores configuration info in an INI file.

The information that must be customized is a file path: \\<server>\<share>\<username>

How do I get the variable represented by <username> to write to the INI file? I have tried putting in the path and using %UserName%, but that doesn't work.


Using Wise's Windows Installer Editor, how can I create a transform that updates this file with the user's ID on installation?

Thanks,
Patrick Burnett
__________________
IT Factotum * Altiris Addict * Wise Monger * VBScript Zealot

Jereme Dean
Orange County, CA
jdean33442@gmail.com
jdean is offline   Reply With Quote
Old 05-06-2008, 08:26 AM   #3 (permalink)
 
tammy104's Avatar
 
Status: Junior Altiris Admin
Join Date: 08-14-2006
Location: NJ
Age: 37
Posts: 21


another possibility

I like to keep things simple (may not always be the best way) but this is how I would do it:

Get Registry Key Value
Variable=UID
Key=SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value Name=DefaultUserName

EDIT INI FILE
[FILE]
filepath=\\server\share\%uid%
That should do it...
tammy104 is offline   Reply With Quote
Old 05-14-2008, 03:37 PM   #4 (permalink)
 
Status: Junior Altiris Admin
Join Date: 11-28-2007
Location: San Francisco
Posts: 4


I'm embarrassed to admit that I need more instruction. I'm not sure how to grab that variable from the registry within the confines of Wise Packaging?

Quote:
Originally Posted by tammy104 View Post
I like to keep things simple (may not always be the best way) but this is how I would do it:

Get Registry Key Value
Variable=UID
Key=SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Value Name=DefaultUserName


EDIT INI FILE
[FILE]
filepath=\\server\share\%uid%
That should do it...
penngos is offline   Reply With Quote
Old 05-14-2008, 04:06 PM   #5 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,396


If you do a Wise SetupCapture it should be smart enough to change that value to the Windows property [LogonUser] .

Quote:
Originally Posted by http://helpnet.acresso.com/robo/projects/helplibdevstudio9/IHelpPropReference.htm
LogonUserThis property stores the name of the user performing the installation. It is set by a call to the Windows API GetUserName.
Then each time a new users clicks on an advertised entry point (the shortcut) it should self-heal for them and populate that ini file within their profile and use their name since they are the user performing the install(self-heal).

The end location of that file/component is in %USERPROFILE% right?
__________________
Brandon

Last edited by Brandon; 05-14-2008 at 04:12 PM..
Brandon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 06:02 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos