Search found 15436 matches
- Fri Jun 30, 2023 10:37 am
- Forum: PowerShell
- Topic: Unable to create Reg Key
- Replies: 14
- Views: 4572
Re: Unable to create Reg Key
HKEY_USERS is not the current user account hive it is a collection of all hives for all loaded accounts. How do you know which profile is the current user? There are usually a minimum of 5 hives loaded. Again everything you are asking for can be more easily done with Tasks. Services can work but are...
- Thu Jun 29, 2023 7:09 pm
- Forum: PowerShell
- Topic: Unable to create Reg Key
- Replies: 14
- Views: 4572
Re: Unable to create Reg Key
Clearly you need to leqarn about tasks. Tasks are created globally and work on user accounts at login and at other key times. The task cannot alter anything a user has no access to so sometimes we have to alter the permissions on a user key value. This can be done once and globally. A user should ne...
- Thu Jun 29, 2023 6:54 pm
- Forum: PowerShell GUIs
- Topic: Button Click in ForEach Creation
- Replies: 8
- Views: 1874
Re: Button Click in ForEach Creation
You do not need to create variables. The step number is the button name.
Maybe you should slow down and take some time to learn Windows objects, events, and how forms a re intended dto be coded. This is actually much easier than you think.
Maybe you should slow down and take some time to learn Windows objects, events, and how forms a re intended dto be coded. This is actually much easier than you think.
- Thu Jun 29, 2023 4:49 pm
- Forum: PowerShell
- Topic: Unable to create Reg Key
- Replies: 14
- Views: 4572
Re: Unable to create Reg Key
All of that can be done writing any code using Tasks.
To work outside of simple GUI apps it is necessary to learn Windows at a technical level. Services should be your last choice and hopefully, never chosen.
To work outside of simple GUI apps it is necessary to learn Windows at a technical level. Services should be your last choice and hopefully, never chosen.
- Thu Jun 29, 2023 11:44 am
- Forum: PowerShell
- Topic: Unable to create Reg Key
- Replies: 14
- Views: 4572
Re: Unable to create Reg Key
If the user is kicking of the task, isn't it still being run by the user? Still won't have permissions to update the reg key The whole point of using a service is to eliminate the user. There is no user to "kick off" anything. The logged on users sessions do not exist in the scope of the ...
- Thu Jun 29, 2023 1:53 am
- Forum: PowerShell GUIs
- Topic: Button Click in ForEach Creation
- Replies: 8
- Views: 1874
Re: Button Click in ForEach Creation
In the future you can find details on how to use Forms and Controls here: https://info.sapien.com/
- Thu Jun 29, 2023 1:49 am
- Forum: PowerShell GUIs
- Topic: Button Click in ForEach Creation
- Replies: 8
- Views: 1874
Re: Button Click in ForEach Creation
I can't understand what you are asking so here is another possibility.
$exeButton.add_Click(
# add button code here
)
$exeButton.add_Click(
# add button code here
)
- Thu Jun 29, 2023 1:46 am
- Forum: PowerShell GUIs
- Topic: Button Click in ForEach Creation
- Replies: 8
- Views: 1874
Re: Button Click in ForEach Creation
The button object for the current event can be addressed with the "$this" dynamic variable. It is always the object that sent the event. Of course you code is not tied to anything so it is hard to know what you are doing. Normally we do these things in the "ButtonClick" event and...
- Wed Jun 28, 2023 5:43 pm
- Forum: PowerShell
- Topic: Unable to create Reg Key
- Replies: 14
- Views: 4572
Re: Unable to create Reg Key
You are creating the key under HKCU. that is the account that is running the service and not the account you are logged on as.
This is why we use Scheduled Tasks to do this type of thing. It is safer, easier and targets the correct accounts.
This is why we use Scheduled Tasks to do this type of thing. It is safer, easier and targets the correct accounts.
- Tue Jun 27, 2023 6:05 pm
- Forum: PowerShell
- Topic: Service Script with Parameters
- Replies: 8
- Views: 3663
Re: Service Script with Parameters
Fulldocumentation for the services API: https://learn.microsoft.com/en-us/windo ... -functions