ITGal Posted June 28, 2012 Posted June 28, 2012 Hey folks, I've created an install script for a program and it works well. I've decided to add a change a registry key as to where the default save location is for this program. I would like the file to be saved to 'My Documents' (the default location is in my documents but buried two folders deep) My registry change doesn't seem to work: RegWrite("HKEY_Local_Machine\SOFTWARE\My Software\etc\etc\User", "MyDocumentsLocation", "REG_EXPAND_SZ", "%USERPROFILE%\My Documents") Now this works to save the files in My Documents, but they are now in a folder with My Documents in a folder named as the user. How can I have them save to JUST My Documents? Thanks for your help!
JohnOne Posted June 28, 2012 Posted June 28, 2012 Try CSIDL_MYDOCUMENTS or CSIDL_COMMON_DOCUMENTS.I have no idea if that will work. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
JohnOne Posted June 28, 2012 Posted June 28, 2012 Do you really need expand var like that,? can you not just use @MyDocumentsDir macro in script and write it like that? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
ITGal Posted June 28, 2012 Author Posted June 28, 2012 I actually haven't been able to get that to work either....!!
ITGal Posted June 28, 2012 Author Posted June 28, 2012 Even with @mydocumentsdir it still seems to save under a username folder within my documents. Same as the above issue.
JohnOne Posted June 28, 2012 Posted June 28, 2012 what is an example of the path you want? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
BrewManNH Posted June 28, 2012 Posted June 28, 2012 What was the value in that location before you changed it? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
ITGal Posted June 28, 2012 Author Posted June 28, 2012 I'm looking for basically C:UsersUsernameDocuments the registry shows the same as above but ends up saving here: C:UsersUsernameDocumentsUsername
DicatoroftheUSA Posted June 28, 2012 Posted June 28, 2012 It doesn't look like an issue with your registry, did you write this software? It could be something internal to it that causes that behavior. Statism is violence, Taxation is theft. Autoit Wiki
ITGal Posted June 28, 2012 Author Posted June 28, 2012 That's very possible. No, I didn't write the software, I guess my next option is to contact the vendor. Just wanted to make sure it was not a user error on my part. Thank you!
BrewManNH Posted June 28, 2012 Posted June 28, 2012 I know what it should look like after you've changed it. What was in that registry key before you change it? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now