Does anybody know what launcher to look at if there is data in C:\Documents and Settings\[username]\Local Settings\Application Data?
Or what variable to use? I'm writing a launcher for an app that stores data there and in the registry.
Thanks
New: streamWriter (Jun 28, 2024), Platform 29.5.3 (Jun 27, 2024)
1,100+ portable packages, 1.1 billion downloads
Please donate today
Does anybody know what launcher to look at if there is data in C:\Documents and Settings\[username]\Local Settings\Application Data?
Or what variable to use? I'm writing a launcher for an app that stores data there and in the registry.
Thanks
ATanks would handle the app data. Something like VTi will handle the registry. I don't know of any off the top of my head that deal with both.
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
Unfortunately this isn't what I was looking for. This deals with files that are in the ./App/atanks folder. I need to move files that are located in C:/Documents and Settings/[username]/Local Settings/Application Data. I to use "$USERPROFILE/Local Settings/Application Data" but I get an error when I'm compiling the script and the files are not moved.
Use APPDATA to deal with files in %Application Data% and PROFILE for things in the profile folder.
Post a copy of the script and the error (in PRE tags :D) and I'll see I can see.
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
The problem is the APPDATA variable refers to C:/Documents and Settings/[username]/Appication Data, which is the wrong folder.
I've posted my code below. I'm sure there's a better way to do this, but I'm not really good at writing launchers. Make any changes you think are necessary, but please let me know what they are so I can learn from my mistakes.
This is the error I get:
Try replacing USERPROFILE with PROFILE
And then delete
Var USERPROFILE
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
This worked. I've been testing it and I'm pretty sure everything gets backed up and restored. Can you check through the code just to make sure it works right. I'm not exactly sure if everything will work properly all the time, or if there are better ways to do things.
I found an error with my launcher but I don't know how to fix it. Basically, on the very first run, if the MediaMonkeyPortable.ini is present in the root directory, the default settings are not copied to the settings folder. I've looked through the code, but I can't figure out what's wrong.
Below is the code for the ini
And this is the code for the launcher, if somebody could take a look at it I would greatly appreciate it.
CopyFiles /SILENT $EXEDIR\App\DefaultData\settings\*.* $EXEDIR\Data\settings
Goto SettingsFound
Try with
CopyFiles /SILENT $EXEDIR\App\DefaultData\settings\*.* $EXEDIR\Data\settings\*.*
Goto SettingsFound
Also, something is (logically) wrong here:
ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "SettingsDirectory"
StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\$0"
Stuff a MessageBox in so you can see what value $SETTINGSDIRECTORY gets.
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
So, how do I put a message box in? I've never done that before. I know it's probably a bad question, but I really appreciate you helping me with this.
You can look at some of the code for the errors when the program is found, etc.
Here's what you would use:
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
Also, something is (logically) wrong here:
ReadINIStr $0 "$INIPATH\${NAME}.ini" "${NAME}" "SettingsDirectory"
StrCpy "$SETTINGSDIRECTORY" "$EXEDIR\$0"
Nope, that's correct.
Logically, some of the code is failing![Blum](https://portableapps.com/sites/all/modules/smiley/packs/kolobok/blum3.gif)
EDIT
Or it just could be that I'm failing, it handles it correctly, I just tested.
Try that *.* addition .. . .
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
I ended up putting in the code for the message box and the settings directory is correct in both instances. I changed various other things and thought I changed it back, but apparently I didn't because the launcher works perfectly in both cases. I'm thinking about posting it but I'm not sure anybody would be interested in it, what do you think?