Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default verify open windows

Hello folks,

I've developed a program that starts with "Application.Visible = False" then proceeds to execute the regedit application via the shell method <Shell "C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", vbNormalFocus. It then reboots the PC. Problem is the reboot overrides a necessary prompt/response from the regedit application. That is, I need to respond to two prompts from the regedit application before rebooting the PC. Is there a way I can force the reboot to wait for these prompts and responses?

Thanks.

Kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default verify open windows

Problem solved

A search of "wait external application" returned the following from Ivan F Moala

This may be of use (Also includes a few other links
http://www.xcelfiles.com/VBA_01.html#anchor_1

Thanks Ivan.

----- Kevin wrote: ----

Hello folks

I've developed a program that starts with "Application.Visible = False" then proceeds to execute the regedit application via the shell method <Shell "C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", vbNormalFocus. It then reboots the PC. Problem is the reboot overrides a necessary prompt/response from the regedit application. That is, I need to respond to two prompts from the regedit application before rebooting the PC. Is there a way I can force the reboot to wait for these prompts and responses

Thanks

Kevin
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default verify open windows

You can run regedit in silent mode--to suppress all the messages.

I found this in a google search:
http://www.ntcompatible.com/thread26615-1.html

REGEDIT [/L:system] [/R:user] [/v|-v] [/s|-s] filename1
REGEDIT [/L:system] [/R:user] /C filename2
REGEDIT [/L:system] [/R:user] /E filename3 [regpath]

/L:system
Specifies the location of the System.dat file.

/R:user
Specifies the location of the User.dat file.

[/v|-v]
This switch opens REGEDIT.EXE in advanced mode, where the registration
database is
displayed in a tree structure (similar to the tree window in Windows 3.1 File
Manager).
Any part of the database can be edited.

[/s|-s]
When a filename is specified on the command line, this switch is used to
suppress any
informational dialog boxes that would normally be displayed. This is useful
when the Setup
program for an application wants to execute REGEDIT.EXE with a .REG file, but
does not
want the user to be confused by any dialog boxes that are displayed.

filename1
Specifies the file(s) to import into the registry

/C filename2
Specifies the file to create the registry from.

/E filename3
Specifies the file to export the registry to.

regpath
Specifies the starting registry key to exportfrom. (Defaults to exporting the
entire
registry).

Syntax for Switches Either "/" or "-" can be used to signify the optional
switches. The
switches can be combined (for example, -vs) and be typed in either uppercase
or
lowercase. Unrecognized switches are ignored.

Kevin wrote:

Hello folks,

I've developed a program that starts with "Application.Visible = False" then proceeds to execute the regedit application via the shell method <Shell "C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", vbNormalFocus. It then reboots the PC. Problem is the reboot overrides a necessary prompt/response from the regedit application. That is, I need to respond to two prompts from the regedit application before rebooting the PC. Is there a way I can force the reboot to wait for these prompts and responses?

Thanks.

Kevin


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default verify open windows

Thanks Dave

I substitute
Shell("REGEDIT /L:C:\WINDOWS\ /R:C:\WINDOWS\ C:\RESTRICT.REG /S", 1
fo
Shell("C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", 1
But it failed to work

Any ideas

Kevi

----- Dave Peterson wrote: ----

You can run regedit in silent mode--to suppress all the messages

I found this in a google search
http://www.ntcompatible.com/thread26615-1.htm

REGEDIT [/L:system] [/R:user] [/v|-v] [/s|-s] filename1
REGEDIT [/L:system] [/R:user] /C filename2
REGEDIT [/L:system] [/R:user] /E filename3 [regpath]

/L:system
Specifies the location of the System.dat file.

/R:user
Specifies the location of the User.dat file.

[/v|-v]
This switch opens REGEDIT.EXE in advanced mode, where the registratio
database i
displayed in a tree structure (similar to the tree window in Windows 3.1 Fil
Manager)
Any part of the database can be edited.

[/s|-s]
When a filename is specified on the command line, this switch is used t
suppress an
informational dialog boxes that would normally be displayed. This is usefu
when the Setu
program for an application wants to execute REGEDIT.EXE with a .REG file, bu
does no
want the user to be confused by any dialog boxes that are displayed.

filename1
Specifies the file(s) to import into the registry

/C filename2
Specifies the file to create the registry from.

/E filename3
Specifies the file to export the registry to.

regpath
Specifies the starting registry key to exportfrom. (Defaults to exporting th
entir
registry).

Syntax for Switches Either "/" or "-" can be used to signify the optiona
switches. Th
switches can be combined (for example, -vs) and be typed in either uppercas
o
lowercase. Unrecognized switches are ignored

Kevin wrote
Hello folks
I've developed a program that starts with "Application.Visible = False" then proceeds to execute the regedit application via the shell method <Shell "C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", vbNormalFocus. It then reboots the PC. Problem is the reboot overrides a necessary prompt/response from the regedit application. That is, I need to respond to two prompts from the regedit application before rebooting the PC. Is there a way I can force the reboot to wait for these prompts and responses
Thanks
Kevi


--

Dave Peterso


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default verify open windows

if
Shell("C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", 1)

works, then

Shell("C:\WINDOWS\REGEDIT.EXE /s C:\RESTRICT.REG", 1)

should suppress the dialog.

--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
Thanks Dave.

I substituted
Shell("REGEDIT /L:C:\WINDOWS\ /R:C:\WINDOWS\ C:\RESTRICT.REG /S", 1)
for
Shell("C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", 1)
But it failed to work.

Any ideas?

Kevin

----- Dave Peterson wrote: -----

You can run regedit in silent mode--to suppress all the messages.

I found this in a google search:
http://www.ntcompatible.com/thread26615-1.html

REGEDIT [/L:system] [/R:user] [/v|-v] [/s|-s] filename1
REGEDIT [/L:system] [/R:user] /C filename2
REGEDIT [/L:system] [/R:user] /E filename3 [regpath]

/L:system
Specifies the location of the System.dat file.

/R:user
Specifies the location of the User.dat file.

[/v|-v]
This switch opens REGEDIT.EXE in advanced mode, where the

registration
database is
displayed in a tree structure (similar to the tree window in

Windows 3.1 File
Manager).
Any part of the database can be edited.

[/s|-s]
When a filename is specified on the command line, this switch is

used to
suppress any
informational dialog boxes that would normally be displayed. This

is useful
when the Setup
program for an application wants to execute REGEDIT.EXE with a .REG

file, but
does not
want the user to be confused by any dialog boxes that are

displayed.

filename1
Specifies the file(s) to import into the registry

/C filename2
Specifies the file to create the registry from.

/E filename3
Specifies the file to export the registry to.

regpath
Specifies the starting registry key to exportfrom. (Defaults to

exporting the
entire
registry).

Syntax for Switches Either "/" or "-" can be used to signify the

optional
switches. The
switches can be combined (for example, -vs) and be typed in either

uppercase
or
lowercase. Unrecognized switches are ignored.

Kevin wrote:
Hello folks,
I've developed a program that starts with "Application.Visible =

False" then proceeds to execute the regedit application via the shell method
<Shell "C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", vbNormalFocus. It then
reboots the PC. Problem is the reboot overrides a necessary prompt/response
from the regedit application. That is, I need to respond to two prompts
from the regedit application before rebooting the PC. Is there a way I can
force the reboot to wait for these prompts and responses?
Thanks.
Kevin


--

Dave Peterson






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default verify open windows

It worked like a charm

Thanks again Tom

----- Tom Ogilvy wrote: ----

i
Shell("C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", 1

works, the

Shell("C:\WINDOWS\REGEDIT.EXE /s C:\RESTRICT.REG", 1

should suppress the dialog

--
Regards
Tom Ogilv

"Kevin" wrote in messag
..
Thanks Dave
I substitute

Shell("REGEDIT /L:C:\WINDOWS\ /R:C:\WINDOWS\ C:\RESTRICT.REG /S", 1
fo
Shell("C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", 1
But it failed to work
Any ideas
Kevi
----- Dave Peterson wrote: ----
You can run regedit in silent mode--to suppress all the messages
I found this in a google search

http://www.ntcompatible.com/thread26615-1.htm
REGEDIT [/L:system] [/R:user] [/v|-v] [/s|-s] filename

REGEDIT [/L:system] [/R:user] /C filename
REGEDIT [/L:system] [/R:user] /E filename3 [regpath
/L:syste

Specifies the location of the System.dat file
/R:use

Specifies the location of the User.dat file
[/v|-v

This switch opens REGEDIT.EXE in advanced mode, where th

registratio
database i
displayed in a tree structure (similar to the tree window i

Windows 3.1 Fil
Manager)
Any part of the database can be edited
[/s|-s

When a filename is specified on the command line, this switch i

used t
suppress an
informational dialog boxes that would normally be displayed. Thi

is usefu
when the Setu
program for an application wants to execute REGEDIT.EXE with a .RE

file, bu
does no
want the user to be confused by any dialog boxes that ar

displayed
filename

Specifies the file(s) to import into the registr
/C filename

Specifies the file to create the registry from
/E filename

Specifies the file to export the registry to
regpat

Specifies the starting registry key to exportfrom. (Defaults t

exporting th
entir
registry)
Syntax for Switches Either "/" or "-" can be used to signify th

optiona
switches. Th
switches can be combined (for example, -vs) and be typed in eithe

uppercas
o
lowercase. Unrecognized switches are ignored
Kevin wrote
Hello folks
I've developed a program that starts with "Application.Visible

False" then proceeds to execute the regedit application via the shell metho
<Shell "C:\WINDOWS\REGEDIT.EXE C:\RESTRICT.REG", vbNormalFocus. It the
reboots the PC. Problem is the reboot overrides a necessary prompt/respons
from the regedit application. That is, I need to respond to two prompt
from the regedit application before rebooting the PC. Is there a way I ca
force the reboot to wait for these prompts and responses
Thanks
Kevi

--
Dave Peterso



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open Excel in different windows AND open from Outlook? KimD Setting up and Configuration of Excel 0 January 25th 10 07:47 PM
cannot open exel from windows xp in windows vista and visa versa lildiana New Users to Excel 4 February 25th 09 07:26 PM
OPEN MULTIPLE WINDOWS William Excel Discussion (Misc queries) 3 January 14th 09 02:13 PM
Open Workbooks in New Windows Erika Excel Discussion (Misc queries) 1 October 31st 08 04:15 PM
Open email windows can't open, excel shreadsheet file .xls ? skiz Excel Discussion (Misc queries) 0 October 2nd 05 07:03 PM


All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"