Archive - January 2010

"Action is the real measure of intelligence" - Napolean Hill 

 

Index
bar1
How To Map Universal Drive
Sending Alerts To Multiple Computers
Randomized Timer For Your Scripts
Survey Monkey Survey Work Around
HTA Auto-Resize And Detect Resolution
Time-Based Greetings
Check Remote Access
Silent Switches: Reference 1
Career


bar1

 


Δ
How To Map Universal Drive
bar1

How to create a mapped drive in vbscript and shell.

VBScript: Create script to map universal drive


On Error Resume Next
Set Network = CreateObject("WScript.Network")
Drive = "DriveLetter:"
Share = \\server\sharename

WScript.Echo "Mapping drive " & Drive & " to " & Share
Network.MapNetworkDrive Drive, Share
If Err.Number = 0 Then
WScript.Echo "Map Successful"
Else
WScript.Echo "Error mapping drive " & Drive & " to " & Share
End if



Shell: Create script to map universal drive

@Echo Off
CLS ; Clears the screen
Set Drive=DriveLetter
Set Share=\\server\sharename

Echo Mapping drive %Drive% to %Share%
Net Use %Drive%: /Delete && CLS
Net Use %Drive%: %Share%
If %errorlevel% EQU 0 CLS && Echo Map Successful && Goto End
CLS && Echo Error mapping drive %Drive% to %Share%

:End


bar1
bar1



 

Δ Sending Alerts To Computers
bar1

How to send alerts to multiple computers.

VBScript: Create a script to send alerts to multiple computers

 

On Error Resume Next
Set Shell = CreateObject("WScript.Shell")

Dim Name(2)
Name(0) = "name1"
Name(1) = "name2"

MSG = "message"

For X = 0 to UBound(Name)
Shell.Run "Net Send " & Name(X) & " " & MSG, 0, False
Next


bar1
bar1




 

Δ Survey Monkey Survey Site Work Around
bar1

Survey Monkey is a great little web site that allows you to create a survey and send it to your end-users. You can collect all type of data which in turn can help you with future projects as well as show the vision and value that you have brought to the company. There is one annoying surveymonkey advertisement that you get forwarded to, which happens even if you have the paid service. This is a work around.

VBScript: Create a script to kill web page advertisement

 

On error resume next

Dim fso, tempfile, tfolder, tname, tfile, surveyLink

 

surveyLink = " http://www.surveymonkey.com/s/9VWT5CZ"

 

 

Set objShell = CreateObject("Wscript.Shell")

Set fso = CreateObject("Scripting.FileSystemObject")

Const TemporaryFolder = 2

Set tfolder = fso.GetSpecialFolder(TemporaryFolder)

tname = "surveymonkey.cmd"  

 

Set tfile = tfolder.CreateTextFile(tname)

Set CreateTempFile = tfile

Set tempfile = CreateTempFile

 

tempfile.WriteLine ":MONITOR"

tempfile.WriteLine "TASKLIST /v /FI "&chr(34)&"WINDOWTITLE ne zzz"&chr(34)&" | find /i "&chr(34)&"SurveyMonkey.com - Powerful tool for"&chr(34) & " && TASKKILL /fi " & chr(34)&"WINDOWTITLE eq SurveyMonkey.com*"&chr(34)&" && Exit"

tempfile.WriteLine "goto MONITOR"

tempfile.Close

 

iexplore = Chr(34)&"C:\Program Files\Internet Explorer\iexplore.exe"&Chr(34)

objShell.Run iexplore & surveyLink,9,False

objShell.Run tfolder & "\" & tname, False


bar1
bar1







Δ Randomized Timer For Your Scripts
bar1

Have you ever needed to wait a random amount of time before executing a routine? Well this is what I used recently and it worked liked a charm. Because I was calling out from a HTA to a .cmd file as my main process, I wanted to create a separate, hidden queue that would wait a random amount of time and then execute the final process, which was logging a timestamp. The reason I needed this was to solve the problem of many users writing to one log file. As you know, VBScript requires exclusive write access while opening a file. So to allow the split second required for write time, and to allow every user to have access to the file, I had to some how provide a randomized wait time once the HTA was closed. This would ensure even though their timestamp was ready to be entered into the log, that multiple users wouldn't be trying to write to the log at the exact same time.

VBScript:   
Create a script to wait a random amount of time, exported to a batch file, then log timestamp.


