Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » %userprofile% to access someones' My Documents
%userprofile% to access someones' My Documents [message #358119] Tue, 11 November 2008 13:42 Go to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

In windows there are certain variables one can use to access files
on a target pc, some examples are %userprofile% or %appdata%

Is there such a variable for the My Documents folder?


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: %userprofile% to access someones' My Documents [message #358121 is a reply to message #358119] Tue, 11 November 2008 13:49 Go to previous messageGo to next message
samous is currently offline  samous
Messages: 616
Registered: August 2008
Karma: 0
Colonel
mod forum? i don't think so, but, you can do something like€:

%UserNAME%\aPLICATIONS\mydocument

(not speller correct, or even the correct commands, just a sugestion.)


Samous Ind. modding group website:
http://samous.webs.com/img/Capture.PNG

and Facebook Page: here
Re: %userprofile% to access someones' My Documents [message #358123 is a reply to message #358119] Tue, 11 November 2008 13:50 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

The problem is that in languages other than english the My Documents folder is named different.


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: %userprofile% to access someones' My Documents [message #358126 is a reply to message #358119] Tue, 11 November 2008 13:54 Go to previous messageGo to next message
samous is currently offline  samous
Messages: 616
Registered: August 2008
Karma: 0
Colonel
it is? with MSdos, i can use My Documents as a command. (actually, its more like CD C:Aplications and Data/ect.

Samous Ind. modding group website:
http://samous.webs.com/img/Capture.PNG

and Facebook Page: here
Re: %userprofile% to access someones' My Documents [message #358129 is a reply to message #358119] Tue, 11 November 2008 14:01 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

In dutch the My Documents folder would be called "Mijn Documenten"

I can't use "%userprofile%\My Documents" to install files then, they would end up in the wrong folder.

This is why i need to know wether there is a variable for the My Documents folder.
Something like %mydocs% which doesnt work unfortunately Sad


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: %userprofile% to access someones' My Documents [message #358144 is a reply to message #358119] Tue, 11 November 2008 14:31 Go to previous messageGo to next message
samous is currently offline  samous
Messages: 616
Registered: August 2008
Karma: 0
Colonel
oh. you could make different versions.

Samous Ind. modding group website:
http://samous.webs.com/img/Capture.PNG

and Facebook Page: here
Re: %userprofile% to access someones' My Documents [message #358145 is a reply to message #358119] Tue, 11 November 2008 14:37 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Sorry to tell you zunnie but there isn't one Sarcasm
afaik there really isn't one!

You can make a new variable yourself with the Environment Variables in the System setting (like %mydocs%). I'll add pictures if you want.


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Tue, 11 November 2008 14:41]

Report message to a moderator

Re: %userprofile% to access someones' My Documents [message #358162 is a reply to message #358119] Tue, 11 November 2008 15:30 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

Yea i know how to do that. But that wont fix it on other people their pc's
I need it for a UT3 mappack installer. But it probably doesn't exist :/


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: %userprofile% to access someones' My Documents [message #358163 is a reply to message #358119] Tue, 11 November 2008 15:35 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

The only way I know to get the path is by using something like this: http://msdn.microsoft.com/en-us/library/bb762494.aspx
You'll need to program something to use it though. It might also be possible to read the value from the registry somewhere perhaps.


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: %userprofile% to access someones' My Documents [message #358167 is a reply to message #358119] Tue, 11 November 2008 15:54 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
http://msdn.microsoft.com/en-us/library/bb762204(VS.85).aspx

Use the SHGetSpecialFolderPath API call and pass it CSIDL_MYDOCUMENTS to get the My Documents folder. Also see this page for other CSIDL definitions.


EDIT: Meh, beaten to it, guess thats what happens when you open a topic and reply 20 minutes later without checking for new replies first Razz


http://steamsignature.com/card/1/76561197975867233.png

[Updated on: Tue, 11 November 2008 15:59]

Report message to a moderator

Re: %userprofile% to access someones' My Documents [message #358200 is a reply to message #358119] Tue, 11 November 2008 18:23 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

Thanks for the help guys but this is for a simple winrar installer
i'm not gonna make installshield installers although i am seriously concidering it...


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: %userprofile% to access someones' My Documents [message #358241 is a reply to message #358119] Wed, 12 November 2008 01:58 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
Well in that case don't forget that for Vista it changes again to 'C:\Users\<username>\Documents', without the My part on the front. Also also don't forget that it is actually possible to MOVE the (My) Documents folder anywhere you want on the drive, for example mine is at G:\Documents, so your installer would experience epic fail unless it actually made the API call to get the correct location of the Documents folder.

Why are you installing things to the users Documents folder anyway?


http://steamsignature.com/card/1/76561197975867233.png
Re: %userprofile% to access someones' My Documents [message #358252 is a reply to message #358119] Wed, 12 November 2008 05:06 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

It is not for renegade but for unreal tournament 3 which saves custom maps at X:\Documents and Settings\zunnie\My Documents\My Games\Unreal Tournament 3\UTGame\Published\CookedPC\Maps

Yes i know: a gay path for a map installation lol
Why don't they make games with a simple directory structure like Renegade\data :/

I have been working on the UT3 section of G-M the last couple of weeks: http://ut3.game-maps.net/

The mappacks are all installers. The maps are .zip (for now)


I'm gonna buy this game soon, mainly because of Renegade-X

Some screenshots i took:
http://www.game-maps.net/staff/zunnie/ut3/ss/Image1.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image2.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image3.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image4.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image5.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image6.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image7.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image8.png this is my favorite
http://www.game-maps.net/staff/zunnie/ut3/ss/Image9.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image10.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image11.png
http://www.game-maps.net/staff/zunnie/ut3/ss/Image12.png

More screens: http://www.multiplayerforums.com/index.php?showtopic=6088
Nice ones from new maps.

I'm using a cracked UT3 atm, but i'm gonna buy it later this week or next week or so.

We're also running a Top 5 War New Maps server which has the top 5 winners of the 'make something unreal contest' in rotation: http://ut3.game-maps.net/index.php?action=file&id=1390


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png

[Updated on: Wed, 12 November 2008 05:15]

Report message to a moderator

Re: %userprofile% to access someones' My Documents [message #358400 is a reply to message #358252] Thu, 13 November 2008 07:19 Go to previous message
djlaptop is currently offline  djlaptop
Messages: 160
Registered: February 2003
Location: Hollywood, CA, USA
Karma: 0
Recruit
You can also get the path of "My Documents" for the current user by reading the registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal

You may have to resolve the %USERPROFILE% variable within the string returned from the registry.




http://i38.tinypic.com/2hcltp1.gif
Previous Topic: does anyone still play this game online?
Next Topic: RA3 Video
Goto Forum:
  


Current Time: Fri May 10 22:26:44 MST 2024

Total time taken to generate the page: 0.00863 seconds