flat assembler
Message board for the users of flat assembler.

Index > Heap > Set your IE HomePage in VBScript

Author
Thread Post new topic Reply to topic
mbr_tsr



Joined: 03 Apr 2011
Posts: 4903
mbr_tsr
Wow i just tested this .VBS file it works cums in Handy{

'Set the HomePage in the IE Web Browser

Const IE_START_PAGE = "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page"
Set Shell = CreateObject("WScript.shell")
Shell.RegWrite IE_START_PAGE, "http://127.0.0.1", "REG_SZ"
Post 08 Dec 2013, 05:12
View user's profile Send private message Reply with quote
mbr_tsr



Joined: 03 Apr 2011
Posts: 4903
mbr_tsr
'Really Handy Create Shortcut on DeskTop
'Replace notepad.lnk with the name for the link
'Replace notepad.exe with the path to the application you want to launch

Set objShell = WScript.CreateObject("WScript.Shell")
strDesktopFolder = objShell.SpecialFolders("Desktop")
Set objShortCut = objShell.CreateShortcut(strDesktopFolder & _
"\notepad.lnk")
objShortCut.TargetPath = chr(34) & "notepad.exe" & chr(34)
ObjShortCut.IconLocation = "notepad.exe, 0"
objShortCut.Save
Post 08 Dec 2013, 05:28
View user's profile Send private message Reply with quote
mbr_tsr



Joined: 03 Apr 2011
Posts: 4903
mbr_tsr
'Kill a running Process .EXE
'change notepad.exe to name of process to terminate

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("SELECT * FROM Win32_Process WHERE Name = 'notepad.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Post 08 Dec 2013, 17:31
View user's profile Send private message Reply with quote
mbr_tsr



Joined: 03 Apr 2011
Posts: 4903
mbr_tsr
'==============================================================================================
'Script to always detect if notepad.exe is loaded
'change notepad.exe to anything.exe
'==============================================================================================
Wscript.echo "Waiting for Notepad.Exe to load..."
Do
Set colProcessList = GetObject("Winmgmts:").ExecQuery ("Select * from Win32_Process")
vFound = False
For Each objProcess in colProcessList
If objProcess.name = "notepad.exe" then
vFound = True
End if
Next
If vFound = True then
Msgbox("Notepad.Exe FOUND!!!")
End If
Loop While 1
'==============================================================================================
Post 12 Dec 2013, 20:31
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.