BasicX
Mechanical
- Nov 4, 2022
- 1
thread560-252516
Dear community, does anyone have a solution for this topic?
Environment variable or Script Solution (not VBA)
Something similar to
set oShell= CreateObject(“Wscript.Shell”)
set oEnv = oShell.Environment(“PROCESS”)
oEnv(“SEE_MASK_NOZONECHECKS”) = 1
oShell.Run “c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart”,0,True
oEnv.Remove(“SEE_MASK_NOZONECHECKS”)
OR
Function FindWindow(FensterName, ExeName)
set wmi = GetObject("winmgmts:")
set system = wmi.instancesOf("win32_process")
for each process in system
if LCase(process.name) = LCase(ExeName) then
MsgBox LCase(process.name)
set WshShell = CreateObject("WScript.Shell")
f = WshShell.AppActivate(FensterName)
MsgBox f
WshShell.SendKeys "%{ENTER}" 'Rnter
end if
next
FindWindow = "OK"
End Function
_____________________________________________________________
Send Keys does not work
On Error Return Next also does not work, as the warning comes from GSD and not from script
Dear community, does anyone have a solution for this topic?
Environment variable or Script Solution (not VBA)
Something similar to
set oShell= CreateObject(“Wscript.Shell”)
set oEnv = oShell.Environment(“PROCESS”)
oEnv(“SEE_MASK_NOZONECHECKS”) = 1
oShell.Run “c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart”,0,True
oEnv.Remove(“SEE_MASK_NOZONECHECKS”)
OR
Function FindWindow(FensterName, ExeName)
set wmi = GetObject("winmgmts:")
set system = wmi.instancesOf("win32_process")
for each process in system
if LCase(process.name) = LCase(ExeName) then
MsgBox LCase(process.name)
set WshShell = CreateObject("WScript.Shell")
f = WshShell.AppActivate(FensterName)
MsgBox f
WshShell.SendKeys "%{ENTER}" 'Rnter
end if
next
FindWindow = "OK"
End Function
_____________________________________________________________
Send Keys does not work
On Error Return Next also does not work, as the warning comes from GSD and not from script