registry

Install a msi at system startup time

流过昼夜 提交于 2019-12-25 05:16:02
问题 I have a bootable disk from a machine which is mounted on another machine. I need to make the bootable disk ready so that when i create a machine using that mounted bootable disk some of the msi's are installed. What is the best way to run the msi's at system startup without knowing the instance credentials? Note : I have tried using RunOnce and AutoAdminLogon, it works but i need to know the credentials for this method. Also, since i have only the bootable disk i need to use methods which

How do I elevate vbs to delete a Registry key

元气小坏坏 提交于 2019-12-25 05:14:26
问题 This is the faulty code WshShell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\cFos\test\tvalue" This is my error Error: Unable to remove registry key "HKLM\SOFTWARE\test". Code: 800070005 Source: WshShell.RegDelete I gather that I need to disable UAC in Win Vista/7/8 but I was wondering if there is a way to directly run the .vbs file as administrator. Because I need to distribute it and people might not like disabling their UAC and some might even think this is malicious if I give an explicit

How to run reg file in Java Netbeans Code

筅森魡賤 提交于 2019-12-25 05:12:06
问题 Please help me to solve : how to run .reg file in java netbeans ? And how to set source file automatically if I open the program in different computer ? I have an reg file like this : [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\USBSTOR] "Start"=dword:00000004 And this is my Java Code : /** * Creates new form Form_DisableEnable */ public Form_DisableEnable() { initComponents(); Dimension x = Toolkit.getDefaultToolkit().getScreenSize(); Dimension y = getSize(); setLocation( (x.width -

C# Denied Access Deleting Registry Value

送分小仙女□ 提交于 2019-12-25 05:07:28
问题 When attempting to create a RunOnStartup Function that checks weather or not a key exists and if it does, does the user want it deleted, I encounter the problem of Access Denied. More specifically this. System.UnauthorizedAccessException: 'Cannot write to the registry key.' My code for this here. private static void RunOnStartup() { string KeyName = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; string valueName = "MyApp"; if (Registry.GetValue(KeyName, valueName, null)

How to get path to installed Visual Studio 15 Preview 4?

心已入冬 提交于 2019-12-25 04:55:10
问题 Visual Studio 14.0 (2015) installer saves path to devenv.exe to EnvironmentPath in registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\Setup\vs\ Visual Studio 15 Preview 4 does not save EnvironmentPath to HKLM registry. What is proper way to get executable path of installed Visual Studio 15? 回答1: For Visual Studio "15" you should use the new setup configuration API to discover installed instances of Visual Studio with different workloads. See Visual Studio Setup

Inno setup registry

独自空忆成欢 提交于 2019-12-25 04:26:46
问题 What can I add to the win registry so that the explorer context menu, when you right click on a file, gains an entry that calls "\path\to\exe" "path\to\this\file\you\right\clicked\on"? If that's possible to be done in Inno setup easily, could you possibly provide me with some examples? (As well as get rid of the registry key upon uninstall) Thanks. 回答1: What I did in MSBuild Launch Pad (http://msbuildlaunchpad.codeplex.com/) is like this, Your application must handle arguments from Windows

Redirect SQL Server's events from std Application log into a custom one

可紊 提交于 2019-12-25 03:43:24
问题 Had to seep through loads of info trying to restore the sequence of events that led to a crash yesterday, and got really interested in finding a solution to offload events from SQL Server to a custom event log. Google yields only a single promising result, with the link to a guide on creating custom event logs.. While i wouldn't go that far as to call SQL events pointless (though agreed, 17101 and 17103 spelling out " (c) 20?? Microsoft Corporation " and " All rights reserved. " upon each

Powershell - last logged on user - same input, different output

你。 提交于 2019-12-25 03:14:05
问题 UPDATE @ HAL9256 Your answer really made me think! I did some more googling, and found this website which offers another approach http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/19/use-powershell-to-find-last-logon-times-for-virtual-workstations.aspx So far, it works! I remote into another server to run a powershell script that displays the last logged on user. Several things It only works when I run it in the context of a service account, not the Administrator It takes several

Correct syntax for nested for loops in batch file

折月煮酒 提交于 2019-12-25 03:05:13
问题 I am trying to query the registry value of an installed application on many servers. I could hardcode the servers in, and have a lot of repetition and it seems to work. But sometimes a list of servers may change, and I'd like to take a more sensible modular approach. So I can provide a test file with a list of server names, and then query the registry values of all of these servers, outputting them in a logfile. I think the issue is definitely with my loops/variable storing. Not sure exactly

REG ADD - Invalid syntax

心已入冬 提交于 2019-12-25 02:57:07
问题 I am trying to modify a value in the registry by using the following line of code in a batch file but I keep getting "ERROR: Invalid syntax" when I use double quotes around the parameters or "Invalid key name" when I use single quotes. REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{7AA5E1AE-2408-4B92-9C56-8962CD9E926C}" /v "Category" /t REG_DWORD /d 00000001 /f Any help would be greatly appreciated. 回答1: I found the issue. /v "Category" does not need the