MrSheen Posted July 1, 2010 Share Posted July 1, 2010 Redirecting appdata, I dont know if redirecting is the right word to use, however a few games and programs stick a folder with a single file into appdata. Which I was wondering can you actually run say WinRar, Lemmings etc and have it redirect what the program is sending to appdata into the current folder? I know you can use DirMove and DirRemove to copy them back and fourth but would like to know if there is a way to have windows believe the current folder is actually the appdata folder while running the game/program. Link to comment Share on other sites More sharing options...
JScript Posted July 1, 2010 Share Posted July 1, 2010 (edited) Try this example:Local $sMyCurrentFolder = ; Type the folder you want. Local $sGameFullPath = ; Type the 'full path' of game/program you want ; Redirecting appdata... EnvSet("APPDATA", $sMyCurrentFolder); Thanks to ProgAndy... EnvUpdate() ; Refreshes the OS environment. ; load your game/program RunWait($sGameFullPath)This solves?EnvSet("APPDATA", $sMyCurrentFolder); Thanks to ProgAndy... Edited July 1, 2010 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
MrSheen Posted July 1, 2010 Author Share Posted July 1, 2010 Thank you for your help. Nope it does not work, tried it on a five games and two program and still ends up saving in to the appdata folder. Link to comment Share on other sites More sharing options...
ProgAndy Posted July 1, 2010 Share Posted July 1, 2010 (edited) Just try this: Local $sMyCurrentFolder = "D:\TEMP"; Type the folder you want. Local $sGameFullPath = "cmd /k echo APPDATA = %APPDATA%"; Type the 'full path' of game/program you want ; Redirecting appdata... only for this script and its child processes EnvSet("APPDATA", $sMyCurrentFolder) EnvUpdate() ; Refreshes the OS environment. ; load your game/program as a child Run($sGameFullPath) Edited July 1, 2010 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
MrSheen Posted July 1, 2010 Author Share Posted July 1, 2010 Tried the second one and it still uses the system appdata folder, tried a simple batch with "Set APPDATA = F:\storage" and that also never redirected anything. Link to comment Share on other sites More sharing options...
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