Sub ScriptYES
On error resume next
Set objNetwork = CreateObject("WScript.Network")
objComputerName = objNetwork.ComputerName

Dim fso, tempfile, tfolder, tname, tfile, objFSO, objLogFile, objNetwork, LogEntry
Const ForWriting = 2
Const TemporaryFolder = 2

'This creates the objects for temp folder
Set fso = CreateObject("Scripting.FileSystemObject")
Set tfolder = fso.GetSpecialFolder(TemporaryFolder)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile(tfolder&"\answer.cmd")
'This clears the file contents
objFile.Write ""
objFile.Close

'This sets the LogFile
Set objLogFile = objFSO.OpenTextFile(tfolder&"\answer.cmd", ForWriting, False)

Set objNetwork = CreateObject("WScript.Network")

'This sets the timestamp to a variable to be written to the hidden queue
LogEntry = Date() & "," & Time() & "," & objNetwork.UserName & "," & objComputerName & "," & "YES"
'This creates the contents of the hidden queue command file
objLogFile.WriteLine "set ran=%random:~-2%"
objLogFile.WriteLine "if "& chr(34) & "%ran:~1%"& chr(34) &"==" & chr(34) & chr(34)& " set ran=0%ran%"
objLogFile.WriteLine "set /a ran=1%ran%-99"
objLogFile.WriteLine "ping -n %ran% 127.0.0.1"
objLogFile.WriteLine "echo "&LogEntry&">>\\script-12650\TickerLog\tickerlog.txt"
'This closes the input
objLogFile.Close

'This launches the hidden queue with randomized countdown timer, 1-100 seconds
Set objShell = CreateObject("WScript.Shell")
AnswerFilePath = tfolder&"\answer.cmd"
objShell.Run AnswerFilePath,0, False

Self.Close()
End Sub

bar1
bar1




Δ HTA: Auto-Resize & Detect Resolution
bar1

This is an excerpt from a HTA script I was working on. The idea was to resize a thin banner splash screen based upon the display resolution.


HTA VBScript: Create a script that will detect screen resolution.

Sub Window_OnLoad

On error resume next 

Dim strX, strY, strMinus

'This auto-detects what the resolution is and sets corresponding variables

If (screen.width) = "1440" then strX="1440"
If (screen.width) = "1440" then strMinus="-20"
If (screen.height) = "900" then strY="60"

If (screen.width) = "1440" then DataArea25.InnerHTML = "           "

If (screen.width) = "1024" then strX="1024"
If (screen.width) = "1024" then strMinus="-20"
If (screen.height) = "768" then strY="60"
If (screen.width) = "1024" then DataArea25.InnerHTML = "    "

If (screen.width) = "800" then strX="800"
If (screen.width) = "800" then strMinus="-20"
If (screen.height) = "600" then strY="85"
If (screen.width) = "800" then DataArea25.InnerHTML = ""

window.resizeTo (strX), (strY)

window.moveTo 0, strMinus

End sub

bar1
bar1





Δ Perform Time-Based Greetings 
bar1

How to perform time based greetings in vbscript and shell.

VBScript: Create a script to perform time-based greetings

On Error Resume Next
If Hour(Now) < 12 Then
Wscript.Echo "Good Morning"
ElseIf Hour(Now) < 18 Then
Wscript.Echo "Good Afternoon"
Else
Wscript.Echo "Good Evening"
End If


Shell: Create a script to perform time-based greetings

@Echo Off

CLS

For /F "Delims=: Tokens=1" %%I in ('Time /T') Do Set Hour=%%I

For /F "Delims=: Tokens=2" %%I in ('Time /T') Do Set Min=%%I

For /F "Delims=0,1,2,3,4,5,6,7,8,9 Tokens=2" %%I in

('Set Min') Do Set AP=%%I

 

If %AP% EQU p Goto PM

Set Greet=Good Morning

Goto End

 

:PM

If %Hour% EQU 12 Set Hour=0

If %Hour% LSS 12 Set Greet=Good Evening

If %Hour% LSS 6 Set Greet=Good Afternoon

 

:End

Echo %Greet%

Set Hour=

Set Min=

Set AP=


bar1

bar1




Δ
 Check For Remote Access 
bar1

How to check for remote access in vbscript and shell.

VBScript: Checking for remote access

On Error Resume Next
Set SHELL = CreateObject("WScript.Shell")

