Archive

Posts Tagged ‘registry’

Create a shortcut with script

13 August 2018 Leave a comment

I create a shortcut with a script, but why? Some applications do not know the cause, do not create a shortcut during installation or after installation. The following Script allows you to create shortcuts with the variables entered.

VBScript

The shortcut name, shortcut path, file name of the target application, shortcut icon, and system architecture are automatically selected.

Script

‘Script Started

‘Option Explicit

‘Create Shortcut

strComputer = “.”

On Error Resume Next

Dim objShell, objDesktop, objLink, strDesc,objItem ,colItems

Dim strAppPath, strWorkDir , WshShell

Set WshShell     = Wscript.CreateObject(“Wscript.Shell”)

Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)

Set colItems = objWMIService.ExecQuery(“Select * from Win32_ComputerSystem”,,48)

For Each objItem in colItems

If objItem.SystemType = “x64-based PC” Then

‘Variables

strWorkDir =”C:\”

strAppPath = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

strDesc=”Google Chrome”

‘——

Set objShell = CreateObject(“WScript.Shell”)

objDesktop=objShell.SpecialFolders(“Desktop”)

Set objLink = objShell.CreateShortcut(objDesktop & “\Google Chrome.lnk”)

objLink.Description = strDesc

objLink.TargetPath = strAppPath

objLink.WindowStyle = 3

objLink.WorkingDirectory = strWorkDir

objLink.IconLocation = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

objLink.Save

‘————————————-‘

‘ Add Registry key

else

‘Variables

strWorkDir =”C:\”

strAppPath = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

strDesc=”Google Chrome”

‘——

Set objShell = CreateObject(“WScript.Shell”)

objDesktop=objShell.SpecialFolders(“Desktop”)

Set objLink = objShell.CreateShortcut(objDesktop & “\Google Chrome.lnk”)

objLink.Description = strDesc

objLink.TargetPath = strAppPath

objLink.WindowStyle = 3

objLink.WorkingDirectory = strWorkDir

objLink.IconLocation = “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”

objLink.Save

end if

next

wscript.quit

‘Script Finished

Enjoy!

 

 

Advertisements

What is Superfetch and how it will be closed

If you are using Windows 10, the Windows operating system automatically turns Superfetch off or on according to the speed of the current hardware. You do not have to deal with it. If you like control, you can turn off Superfetch by following the steps below.

Services

Read more…

Problems refreshing icons on desktop and system tray (Solution)

I have come across a problem with a few customers, at least a couple of machines, with the problem of not refreshing the System Tray ( right next to the clock wlEmoticon-winkingsmile.png ) and the desktop icons.

2018-07-16_14-21-29

You can simply solve this problem by following the steps below.
Lets start,

To refresh system tray icons;

HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify

find and delete IconStreams ve PastIconStream variables on the right pane,

2018-07-16_14-28-08

Ctrl-Alt-Delete and open Task Manager, select explorer.exe under Processes and Finish Process.

Click Applications, select New Task, type explorer.exe and press Enter.

To refresh the desktop icons;

C:\Users\<user name>\AppData\Local
go to folder, delete the hidden IconCache.db file, and then restart the computer.

Enjoy.

Get windows registry value from remote computer

If you manage a large domain network. Your manager may ask you for information about the applications that are installed on the systems at certain intervals. This program can be more important for this company if it is an expensive application.

In the following example, we try to determine which machines have visual studio by collecting registry key information

Goal: Read registry value from remote machine

Source: Read remote machine names from .txt file

Result: Get results in .csv format

Read more…

How to fix SCCM 2012 Software Update fails #2

27 April 2018 Leave a comment

Errors:

testmachine 5.00.7804.1202 MRTKY\TESTMACHINE 11423 -2147467259 Unknown Error (-2147467259) 05.06.2013 12:44:23 HTTPS://SCCM1.POLSKIECELL.COM:8531 26 Failed

Pasted from <http://sccm1/Reports/Pages/Report.aspx?ItemPath=%2fConfigMgr_TCP%2fSoftware+Updates+-+D+Scan%2fScan+3+-+Clients+of+a+collection+reporting+a+specific+state+(secondary)&gt;

testmachine

5.00.7804.1202

MRTKY\TESTMACHINE

11423

-2147467259

Unknown Error (-2147467259)

04.06.2013 09:47:42

HTTPS://SCCM1.POLSKIECELL.COM:8531

25

Failed

 Pasted from <http://sccm1/Reports/Pages/Report.aspx?ItemPath=%2fConfigMgr_TCP%2fSoftware+Updates+-+D+Scan%2fScan+3+-+Clients+of+a+collection+reporting+a+specific+state+(secondary)&gt;

Symptoms:

\\testmachine\admin$\System32\GroupPolicy\Machine

Open Registry.pol file with Pol Reader and following error appers

Untitled picture

Read more…

SCCM 2007 ile bir uygulamanın registy değerinin 1 veya 0 olduğuna ulaşmak ve raporlamak

03 August 2012 Leave a comment

Uygulamamız, "Microsoft Office Communicator 2007 R2" olsun, ulaşmak istediğimiz kayıt "PC2PCAVEncription" olsun istediğimiz değer ise kaç makinede "0" ve "1" değerleri mevcut.

  1. Regedit ile kayıt defterinde ulaşmak istediğimiz değeri kontrol edelim.

 

clip_image001

Read more…