JohnWang Posted February 18, 2006 Share Posted February 18, 2006 HiI try to make a program that export and imports Registry, however i encounter some problem and needs help. The Problem is that the registry only allows me to exports to a path containing only the drive and the name Example "C:\Backup.reg" anything else the program does nothing Example of not working path "C:\Program Files\Test.reg". Im not familiar with Dos command runs, and cant find a way to solve the problem .. i checked the path the name of the save file(file name cant not contain space) but still cant figure out why it only takes C:\ as its path. One thing that makes me know that it "may" be possible is that if u run regedit.exe manually it allows u to export to any path u desire. Hope someone can help me out on finding the problem. Thanks in advanceHere is my codesFunc onRegExport() Local $e_Path Local $FontSize = 13 MsgBox(0,"Warning","Currently it only talkes the Drive Letter as path Ex. C:\Test.reg") $e_Path = FileSaveDialog("Please Choose Export Path",@HomeDrive,"All (*.*)|Reg files (*.reg)",18,"RegistryBackup-" & @Mon & "-" & @MDAY & "-" & @Year) Sleep(500) if @DesktopWidth <= 1024 Then $FontSize = 10 SplashTextOn("Exporting Registry","TweakUI is now exporting your Registry to " & $e_Path & ".reg Please Wait...",@DesktopWidth/4,@DesktopHeight/10,-1,-1,16,"Aerial",$FontSize,500) Sleep(100) runwait(@comspec & " /c " & "REGEDIT /E " & $e_Path & ".reg", "" ,@SW_Hide) SplashOff()EndFunc Link to comment Share on other sites More sharing options...
evilertoaster Posted February 19, 2006 Share Posted February 19, 2006 (edited) Don't know for sure but it may be a quote problem... if you have spaces in the file name it needs to be in quotes and i'm not sure if FileSaveDialog does that or not... try- runwait(@comspec & " /c " & "REGEDIT /E " & '"' & $e_Path & '.reg"', "" ,@SW_Hide) just a shot in the dark... Edited February 19, 2006 by evilertoaster Link to comment Share on other sites More sharing options...
JohnWang Posted February 19, 2006 Author Share Posted February 19, 2006 just a shot in the dark...apparently that shot in the dark is the solution to the problem, thanks alot it work just fine now =D. Im so retarded that i didnt even notice that quotes are messed up . Thanks Evil ~ 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