ELevel = Shell.Run("fullpath\CheckRAS",0,True
If (ELevel = 0) Then
RAS = "YES"
Else
RAS = "NO"
End if

 

Shell: Checking for remote access

@Echo Off
CLS ; Clears the screen
Set RAS=NO
fullpath\CheckRAS > Nul
If %errorlevel% EQU 1 Set RAS=YES




Δ Silent Switches Reference 1
bar1

For my reference...

 

Batch Scripts: Silent switches

 

i-A00-MicrosoftUpdateActiveX-silent.bat

start /wait MicrosoftUpdateActiveX\WindowsUpdateAgent20-x86.exe /wuforce /quiet /norestart

expand MicrosoftUpdateActiveX\LegitCheckControl.cab -F:*.dll %windir%\system32\
regsvr32 /S %windir%\system32\LegitCheckControl.dll

expand MicrosoftUpdateActiveX\wuweb_site.cab -F:*.dll %windir%\system32\
regsvr32 /S %windir%\system32\wuweb.dll

expand MicrosoftUpdateActiveX\opuc3.cab -F:*.dll %windir%\
regsvr32 /S %windir%\opuc.dll

expand MicrosoftUpdateActiveX\muweb_site.cab -F:*.dll %windir%\system32\
regsvr32 /S %windir%\system32\muweb.dll

ping localhost > NUL

---------------------
i-A02-AcrobatReader7-silent.bat

if not (%OS%) == (Windows_NT) goto end

if exist %windir%\TEMP\adberdr\ rmdir /S /Q %windir%\TEMP\adberdr\
start /wait AcrobatReader7\AdbeRdr705_cht_full.exe /S -nos_ne -nos_o%windir%\TEMP\adberdr\
start /wait %windir%\TEMP\adberdr\"Adobe Reader 7.0.5 - Chinese Traditional.msi" /qr REBOOT=ReallySuppress
del /Q "%ALLUSERSPROFILE%\
「開始」功能表\程式集\啟動\Adobe Reader Speed Launch.lnk"
del /Q "%ALLUSERSPROFILE%\
桌面\Adobe Reader 7.0.lnk"
rmdir /S /Q %windir%\TEMP\adberdr\

:end

---------------------
i-A03-KliteMegaCodec-silent.bat

start /wait KliteMegaCodec\klmcodec136.exe /silent /LoadInf=".\KliteMegaCodec\klmcp.ini"

---------------------
i-A04-WindowsMediaPlayer10-silent.bat

if not (%OS%) == (Windows_NT) goto end

start /wait WindowsMediaPlayer10\MP10SETUP.EXE /Q:A /R:N /c:"SETUP_WM.EXE /Q /R:N /NoPID /DisallowSystemRestore /P:#e"
start /wait WindowsMediaPlayer10\windowsmedia10-kb892313-x86-intl.exe /passive /n /norestart
start WindowsMediaPlayer10\BypassSystemRestoreWarningScript.exe
start /wait WindowsMediaPlayer10\WindowsMedia-KB891122-x86-CHT.exe /passive /n /norestart
start /wait WindowsMediaPlayer10\WindowsMedia10-KB902344-x86-INTL.exe /passive /n /norestart

:end

---------------------
i-A05-MicrosoftNewIME2003-silent.bat

if not (%OS%) == (Windows_NT) goto end

start /wait msiexec /qr /passive /norestart /i MicrosoftNewIME2003\CINTSETP.MSI
start /wait msiexec /qr /passive /norestart /i MicrosoftNewIME2003\TINTSETP.MSI
start /wait msiexec /qr /passive /norestart /i MicrosoftNewIME2003\SINTSETP.MSI
start /wait msiexec /qr /i MicrosoftNewIME2003\EMSetup.msi
start /wait msiexec /qr /passive /norestart /i "MicrosoftNewIME2003\PMingLiU Update Pack.msi"

:end

---------------------
i-A06-FlashShockwave-silent.bat

start /wait FlashShockwave\flashplayer7installer.exe /s
start /wait msiexec /qr /i FlashShockwave\mm_fl_sw_installer.msi

---------------------
i-B13-Office2003-silent.bat

office2003\setup.exe PIDKEY=xxxxxxxxxxxxxxxxxxxx /qr /wait

---------------------
i-B14-Frontpage2003-silent.bat

Frontpage2003\setup.exe PIDKEY=xxxxxxxxxxxxxxxxxxxx /qr /wait

---------------------
i-B15-Office2003Update-silent.bat

Office2003Update\Office2003SP2-KB887616-Client-CHT.exe /r:n /q /c:"msiexec /qr /p MAINSP2op.msp REBOOT=ReallySuppress"
Office2003Update\office2003-KB907417-FullFile-CHT.exe /r:n /q /c:"msiexec /qr /p OTKLOADR.msp REBOOT=ReallySuppress"
Office2003Update\office2003-KB907492-FullFile-ZHH.exe /r:n /q /c:"msiexec /qr /p OUTLFLTR.msp REBOOT=ReallySuppress"


---------------------
i-B16-Project2003-silent.bat

Project2003\setup.exe PIDKEY=xxxxxxxxxxxxxxxxxxxx /qr /wait
Office2003Update\Project2003SP2-KB887620-FullFile-CHT.exe /r:n /q /c:"msiexec /qr /p PROJECTSP2.msp REBOOT=ReallySuppress"

---------------------
i-C22-SevenZip-silent.bat

start /wait Seven-Zip\7z429.exe /S
regedit /s Seven-Zip\7-Zip.reg

---------------------
i-C23-Alibabar-silent.bat

start /wait Aliba510\Alibabar510_Setup.exe /q

---------------------
i-C24-PDFcreator-silent.bat

start /wait PDFCreator\PDFCreator-0_8_1_AFPLGhostscript.exe /silent /norestart /LANG=English /sp-

---------------------
i-C25-EasyCleaner2-silent.bat

start /wait EasyCleaner2\ECLEA2_0.EXE -s -f1"EasyCleaner2\setup.iss" -f2"%TEMP%\EC2setup.log"
if (%OS%) == (Windows_NT) goto WindowsXP
:WindowsMe
xcopy EasyCleaner2\Options.ini "C:\PROGRAM FILES\ToniArts\EasyCleaner\" /Y
goto end
:WindowsXP
xcopy EasyCleaner2\Options.ini "%ProgramFiles%\ToniArts\EasyCleaner\" /Y
:end

---------------------
i-C27-FastStoneImageViewer-silent.bat

start /wait FastStoneImageViewer\FSViewerSetup.exe /S

---------------------
i-C28-WinSCP-silent.bat

start /wait WinSCP\winscp376setup.exe /Silent

---------------------
i-C29-WellGet-silent.bat

start /wait WellGet\wgsetup-en.exe /S

---------------------
i-D30-Nero66Ultra-silent.bat

set serial=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx
start /wait Nero6\Nero-6.6.0.16.exe /LANGUAGE=CHT /silent /noreboot /sn=%serial% /write_sn
start /wait Nero6\Nero-6.6.0.16_eng.exe /silent /noreboot
start /wait Nero6\Nero-6.6.0.16_cht.exe /silent /noreboot

---------------------
i-D31-PowerDVD6-silent.bat

start /wait PowerDVD6\PDVD_6_2003e.exe
if not (%OS%) == (Windows_NT) set systemdrive=C:
del "%systemdrive%\Program Files\CyberLink\PowerDVD\OLRSubmission\OLRSubmission.exe"
xcopy PowerDVD6\APREG.url "%systemdrive%\Program Files\CyberLink\PowerDVD\" /Y

---------------------
i-D33-Winamp-silent.bat

if (%OS%) == (Windows_NT) goto WindowsXP
:WindowsMe
XCOPY Winamp\winamp.ini C:\WINDOWS\ /Y
start /wait Winamp\winamp51_lite.exe /S /install=SFQR
goto end
:WindowsXP
XCOPY Winamp\winamp.ini %SYSTEMROOT%\ /Y
start /wait Winamp\winamp51_lite.exe /S /install=SFQR
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v WinampAgent /f
:end

---------------------
i-D37-StarDict-silent.bat

if (%OS%) == (Windows_NT) goto NT_XP
:9x
start /wait Stardict\gtk-runtime-2.6.8-rev-a.exe /S
start /wait Stardict\stardict-2.4.5.exe /S /D="C:\Program Files\StarDict\"
start /wait Stardict\StarDictWav.exe
xcopy StarDict\stardict.cfg "C:\Program Files\StarDict\" /V
goto end
:NT_XP
start /wait Stardict\gtk-runtime-2.6.8-rev-a.exe /L= /S
start /wait Stardict\stardict-2.4.5.exe /S
start /wait Stardict\StarDictWav.exe
xcopy StarDict\stardict.cfg "%ProgramFiles%\StarDict\" /Y
:end

---------------------
i-D38-AutodeskDWFviewer-silent.bat

if not (%OS%) == (Windows_NT) goto end
start /wait AutodeskDWFviewer\DwfViewerSetup_cht.exe /q
:end

---------------------
i-D39-ACAD2002-silent.bat

start /wait ACAD2002\ACAD.MSI /qb ACAD_SILENT_LICENSE=YES ACADSERIALPREFIX=xxx ACADSERIALNUMBER=xxxxxxx ACADSERIALKEY=xxxxxx INSTALLLEVEL=3
start ACAD2002Update\k030rc2_k044_acad_unl_r4.exe /qb- ACAD_SILENT_LICENSE=YES
start /wait ACAD2002Update/WaitACAD.exe
if not (%OS%) == (Windows_NT) set ProgramFiles="C:\Program Files"
xcopy ACAD2002Update\Help\*.* "%ProgramFiles%\AutoCAD 2002\Help\" /Y
xcopy ACAD2002Update\Template\*.* "%ProgramFiles%\AutoCAD 2002\Template\" /Y

---------------------
i-E41-AVG7-silent.bat

start /wait AVG7\avg71free_362a652.exe /HIDE /DONT_START_APPS /NO_WELCOME /NO_AVGW_STARTUP
/QUIT_IF_INSTALLED

---------------------
i-E42-MicrosoftAntiSpyware-silent.bat

start /wait MicrosoftAntiSpyware\MicrosoftAntiSpywareInstall.exe /S /v/qr

---------------------
i-E43-Spybotsd-silent.bat

start /wait Spybotsd\spybotsd14.exe /sp- /silent /norestart
regedit /s Spybotsd\spybot-Chi.reg
if (%OS%) == (Windows_NT) goto XP
:9x
start "C:\Program Files\Spybot - Search & Destroy\SpybotSD.exe" /taskbarhide /autoclose /autoupdate /autoimmunize
goto end
:XP
start "" "%ProgramFiles%\Spybot - Search & Destroy\SpybotSD.exe" /taskbarhide /autoclose /autoupdate /autoimmunize
:end

---------------------
i-E45-DaemonTools-silent.bat

start /wait DaemonTools\daemon347.msi /qr /norestart

---------------------
i-G69-RealVNC-silent.bat

start /wait RealVNC\vnc-4_1_1-x86_win32.exe /silent
"%systemdrive%\Program Files\RealVNC\VNC4\winvnc4.exe" -stop
"%systemdrive%\Program Files\RealVNC\VNC4\winvnc4.exe" -unregister
regedit /s RealVNC\winvnc4.reg

---------------------
i-XP-GroupABCDE-silent.bat

start /min taskmgr.exe

for %%U in (i-A*) do call %%U

for %%U in (i-B13*) do call %%U
for %%U in (i-B14*) do call %%U
for %%U in (i-B15*) do call %%U
for %%U in (i-B16*) do call %%U

for %%U in (i-C*) do call %%U

for %%U in (i-D*) do call %%U

for %%U in (i-E*) do call %%U

---------------------

i-M61-MSNmessenger7-silent.bat
set ver=70
if (%OS%) == (Windows_NT) set ver=75
start /wait msiexec /qr /i MSNmessenger7\MsnMsgs%ver%.msi IAGREE="Yes" ADDEXPLORERTOOLBAR="" SETSEARCHENGINE="" SETHOMEPAGE=""
regedit /s MSNmessenger7\MsnMsgsStartup-Disable.reg

---------------------
i-M62-WindowsJournalViewer-silent.bat

start /wait WindowsJournalViewer\setup.exe /q /c /t:%windir%\temp\journal
start /wait msiexec /qr /i "%windir%\temp\journal\Microsoft Windows Journal Viewer.msi"

---------------------
i-M63-HighMATCDBurning-silent.bat

start /wait HighMATCDBurning\HMTCDWizard_CHT.exe /qr ALLUSERS=1 REBOOT=ReallySuppress

---------------------
i-M64-WindowsMediaEncoder9-silent.bat

start /wait WindowsMediaEncoder9\WMEncoder.exe /Q

---------------------
i-M65-WindowsMediaConnect-silent.bat

@rem Windows Media Connect Ver 2
start /wait WindowsMediaConnect\wmcsetup.exe /q /n /z

---------------------
i-M66-DotNet-silent.bat

start /wait DotNet\dotnetfx.exe /Q /C:"install.exe /q"
start /wait DotNet\langpack.exe /Q /C:"inst.exe /q"
start /wait DotNet\NDP1.1sp1-KB867460-X86.exe /Xp:"%windir%\Temp"
msiexec /qn /p %windir%\Temp\S867460.msp /norestart
start /wait DotNet\NDP1.1sp1-KB886903-X86.exe /Xp:"%windir%\Temp"
msiexec /qn /p %windir%\Temp\M886903.msp /norestart

---------------------
i-M67-WinXpSp2SupportTools-silent.bat

start /wait WinXpSp2SupportTools\WindowsXP-KB838079-SupportTools-ENU.exe /Q /C:"msiexec.exe /qb /i suptools.msi REBOOT=ReallySuppress"

---------------------
i-M68-WindowsScript56-silent.bat

start /wait WindowsScript56\scripcht.exe /q /r:n

---------------------
i-M69-WindowsMessenger51.bat

start /wait msiexec /qr /i WindowsMessenger51\messenger.msi

---------------------
i-M70-WindowsTweakUI-silent.bat

start WindowsTweakUI\TweakUiPowertoySetup.exe
start /wait WindowsTweakUI\TweakUiScript.exe

---------------------
i-M71-MicrosoftPowerToys-silent.bat

start /wait msiexec /qr /i MicrosoftPowerToys\CalcPlus.msi
start /wait MicrosoftPowerToys\ClearTypeTunerSetup.exe /S /v/qr
xcopy MicrosoftPowerToys\"ClearType Tuning.lnk" "%UserProfile%\
「開始」功能表\程式集\Powertoys for Windows XP\" /Y
start /wait MicrosoftPowerToys\CmdHerePowertoySetup.exe /S /v/qr
start /wait MicrosoftPowerToys\DeskmanPowertoySetup.exe /S /v/qr
start /wait MicrosoftPowerToys\HTMLSlideShowSetup.exe /q /c:"msiexec /qr /i HTMLSlideShow.msi"
start /wait MicrosoftPowerToys\ImageResizerPowertoySetup.exe /S /v/qr
start /wait MicrosoftPowerToys\MagnifierPowertoySetup.exe /S /v/qr
start /wait MicrosoftPowerToys\PowerCalcPowertoySetup.exe /S /v/qr
start /wait MicrosoftPowerToys\RAWViewerSetupLite.exe /S /v/qr
start /wait MicrosoftPowerToys\SlideshowPowertoySetup.exe /S /v/qr
start /wait msiexec /qr /i MicrosoftPowerToys\SyncToySetup.msi
start /wait MicrosoftPowerToys\TaskswitchPowertoySetup.exe /S /v/qr
start /wait MicrosoftPowerToys\TimershotPowertoySetup.exe /S /v/qr

---------------------
i-M72-MicrosoftAppLocale-silent.bat

start /wait msiexec /qr /i Applocale\apploc.msi


---------------------
MSNmessenger7\MsnMsgsStartup-Disable.reg

REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"msnmsgr"=-

---------------------
WindowsMediaConnect\WindowsMediaConnectScript.au3

WinWaitActive("Windows","System Restore",20)
WinActivate("Windows","System Restore")
If WinActive("Windows","System Restore") Then
send("{enter}")
EndIf



---------------------
WindowsTweakUI\TweakUiScript.au3

WinWaitActive("Microsoft Powertoys","Welcome",10)
WinActivate("Microsoft Powertoys ","")
If WinActive("Microsoft Powertoys","Welcome") Then
send("!n")
EndIf
WinWaitActive("Microsoft Powertoys ","License",10)
WinActivate("Microsoft Powertoys","")
If WinActive("Microsoft Powertoys","License") Then
send("!a" & "!n")
EndIf
WinWaitActive("Microsoft Powertoys","Finish",10)
WinActivate("Microsoft Powertoys","")
If WinActive("Microsoft Powertoys","Finish") Then
send("{enter}")
EndIf

-------------------

START "title" /WAIT "command or program" /parameters

Even if you're not using a title, you should at least leave it blank

e.g.

CODE

start "" /wait FlashShockwave\flashplayer7installer.exe /s


bar1
bar1

 

 


Δ Career
bar1
Written by bhuvans

For my reference:


1. Tell me about yourself:
The most often asked question in interviews. You need to have a short
statement prepared in your mind. Be careful that it does not sound
rehearsed. Limit it to work-related items unless instructed otherwise.
Talk about things you have done and jobs you have held that relate to
the position you are interviewing for. Start with the item farthest
back and work up to the present.

2. Why did you leave your last job?
Stay positive regardless of the circumstances. Never refer to a major
problem with management and never speak ill of supervisors, co-workers
or the organization. If you do, you will be the one looking bad. Keep
smiling and talk about leaving for a positive reason such as an
opportunity, a chance to do something special or other forward-looking
reasons.

3. What experience do you have in this field?
Speak about specifics that relate to the position you are applying for.
If you do not have specific experience, get as close as you can.

4. Do you consider yourself successful?
You should always answer yes and briefly explain why. A good
explanation is that you have set goals, and you have met some and are
on track to achieve the others.

5. What do co-workers say about you?
Be prepared with a quote or two from co-workers. Either a specific
statement or a paraphrase will work. Jill Clark, a co-worker at Smith
Company, always said I was the hardest workers she had ever known. It
is as powerful as Jill having said it at the interview herself.

6. What do you know about this organization?
This question is one reason to do some research on the organization
before the interview. Find out where they have been and where they are
going. What are the current issues and who are the major players?

7. What have you done to improve your knowledge in the last year?
Try to include improvement activities that relate to the job. A wide
variety of activities can be mentioned as positive self-improvement.
Have some good ones handy to mention.

8. Are you applying for other jobs?
Be honest but do not spend a lot of time in this area. Keep the focus
on this job and what you can do for this organization. Anything else is
a distraction.

9. Why do you want to work for this organization?
This may take some thought and certainly, should be based on the
research you have done on the organization. Sincerity is extremely
important here and will easily be sensed. Relate it to your long-term
career goals.

10. Do you know anyone who works for us?
Be aware of the policy on relatives working for the organization. This
can affect your answer even though they asked about friends not
relatives. Be careful to mention a friend only if they are well thought
of.

11. What kind of salary do you need?
A loaded question. A nasty little game that you will probably lose if
you answer first. So, do not answer it. Instead, say something like,
That's a tough question. Can you tell me the range for this position?
In most cases, the interviewer, taken off guard, will tell you. If not,
say that it can depend on the details of the job. Then give a wide
range.

12. Are you a team player?
You are, of course, a team player. Be sure to have examples ready.
Specifics that show you often perform for the good of the team rather
than for yourself are good evidence of your team attitude. Do not brag,
just say it in a matter-of-fact tone. This is a key point.

13. How long would you expect to work for us if hired?
Specifics here are not good. Something like this should work: I'd like
it to be a long time. Or As long as we both feel I'm doing a good job.

14. Have you ever had to fire anyone? How did you feel about that?
This is serious. Do not make light of it or in any way seem like you
like to fire people. At the same time, you will do it when it is the
right thing to do. When it comes to the organization versus the
individual who has created a harmful situation, you will protect the
organization. Remember firing is not the same as layoff or reduction in
force.

15. What is your philosophy towards work?
The interviewer is not looking for a long or flowery dissertation here.
Do you have strong feelings that the job gets done? Yes. That's the
type of answer that works best here. Short and positive, showing a
benefit to the organization.

16. If you had enough money to retire right now, would you?
Answer yes if you would. But since you need to work, this is the type
of work you prefer. Do not say yes if you do not mean it.

17. Have you ever been asked to leave a position?
If you have not, say no. If you have, be honest, brief and avoid saying
negative things about the people or organization involved.

18. Explain how you would be an asset to this organization
You should be anxious for this question. It gives you a chance to
highlight your best points as they relate to the position being
discussed. Give a little advance thought to this relationship.

19. Why should we hire you?
Point out how your assets meet what the organization needs. Do not
mention any other candidates to make a comparison.

20. Tell me about a suggestion you have made
Have a good one ready. Be sure and use a suggestion that was accepted
and was then considered successful. One related to the type of work
applied for is a real plus.

21. What irritates you about co-workers?
This is a trap question. Think real hard but fail to come up with
anything that irritates you. A short statement that you seem to get
along with folks is great.

22. What is your greatest strength?
Numerous answers are good, just stay positive. A few good examples:
Your ability to prioritize, Your problem-solving skills, Your ability
to work under pressure, Your ability to focus on projects, Your
professional expertise, Your leadership skills, Your positive attitude

23. Tell me about your dream job.
Stay away from a specific job. You cannot win. If you say the job you
are contending for is it, you strain credibility. If you say another
job is it, you plant the suspicion that you will be dissatisfied with
this position if hired. The best is to stay genetic and say something
like: A job where I love the work, like the people, can contribute and
can't wait to get to work.

24. Why do you think you would do well at this job?
Give several reasons and include skills, experience and interest.

25. What are you looking for in a job?
See answer # 23

26. What kind of person would you refuse to work with?
Do not be trivial. It would take disloyalty to the organization,
violence or lawbreaking to get you to object. Minor objections will
label you as a whiner.

27. What is more important to you: the money or the work?
Money is always important, but the work is the most important. There is
no better answer.

28. What would your previous supervisor say your strongest point is?
There are numerous good possibilities:
Loyalty, Energy, Positive attitude, Leadership, Team player, Expertise,
Initiative, Patience, Hard work, Creativity, Problem solver

29. Tell me about a problem you had with a supervisor
Biggest trap of all. This is a test to see if you will speak ill of
your boss. If you fall for it and tell about a problem with a former
boss, you may well below the interview right there. Stay positive and
develop a poor memory about any trouble with a supervisor.

30. What has disappointed you about a job?
Don't get trivial or negative. Safe areas are few but can include:
Not enough of a challenge. You were laid off in a reduction Company did
not win a contract, which would have given you more responsibility.

31. Tell me about your ability to work under pressure.
You may say that you thrive under certain types of pressure. Give an
example that relates to the type of position applied for.

32. Do your skills match this job or another job more closely?
Probably this one. Do not give fuel to the suspicion that you may want
another job more than this one.

33. What motivates you to do your best on the job?
This is a personal trait that only you can say, but good examples are:
Challenge, Achievement, Recognition

34. Are you willing to work overtime? Nights? Weekends?
This is up to you. Be totally honest.

35. How would you know you were successful on this job?
Several ways are good measures:
You set high standards for yourself and meet them. Your outcomes are a
success.Your boss tell you that you are successful

36. Would you be willing to relocate if required?
You should be clear on this with your family prior to the interview if
you think there is a chance it may come up. Do not say yes just to get
the job if the real answer is no. This can create a lot of problems
later on in your career. Be honest at this point and save yourself
future grief.

37. Are you willing to put the interests of the organization ahead ofyour own?
This is a straight loyalty and dedication question. Do not worry about
the deep ethical and philosophical implications. Just say yes.

38. Describe your management style.
Try to avoid labels. Some of the more common labels, like progressive,
salesman or consensus, can have several meanings or descriptions
depending on which management expert you listen to. The situational
style is safe, because it says you will manage according to the
situation, instead of one size fits all.

39. What have you learned from mistakes on the job?
Here you have to come up with something or you strain credibility. Make
it small, well intentioned mistake with a positive lesson learned. An
example would be working too far ahead of colleagues on a project and
thus throwing coordination off.

40. Do you have any blind spots?
Trick question. If you know about blind spots, they are no longer blind
spots. Do not reveal any personal areas of concern here. Let them do
their own discovery on your bad points. Do not hand it to them.

41. If you were hiring a person for this job, what would you look for?
Be careful to mention traits that are needed and that you have.

42. Do you think you are overqualified for this position?
Regardless of your qualifications, state that you are very well
qualified for the position.

43. How do you propose to compensate for your lack of experience?
First, if you have experience that the interviewer does not know about,
bring that up: Then, point out (if true) that you are a hard working
quick learner.

44. What qualities do you look for in a boss?
Be generic and positive. Safe qualities are knowledgeable, a sense of
humor, fair, loyal to subordinates and holder of high standards. All
bosses think they have these traits.

45. Tell me about a time when you helped resolve a dispute betweenothers.
Pick a specific incident. Concentrate on your problem solving technique
and not the dispute you settled.

46. What position do you prefer on a team working on a project?
Be honest. If you are comfortable in different roles, point that out.

47. Describe your work ethic.
Emphasize benefits to the organization. Things like, determination to
get the job done and work hard but enjoy your work are good.

48. What has been your biggest professional disappointment?
Be sure that you refer to something that was beyond your control. Show
acceptance and no negative feelings.

49. Tell me about the most fun you have had on the job.
Talk about having fun by accomplishing something for the organization.

50. Do you have any questions for me?
Always have some questions prepared. Questions prepared where you will be an asset to the organization are good. How soon will I be able to be productive? and What type of projects will I be able to assist on? are
examples.

bar1
bar1

 




 

 

 

 


 

 


..About

..
I'm a Computer
..
Systems Engineer

..
Living and loving life
........................................


..
Author

....