What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Change received folder location?

Change received folder location?
Author: Message:
Kriogenic
Junior Member
**

I own all.

Posts: 15
34 / Male / Flag
Joined: Aug 2007
O.P. Change received folder location?
Hey there everyone

I am making a script and I want it to change the received file dir

I was just wondering if there is away to change the current "Received Files" location I looked in the documentation and saw
code:
Messenger::ReceiveFileDir
The Messenger::ReceiveFileDir property returns the path of the directory where files copied by Messenger when a file transfer request is accepted are stored.

Syntax
This is a read-only property.
[string] ReceiveFileDir;
Data Type
A string containing the full path to the directory. The path does not end with a backslash.

This property typically fails for the following reason:

The current Messenger user is not signed in.
Remarks
None.


This had lead me to believe there is no way to change the received file directory but only read its path...

So my question is...

Is there away to change the received file directory?
03-13-2008 01:50 AM
Profile E-Mail PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Change received folder location?
The folder is stored in the registry as a binary unicode string. So you could change it using the windows registry APIs.

HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger\FtReceiveFolder
Note that it isn't stored per user, but as a global setting for all users of Messenger.

However, changing it in the registry is not without errors either, unless you first make sure the directory actually exists. Otherwise, Messenger will produce an error when you actually recieve a file from a contact, showing that it can't properly save the file.

This post was edited on 03-13-2008 at 02:48 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-13-2008 01:58 AM
Profile PM Find Quote Report
Kriogenic
Junior Member
**

I own all.

Posts: 15
34 / Male / Flag
Joined: Aug 2007
O.P. RE: Change received folder location?
Ohh thanks theres away to edit registry using scripts?
03-13-2008 02:13 AM
Profile E-Mail PM Web Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
33 / Male / Flag
Joined: Dec 2004
RE: Change received folder location?
I can only find how to write and read values (from the documentation), not edit. :undecided:

quote:
The following example writes a value called "EnableOpt" in the registry and read it back.

//Write the value
var Shell = new ActiveXObject("WScript.Shell");
var ValRegPath = MsgPlus.ScriptRegPath + "EnableOpt";
Shell.RegWrite(ValRegPath, 1);

//Read the value
var EnableOpt = Shell.RegRead(ValRegPath);
Debug.Trace("EnableOpt current value: " + EnableOpt);
Twitter: @ChrisLozeau
03-13-2008 02:23 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Change received folder location?
quote:
Originally posted by Kriogenic
Ohh thanks theres away to edit registry using scripts?
yes using the Windows Registry APIs, or other methods like WMI (Windows Management Instrumentation) or the build-in Windows Script Host functions.

See various scripts for various methods (although using the Windows APIs is still the most versatile and most powerfull one)...


---------

quote:
Originally posted by Chris4
The following example writes a value called "EnableOpt" in the registry and read it back.
That really isn't the best example for this purpose, since using the build-in registry functions of the Windows Script Host are extremely limited in any thinkable way. Although it shows you "can edit" the registry somewhat, true.

But you can't use this method for something like the OP requested, since they don't support the REG_BINARY type (properly).

---------

Kriogenic, for changing that registry key you need at least:
- use the Windows Registry APIs:
      RegCreateKeyExW, RegSetValueExW, RegCloseKey (to set a binary registry key)
      RegOpenKeyExW, RegQueryValueExW, RegCloseKey (to read a binary registry key)
- use other Windows APIs (or the build-in JScript methods, although again they are very limited) to check if the new directory does exists
- use other Windows APIs (or the build-in JScript methods, although again they are very limited) to make the new directory
- use Plus! script Interop functions to call the Windows APIs
- use Plus! script Interop functions to make and allocate buffers

In other words, to pull it off in a proper way, you do need some knowledge beyond basic (Plus!) scripting.

;)

This post was edited on 03-13-2008 at 03:20 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
03-13-2008 02:26 AM
Profile PM Find Quote Report
Kriogenic
Junior Member
**

I own all.

Posts: 15
34 / Male / Flag
Joined: Aug 2007
O.P. RE: Change received folder location?
alright thanks, i know its not going to work properly but it should work well enough for what i need it for :)
03-13-2008 02:32 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On