Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to open Excel in different windows AND open from Outlook? | Setting up and Configuration of Excel | |||
cannot open exel from windows xp in windows vista and visa versa | New Users to Excel | |||
OPEN MULTIPLE WINDOWS | Excel Discussion (Misc queries) | |||
Open Workbooks in New Windows | Excel Discussion (Misc queries) | |||
Open email windows can't open, excel shreadsheet file .xls ? | Excel Discussion (Misc queries) |