AutoHotkey Community

It is currently May 27th, 2012, 10:07 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: read reg
PostPosted: October 11th, 2004, 10:48 pm 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Trying to read the users id for outlook mail but not getting the number .
Code:
RegRead, OutputVar, HKEY_LOCAL_MACHINE, HKEY_USERS\HKEY_CURRENT_USER\Identities\Last User ID
MsgBox, email  are in: %OutputVar%

Someone give me a hand .
Thank you

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 1:28 am 
Offline

Joined: July 22nd, 2004, 6:33 am
Posts: 193
Location: cedar city UT
i'm not to sure what your trying to do
but have you tryed the reg loop


SetBatchLines -1 ; Makes searching occur at maximum speed.
RegSearchTarget = Notepad ; Tell the subroutine what to search for.
Gosub, RegSearch
return

RegSearch:
ContinueRegSearch = y
Loop, HKEY_LOCAL_MACHINE, , 1, 1
{
Gosub, CheckThisRegItem
if ContinueRegSearch = n ; It told us to stop.
return
}
Loop, HKEY_USERS, , 1, 1
{
Gosub, CheckThisRegItem
if ContinueRegSearch = n ; It told us to stop.
return
}
Loop, HKEY_CURRENT_CONFIG, , 1, 1
{
Gosub, CheckThisRegItem
if ContinueRegSearch = n ; It told us to stop.
return
}
; Note: I believe HKEY_CURRENT_USER does not need to be searched if HKEY_USERS
; is being searched. The same might also be true for HKEY_CLASSES_ROOT if
; HKEY_LOCAL_MACHINE is being searched.
return

CheckThisRegItem:
if A_LoopRegType = KEY ; Remove these two lines if you want to check key names too.
return
RegRead, RegValue
if ErrorLevel <> 0
return
IfInString, RegValue, %RegSearchTarget%
{
MsgBox, 4, , The following match was found:`n%A_LoopRegKey%\%A_LoopRegSubKey%\%A_LoopRegName%`nValue = %RegValue%`n`nContinue?
IfMsgBox, No
ContinueRegSearch = n
}
return

_________________
^sleepy^


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 1:38 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
I want to read the \Identities\Last User ID .and give me the
User ID 's

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 2:54 am 
Offline

Joined: August 26th, 2004, 3:11 pm
Posts: 80
Location: Chelsea - MA, USA
Code:
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
MsgBox, email  are in: %OutputVar%

_________________
Working now on:
NumpadMouse v2 (Draw)
top-recode project (private server script) (pkodev)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 3:07 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Thankyou , that was simple when it is shown to me . lol

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 3:23 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Do you see what is wrong here .
I can't get this to work .
Code:
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
;MsgBox, email  are in: %OutputVar%
FileCopyDir,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\,C:\Documents and Settings\bob\My Documents\my code projects\reg-backup

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 3:27 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
The help file states that neither the source nor the destination should have a trailing backslash. But there might be other things preventing it from working.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 3:28 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Ya I had it with and without and same thing , no copy .

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 5:04 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Chris wrote:
The help file states that neither the source nor the destination should have a trailing backslash. But there might be other things preventing it from working.

Hit & run?

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 6:38 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Just use process of elimination. Chances are one of the components in the path is wrong, the file doesn't exist, the directory is protected and cannot be written to, etc.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 6:56 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
File copy works , FileCopyDir does not ?
So I can copy one at a time I guess .

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 7:05 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
Can I copy the reg of this with AutoHK ?
Code:
HKEY_CURRENT_USER\Identities\{83EA8F37-FA6B-476A-BC29-E853133CD2E4}\Software\Microsoft\Outlook Express\5.0\

I want to save the users reg in the {83EA8F37-FA6B-476A-BC29-E853133CD2E4}\Software\Microsoft\Outlook Express\5.0\ . so it can be backed up .

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 7:19 am 
Offline

Joined: August 19th, 2004, 10:53 pm
Posts: 326
I think I will forget about copying the registry but could someone help me with this loop so I can show a bar as it is copying the files .
I stopped as I didn't want to mess up what I have so far as it works . lol
EDIT
Is there a better way to copy all the files then what I have with each link ?
Code:
; Here is a working example that demonstrates how a Progress window can be
; overlayed on a SplashImage to make a professional looking Installer screen:
IfExist, C:\WINDOWS\system32\ntimage.gif, SplashImage, C:\WINDOWS\system32\ntimage.gif, A,,, Copying
Loop,
RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Deleted Items.dbx,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Drafts.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Folders.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Inbox.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Offline.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Outbox.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Pop3uidl.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\saves.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\Sent Items.dbx ,%a_workingdir%
FileCopy,%USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express\folders.avx ,%a_workingdir%

Loop, %windir%\system32\*.*
{
   Progress, %a_index%, %a_loopfilename%, Installing..., Draft Installtion
   Sleep, 50
   IfEqual, a_index, 100, break
}

Thank you for the help .

_________________
Autohotkey Just drives me crazy ..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 7:54 am 
Hi!
Bobheart, I can't see relation between the two loops.
And I can't see the "{ }" of the first loop.This code is a bit confusing...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 12th, 2004, 7:55 am 
Quote:
I have shrinked the code for better visuality :wink: , but haven't tested it yet. :roll:

Code:
/*
Here is a working example that demonstrates how a Progress window can be
overlayed on a SplashImage to make a professional looking Installer screen:
*/
 
IfExist, C:\WINDOWS\system32\ntimage.gif, SplashImage, C:\WINDOWS\system32\ntimage.gif, A,,, Copying

Loop,
  {
  RegRead, OutputVar, HKEY_CURRENT_USER, Identities, Last User ID
   
  SourcePath = %USERPROFILE%\Local Settings\Application Data\Identities\%OutputVar%\Microsoft\Outlook Express
  DestPath = C:\Documents and Settings\Candles\My Documents
   
  FileCopy,%SourcePath%\Deleted Items.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\Drafts.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\Folders.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\Inbox.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\Offline.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\Outbox.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\Pop3uidl.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\saves.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\Sent Items.dbx, %DestPath%\my code projects\reg-backup
  FileCopy,%SourcePath%\folders.avx, %DestPath%\my code projects\reg-backup

   Loop, %windir%\system32\*.*
      {
      Progress, %a_index%, %a_loopfilename%, Installing..., Draft Installtion
      Sleep, 50
      IfEqual, a_index, 100, break
      }
}


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google [Bot], Maestr0 and 62 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group