Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Regsvr doubt


  • Please log in to reply
5 replies to this topic
erln
  • Members
  • 8 posts
  • Last active: Dec 22 2015 10:42 AM
  • Joined: 24 Jun 2013
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
RUN,Regsvr32 /s %1%
RUN,Properties %2% 
SetTitleMatchMode RegEx
WinWait, "*Properties",,
WinWaitClose
RUN,Regsvr32 /u /s %1%
ExitApp

The above code I have written. 

I have a dll and it is registrable. After registration we can see some extra tab is file properties dialog.

 

for this purpose. I have written the script like this

1. Pass the file to ahk file

2. register the dll 

3. open properties

4. unregister the dll

 

How to achieve this. because above code is not working.(means it is registering , able to see the properties . but not unregistering...

 

 

could you help me in this regard.

 



Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

It is clearly running the command with the correct arguments, so I suspect the problem lies within your dll. 



A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

Just a guess, try RunWait instead of Run.

Runwait regsvr32.exe /s "%1%"
Runwait regsvr32.exe /u /s "%1%"

Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


erln
  • Members
  • 8 posts
  • Last active: Dec 22 2015 10:42 AM
  • Joined: 24 Jun 2013
Registration of dll is working fine. I am able to see the properties window.
After closing the properties window it is not unregistering. 
May be Winwait is taking long time.
 
Please help me regarding that.


A v i
  • Members
  • 1323 posts
  • Last active: Nov 14 2015 06:56 PM
  • Joined: 30 Jan 2013

No idea.
 

May be Winwait is taking long time.

Is the script exiting. Try putting Msgbox in the code to see how everything really happens.

;.............
RUN,Properties %2% 
Msgbox, Properties Ran
SetTitleMatchMode RegEx
WinWait, "*Properties",,
Msgbox, Properties has been caught OPEN
WinWaitClose
Msgbox, Properties has been closed
RUN,Regsvr32 /u /s %1%
ExitApp

Now a CS Undergrad. | My WebsiteAutohotkey Scripts | Softwares

Telegram me : @aviaryan


erln
  • Members
  • 8 posts
  • Last active: Dec 22 2015 10:42 AM
  • Joined: 24 Jun 2013

 

No idea.
 

Is the script exiting. Try putting Msgbox in the code to see how everything really happens.

;.............
RUN,Properties %2% 
Msgbox, Properties Ran
SetTitleMatchMode RegEx
WinWait, "*Properties",,
Msgbox, Properties has been caught OPEN
WinWaitClose
Msgbox, Properties has been closed
RUN,Regsvr32 /u /s %1%
ExitApp

I tried but it is not working. after winwait ,"properties"  it is not executing. I tried to remove winwaitclose also. no use.