Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.lang.visual-basic > #19571

Aggiungere carattere in stringa registro

From "Cerebus" <Cerebus@test.it>
Newsgroups it.comp.lang.visual-basic
Subject Aggiungere carattere in stringa registro
Date 2019-03-11 17:44 +0100
Organization Aioe.org NNTP Server
Message-ID <q6639b$pq6$1@gioia.aioe.org> (permalink)

Show all headers | View raw


Salve.
Ho bisogno di un aiuto.

Ho una chiave di registro a cui ho necessita' di aggiungere un carattere 
(uno qualsiasi), e poi di riportarla com'era.
Il tutto deve essere eseguito (o richiamabile) da file batch.

Esempio: la chiave contiene "computer"

Il batch esegue alcune operazioni (copie di file, cancellazioni, etc), poi 
dovrebbe leggere una certa chiave di registro, che in questo caso contiene 
"computer", la cambia (per esempio in computer-) e continua.
Proseguendo nel batch, poi dovrebbe rimetere la chiave a posto, in questo 
caso togliendo "-" alla chiave.

Per esempio, il file bat contiene:

cd\windows
del file.exe
copy nomefile.exe c:\
script.vbs <<< cambia una chiave aggiungendo "-"
copy altronome.exe c:\
script2.vbs <<< rimette a posto la chiave togliendo "-"

E' possibile fare cio' con uno script in VBS?

La chiave e'
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName

E' ovvio che il tutto verra' eseguito con i privilegi adeguati.
E' altrettanto ovvio che la chiave cambia da PC a PC, altrimenti non mi 
servirebbe alcun tipo di programmazione :)

Magari e' pure fattibile direttamente in batch, ma non ho idea di come.
Un aiuto, magari in VBS?

GRAZIE! 

Back to it.comp.lang.visual-basic | Previous | NextNext in thread | Find similar


Thread

Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-11 17:44 +0100
  Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-11 21:32 +0100
    Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-11 21:50 +0100
      Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-12 14:31 +0100
        Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-12 14:47 +0100
          Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-12 15:36 +0100
            Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-12 21:37 +0100
              Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 11:10 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 14:41 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 15:37 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 16:08 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 15:27 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 16:20 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 17:00 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 17:19 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 17:23 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 17:49 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 18:02 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 18:20 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 18:24 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 18:31 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 18:58 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 20:41 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-13 21:30 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 23:03 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-14 23:10 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-14 23:21 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-15 13:09 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-15 13:20 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-15 14:57 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-15 13:31 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-03-15 14:56 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-15 19:10 +0100
                Re: Aggiungere carattere in stringa registro SB <stNOOObenevSPAM@tin.it> - 2019-03-13 23:10 +0100
                Re: Aggiungere carattere in stringa registro "Cerebus" <Cerebus@test.it> - 2019-04-28 23:43 +0200

csiph-web